Imported from amarso2/BR22-Films (
AGENTS.md). Install upstream withnpx skills add amarso2/BR22-Films. Copyright stays with the author.
AI Agent Guidance for ColorPhoto
Project overview
- Django 6.0 project with a root app
colorphotoand feature apps:services,portfolio,package,gallery,video,service_details, andaccounts. - Uses custom user model
accounts.AccountwithAUTH_USER_MODEL = 'accounts.Account'. - Database is SQLite at
db.sqlite3. - Media files are served from
media/; static assets are incolorphoto/static/andstatic/. - Templates are loaded from
colorphoto/templates/plus app template folders.
How to run
- Activate the virtual environment in the workspace root:
env\Scripts\Activate.ps1on Windows PowerShell. - Run Django commands from
manage.py:python manage.py runserverpython manage.py migratepython manage.py makemigrations
Important structure
colorphoto/urls.py: root URL configurationcolorphoto/views.py: home page controller and top-level view functionsservices/urls.py,portfolio/urls.py,package/urls.py,gallery/urls.py,video/urls.py: app URL routesaccounts/models.py: custom authentication modelcolorphoto/settings.py: settings, installed apps, static/media config, custom user model
Project conventions and notes
- The homepage uses
colorphoto.views.homeand aggregates lists fromservices,portfolio,package,gallery, andvideo. - App views generally use Django function-based views and render templates with context dictionaries.
- The project currently includes a duplicate URL route:
path('protfolio/', include('portfolio.urls'))incolorphoto/urls.py. colorphoto/settings.pyis configured withDEBUG = Trueand a hard-codedSECRET_KEY; this is acceptable for local development but should not be used for production deployments.
When editing
- Preserve the
AUTH_USER_MODELsetting whenever touching authentication or account models. - Use template names and app-specific template directories rather than assuming a single unified template folder.
- Keep the existing
mediaandstaticconfiguration in sync withMEDIA_ROOT,STATIC_ROOT, andSTATICFILES_DIRS. - Confirm that new views or template references use the correct app route and template path.
Useful checks for AI-generated changes
- Verify that URL patterns are not duplicated or mis-spelled.
- Confirm template names exist before changing view render targets.
- Ensure migration files are updated when models change.
- Avoid introducing production secrets or publishing the current
SECRET_KEY.
Why this file exists
This file helps AI coding agents understand the application boundaries, runtime commands, and repository conventions so they can make safe, context-aware code changes.