How azamat1012/flowershop works
Purpose and entry points
This is a Django-based flower shop service with a customer-facing catalog/order flow, consultation and quiz pages, payment/order result pages, and Django-admin sales operations. Primary process entry points are manage.py, flower_shop_project/wsgi.py, and flower_shop_project/asgi.py. Project routing begins in flower_shop_project/urls.py.
Application and domain layer
The main business application is website/. Its domain models are centralized in website/models.py; migrations show the system persists orders, consultations, payment identifiers, and courier-assignment/status-related order data under website/migrations/. Form validation/input binding is separated into website/forms.py.
HTTP routing and request handling
Django dispatches project routes through flower_shop_project/urls.py into application routes in website/urls.py, with handlers implemented in website/views.py. These views are the boundary between browser requests, forms/models, rendered pages, and order-related side effects.
Customer purchase journey
The template set defines a server-rendered, multi-step customer experience:
• Shop discovery/catalog and item cards: templates/index.html, templates/catalog.html, templates/card.html
• Guided selection: templates/quiz.html, templates/quiz-step.html, templates/result.html
• Order and payment progression: templates/order.html, templates/order-step.html, templates/payment.html
• Consultation capture: templates/consultation.html
Shared layout is composed from templates/base/main.html, templates/base/header.html, and templates/base/footer.html. Static styling and catalog imagery are served from static/css/main.css and static/img/catalog.
Order operations and admin reporting
Django admin is customized in website/admin.py. Dedicated admin templates indicate order management and sales reporting extensions: templates/admin/website/order/change_list.html and templates/admin/website/order/sales_dashboard.html. The order model/migrations are the persistence boundary for pricing, status, payment, and courier workflow changes.
Notifications and asynchronous integration boundary
website/signals.py likely connects model lifecycle events to secondary actions, while website/telegram_bot.py is the repository’s explicit external-notification integration point. Consultation notification migration fields (website/migrations/0002_consultation_notified_consultation_notified_at.py) suggest notification delivery state is persisted to prevent or track repeat sends.
Runtime and deployment
The service runs on Django, configured by flower_shop_project/settings.py, with both WSGI and ASGI interfaces available. Container deployment is defined by Dockerfile, docker-compose.yml, and entrypoint.sh; Python dependencies are declared in requirements.txt. No separate frontend build system or standalone API service is present in the tree.
Components 19
Django Runtime
- Management CLI
manage.py - WSGI interface
flower_shop_project/wsgi.py - ASGI interface
flower_shop_project/asgi.py - Project settings
flower_shop_project/settings.py - Project routes
flower_shop_project/urls.py
Website Application
- Website routes
website/urls.py - Request handlers · Coordinates forms, models, pages, and order side effects.
website/views.py - Input forms
website/forms.py - Shop domain models · Persists orders, consultations, payments, courier assignment, and statuses.
website/models.py - Schema history · Includes persisted consultation notification state.
website/migrations/0002_consultation_notified_consultation_notified_at.py - Lifecycle signals
website/signals.py - Telegram notifications
website/telegram_bot.py
Customer Experience
- Catalog and order pages · Catalog, quiz, order, payment, and consultation journey.
templates/order.html - Shared storefront layout
templates/base/main.html - Styles and catalog media
static/css/main.css
Sales Operations
- Admin customization
website/admin.py - Sales reporting
templates/admin/website/order/sales_dashboard.html
Deployment
- Container deployment
docker-compose.yml - Container bootstrap
entrypoint.sh
Connections 19
- WSGI interface → Project settings: loads
- ASGI interface → Project settings: loads
- Management CLI → Project settings: uses
- Project settings → Project routes: configures
- Project routes → Website routes: includes
- Website routes → Request handlers: dispatches to
- Request handlers → Input forms: binds and validates
- Request handlers → Shop domain models: reads and writes
- Request handlers → Catalog and order pages: renders
- Catalog and order pages → Shared storefront layout: composes
- Catalog and order pages → Styles and catalog media: uses
- Schema history → Shop domain models: evolves schema for
- Shop domain models → Lifecycle signals: emits lifecycle events
- Lifecycle signals → Telegram notifications: triggers notifications
- Admin customization → Shop domain models: manages orders
- Admin customization → Sales reporting: renders
- Container deployment → Container bootstrap: starts with
- Container bootstrap → Management CLI: runs Django commands
- Container deployment → WSGI interface: serves application