Django Cursor Rules
April 15, 2026
Django Cursor Rules
Project Structure
- /project - settings, urls, wsgi
- /app - models, views, serializers
- /migrations - database migrations
Best Practices
- Use AbstractUser for custom users
- Add verbose_name to all fields
- Use choices for fixed values
- Add indexes for filtered fields
- Use class-based views (CBVs)
- Use ModelForm for CRUD
- Use @property for computed fields
AI Instructions
- Use Django 5.0+
- Generate migrations with makemigrations
- Include docstrings on models/views
- Add crispy-forms for styling
Related Articles
Go Cursor Rules: AI-Powered Development Best Practices
Cursor rules for Go development enforcing idiomatic patterns, modern Go 1.21+ features, and clean code principles with AI assistance for production-ready code.
C/C++ Cursor Rules
Astro Cursor Rules: Islands Architecture & Static Content
Comprehensive Astro cursor rules covering component islands, static generation, content collections, and hydration directives for fast, SEO-friendly sites.