Django CLAUDE.md Template

CLAUDE.md for Django web applications

Category:templates
Type:template
Difficulty:intermediate
Language:Markdown
python
api
intermediate

Description

Complete CLAUDE.md template for Django projects. Covers app structure, models, views, templates, Django REST framework integration, admin customization, and deployment with WSGI/ASGI.

Content

Resource Content
# Django Project

## Overview
Django web application with REST API support.

## Tech Stack
- Framework: Django 5.x
- API: Django REST Framework
- Database: PostgreSQL
- Task Queue: Celery + Redis

## Key Commands
```bash
python manage.py runserver    # Dev server
python manage.py migrate      # Run migrations
python manage.py makemigrations
python manage.py createsuperuser
python manage.py test         # Run tests
python manage.py shell_plus   # Enhanced shell
```

## Project Structure
```
project/
├── manage.py
├── config/                   # Settings
│   ├── settings/
│   │   ├── base.py
│   │   ├── local.py
│   │   └── production.py
│   ├── urls.py
│   └── wsgi.py
├── apps/                     # Django apps
│   ├── users/
│   ├── api/
│   └── core/
├── templates/                # HTML templates
└── static/                   # Static files
```

## Conventions
- One app per domain concept
- Use class-based views
- Custom user model from start
- Settings split by environment

## Important Notes
- Admin at `/admin/`
- API docs at `/api/docs/`
- Use signals sparingly