How zakariaeloirrak/projet-de-stage works
Main components
• Client (Web Browser)
• Web Server Layer
– NGINX (or similar)
– WSGI/ASGI server (Gunicorn, Daphne)
• Django Application (“proj” + “application”)
– URL Router (proj/urls.py → application/urls.py)
– Middleware (application/middleware.py + Django built-ins)
– Views & Forms (application/views.py, application/forms.py)
– Templates (application/templates/…)
– Static assets (application/static/…)
– Business Logic & Models (application/models.py)
– Templatetags (application/templatetags)
– Admin Interface (application/admin.py)
– Migrations (application/migrations)
• Database (SQLite / PostgreSQL / MySQL)
• Filesystem storage (documents/ PDF files)
Relationships and data flows
a. Client → HTTP Request → NGINX → Gunicorn → Django URL router
b. URL router → Middleware chain → View function/class
c. View → Validate data via Forms → ORM queries to Database
d. View → Business logic → Read/write to “documents/” folder for PDFs
e. View → Render Template + Context → Static files (CSS, JS, images)
f. Django → WSGI server → NGINX → HTTP Response → Client
Architectural patterns
• MVC (Django’s MTV) – Models ↔ Templates ↔ Views
• Layered three-tier (Client / Application / Database)
• Monolith: Single codebase & single Django “application” module
Key technologies
• Python 3.x, Django framework
• HTML5/CSS3 server-rendered templates
• Django ORM & migrations
• WSGI/ASGI (Gunicorn/Daphne) behind NGINX
• Relational DB (specified in proj/settings.py)
• Local file storage for generated PDFs