How juankmatu/cerrajeria-rosario works
1. Purpose and Entry Points
This is a Django site for “cerrajeriarosario,” organized around a public home/service presentation, product catalog, and data-oriented content. Runtime entry points are manage.py, ASGI/WSGI modules, and the project URL router: manage.py, cerrajeriarosario/asgi.py, cerrajeriarosario/wsgi.py, cerrajeriarosario/urls.py.
2. Django Project and Environment Boundary
cerrajeriarosario owns framework configuration, environment-specific settings, routing, and media storage integration. Development/default configuration is in cerrajeriarosario/settings.py; production overrides are separated in cerrajeriarosario/settings_production.py. Cloudinary-backed storage is encapsulated by cerrajeriarosario/cloudinary_storage.py, creating an external media-storage boundary.
3. Public Content and Home Domain
HomeApp is the primary site-content domain. Its models and views likely define homepage-visible entities and render public responses: HomeApp/models.py, HomeApp/views.py. HomeApp/context_processors.py supplies shared template context across views, while HomeApp/management/commands/seed_data.py establishes a repeatable initial-content loading path.
4. Product Catalog Domain
Products is an isolated Django app for product records and product-facing request handling: Products/models.py, Products/views.py, Products/admin.py. It separates catalog persistence and admin management from homepage/content concerns, allowing project-level URL routing to compose its views with other domains.
5. Data/Supporting Content Domain
DatosApp provides a third domain boundary for structured data or informational records, with standard Django model, view, and admin layers: DatosApp/models.py, DatosApp/views.py, DatosApp/admin.py. Requests flow from the central URL configuration into app views, which retrieve app-owned models and render templates or responses.
6. Rendering and Static Asset Flow
Server-rendered templates live centrally under templates, including the main site template and sitemap output: templates/cerrajeria.html, templates/sitemap.xml. Shared browser assets are delivered from static, especially static/css/styles.css and static/js/main.js. The flow is Django view → template rendering → static CSS/JS, with shared context injected by the HomeApp context processor.
7. Deployment Topology
The repository supports containerized deployment through Dockerfile, docker-compose.yml, and entrypoint.sh. Nginx is configured as the edge/web-serving layer in nginx.conf; it likely fronts the Django application and serves static assets. Environment initialization is scripted in deploy/setup_env.sh, with expected variable shape documented by .env.example. Production execution can use either the ASGI or WSGI entry point depending on the configured application server.
Main entry points: manage.py Django runtime · cerrajeria.html Site templates · urls.py URL router · views.py Home content
Components 17
Runtime & deployment
- Nginx edge · Fronts Django and serves static assets.
nginx.conf - Container deployment
docker-compose.yml - Container entrypoint
entrypoint.sh - Django runtime · Can run through ASGI or WSGI.
manage.py - ASGI entry
cerrajeriarosario/asgi.py - WSGI entry
cerrajeriarosario/wsgi.py
Django project
- Settings · Development defaults with production overrides.
cerrajeriarosario/settings.py - URL router · Composes public domain routes.
cerrajeriarosario/urls.py - Cloudinary storage · External media-storage boundary.
cerrajeriarosario/cloudinary_storage.py
Application domains
- Home content
HomeApp/views.py - Home records
HomeApp/models.py - Shared template context
HomeApp/context_processors.py - Initial content seed
HomeApp/management/commands/seed_data.py - Product catalog · Product views and records are isolated from home content.
Products/views.py - Structured content · Informational data views and records.
DatosApp/views.py
Presentation assets
- Site templates · Includes the main page and sitemap output.
templates/cerrajeria.html - CSS and browser JS
static/css/styles.css
Connections 19
- Container deployment → Container entrypoint: starts
- Container entrypoint → Django runtime: launches
- Nginx edge → Django runtime: proxies requests
- Nginx edge → CSS and browser JS: serves
- Django runtime → ASGI entry: ASGI mode
- Django runtime → WSGI entry: WSGI mode
- Django runtime → Settings: loads
- Settings → Cloudinary storage: configures media
- Django runtime → URL router: routes through
- URL router → Home content: home requests
- URL router → Product catalog: catalog requests
- URL router → Structured content: data requests
- Home content → Home records: reads content
- Product catalog → Site templates: renders
- Structured content → Site templates: renders
- Home content → Site templates: renders
- Shared template context → Site templates: injects shared context
- Site templates → CSS and browser JS: references
- Initial content seed → Home records: loads initial content