A Django 5 application for managing clients, vehicles, and vehicle services. It combines a server-rendered forms UI (Django forms + Bootstrap templates) with an authenticated REST API built on Django REST Framework.
- Client management — registration forms with address and international phone number validation (
django-phonenumber-field) - Vehicle tracking — vehicle types, VIN generation, and client–vehicle relationships
- Service records — services linked to vehicles by VIN, with a combined vehicle/service listing view
- REST API — DRF
DefaultRouterviewsets protected by Basic or session authentication andIsAuthenticated - Custom accounts app — user registration, custom authentication backend, and token utilities
- Custom middleware — authentication middleware and structured request logging (
loguru+structlog) - Test data tooling —
populate.pyanddata_generator.pyseed realistic data usingFakerandfaker-vehicle
| Endpoint | Description |
|---|---|
GET/POST /api/clients/ |
List and create clients |
GET/POST /api/vehicle/ |
List and create vehicles |
GET/POST /api/vehicle_types/ |
List and create vehicle types |
/admin/ |
Django admin |
Standard DRF detail routes (/api/clients/<id>/, etc.) support retrieve, update, and delete.
| Route | Page |
|---|---|
/index/ |
Dashboard |
/login / /logout/ |
Authentication |
/clients/ |
Client list |
/clients/register |
Client registration form |
/user_register/ |
User sign-up |
/service/ |
Vehicles with service records |
- Python 3 / Django 5.0 / Django REST Framework 3.15
- SQLite for development, PostgreSQL-ready (
psycopg2) - Gunicorn +
Procfilefor Heroku-style deployment - Pipenv (
Pipfile) or pip (requirements.txt) dependency management
git clone git@github.com:zoma00/django-users-vehicle-forms-api.git
cd django-users-vehicle-forms-api
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserverThen open http://127.0.0.1:8000/index/ for the web UI or http://127.0.0.1:8000/api/ for the browsable API.
To seed demo data:
python populate.pyfirst_pro/ Project settings, root URLs, WSGI/ASGI entry points
first_app/ Clients, vehicles, and services: models, forms, views, middleware
api/ DRF serializers, viewsets, and router
accounts/ User registration, auth backend, token utilities
templates/ Bootstrap-based HTML templates
MIT — see LICENSE.