Skip to content

Bsahoo99/regional-parking-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Regional Parking System

A Django parking ticket system with regional filtering and ForeignKey relationships.

Overview

Tickets are submitted with a region dropdown populated from the database. The day of the week is automatically derived from the ticket's timestamp and stored on save. The history page lets users filter tickets by region and day. A ForeignKey links each Ticket to a Region, and both views are implemented as class-based views that read directly from request.POST. Region data must be seeded manually via the Django admin before use.

Requirements

  • Python 3.10+
  • Django 5.0

Project Structure

regional-parking-system/
├── manage.py
├── pyproject.toml
├── poetry.lock
├── .gitignore
├── README.md
├── templates/
│   ├── home.html           # Submission form with region dropdown
│   └── history.html        # Filterable ticket history
└── django_project/
    ├── __init__.py
    ├── asgi.py
    ├── models.py           # Region and Ticket models
    ├── settings.py
    ├── urls.py
    ├── views.py            # HomeView and HistoryView CBVs
    ├── wsgi.py
    ├── static/
    │   └── style.css
    └── migrations/
        ├── __init__.py
        └── 0001_initial.py

Usage

poetry install
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

Seed regions via the admin at http://127.0.0.1:8000/admin/ before submitting tickets. Then open http://127.0.0.1:8000.

Key Files

File What it does
manage.py Django project entry point
django_project/models.py Region model and Ticket model with ForeignKey to Region
django_project/views.py HomeView (submit) and HistoryView (filter) — raw POST handling
django_project/urls.py Routes / and /history/
templates/home.html Form with region dropdown
templates/history.html History page with region + day filter

Author

Biswajeet Sahoo

License

MIT License

About

A Django parking ticket system with regional filtering and ForeignKey relationships

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors