How jorge296andres/colegio works
Project type and purpose
• This is a monolithic, server-rendered full-stack web application built with Django (Python).
• Purpose: manage “colegio” (school) domain data: employees (empleados), grades (grados), and roles (roles) via standard CRUD interfaces.
File structure
• Top-level Django project folder: “colegio/” containing settings.py, URLs, ASGI/WSGI modules.
• Three Django apps: empleados/, grados/, roles/. Each app follows the standard pattern: models.py, views.py, urls.py, forms.py, admin.py, tests.py.
• Templates are in plantillas/ organized by app.
• manage.py root script and requirements.txt outline dependencies.
• Configuration hints in README: uses a MySQL database (optionally containerized via Docker).
README for additional insights
• Database: MySQL (can be run via Docker container).
• Workflow: makemigrations → migrate → test → runserver.
• No separate SPA or REST-only API: server → templates → browser.
a. Main components
• Client (Web browser UI)
• Django Web Server (manage.py → ASGI/WSGI → Django core)
• URL dispatcher
• Middleware
• Apps (empleados, grados, roles)
• Templating engine (plantillas/)
• Database Service (MySQL container)
• (Optional) Docker Host/Engine if containerizing DB
b. Relationships and interactions
• Browser sends HTTP(S) requests → Django ASGI/WSGI endpoint
• URL dispatcher routes → specific app.view
• View interacts with models → ORM queries MySQL
• View returns rendered HTML via template → HTTP response to browser
• manage.py handles migrations and tests as build/deploy steps
c. Architectural patterns & principles
• Django’s Model-Template-View (MTV) pattern
• Single codebase, monolithic deployment
• Separation of concerns: distinct apps encapsulate domain logic
• Infrastructure as code: Docker commands for DB
d. Key technologies
• Python 3.x, Django framework
• MySQL (dockerized)
• HTML templates (Django templating)
• manage.py (CLI)