How tiagosamaha/dlunch works
dlunch is a Django cafeteria-meal entitlement system. A client can look up a student or balance, authenticate a meal deduction, and receive a forbidden response when the student is unknown, has already eaten that day, or has no remaining meals; fingerprint updates are also exposed. Staff can manage students and meal allocations through Django admin and generate date-range meal reports. The model layer stores students, meal records, monthly student balances, and group allocations. Source excerpts show API, reporting, and model calls; some broader Django wiring is not sampled.
Main entry points: models.py Meal Records And Balances · admin_views.py Meal Report · urls.py API Routes · handlers.py API Handlers
Components 12
Client API
- API Routes
api/urls.py - API Handlers
api/handlers.py
Meal Domain
- Meal Records And Balances
dlunch/models.py - Fingerprint Field
dlunch/fieldtypes.py
Staff Operations
- Admin Management
dlunch/admin.py - Meal Report
dlunch/admin_views.py - Report Form
dlunch/forms.py - Report Template
dlunch/templates/admin/dlunch/relatorio.html
Django Runtime
- Django Configuration
settings.py
Other components
- API Client
- Staff User
- SQLite Database
Connections 9
- API Client → API Routes: requests
api/urls.py - API Routes → API Handlers: dispatches
api/urls.py - API Handlers → Meal Records And Balances: reads and updates
api/handlers.py - Admin Management → Meal Records And Balances: registers models
dlunch/admin.py - Meal Report → Report Form: validates report
dlunch/admin_views.py - Report Form → Meal Records And Balances: counts meals
dlunch/forms.py - Meal Report → Report Template: renders
dlunch/admin_views.py - Meal Records And Balances → Fingerprint Field: uses field
dlunch/models.py - Django Configuration → SQLite Database: configures
settings.py