How rgh-code/python-django works
This is a Django storefront API: users enter through project URL routing for authentication, store operations, and playground endpoints. The sampled order service builds an order from either cart contents or a single product and persists order totals. The tree also shows payment, likes, and tagging apps. Source evidence is limited: store views and several app implementations were not excerpted, so their internal calls and most cross-app relationships are not asserted.
Main entry points: urls.py Project routing · views.py Store endpoints · models.py Commerce records · services.py Order service
Components 16
API entry
- Project routing
storefront/urls.py
Store commerce
- Store endpoints
store/views.py - Order service
store/services.py - Commerce records
store/models.py - File validation
store/validators.py - Customer signal
store/signals.py
Identity
- Google login
core/views.py - Core routes
core/urls.py
Store extensions
- Payment handlers
payments/views.py - eSewa integration
payments/esewa.py - Product likes
likes/views.py - Tag features
tag/views.py - Playground endpoints
playground/views.py
Async tasks
- Customer notification task
playground/tasks.py - Celery application
storefront/celery.py
Other components
- API client
Connections 10
- API client → Project routing: sends requests
storefront/urls.py - Project routing → Core routes: includes routes
storefront/urls.py - Project routing → Store endpoints: routes store requests
storefront/urls.py - Project routing → Playground endpoints: routes playground requests
storefront/urls.py - Core routes → Google login: routes login
- Google login → API client: returns JWT tokens
core/views.py - Order service → Commerce records: creates and reads
store/services.py - Store endpoints → Order service: delegates orders
- Customer signal → Commerce records: creates customer
store/signals.py - Store endpoints → Commerce records: uses records