@stevermeister/django-python
Django development guidelines with async ORM, type hints, and production best practices for Windsurf
prpm install @stevermeister/django-python0 total downloads
📄 Full Prompt Content
# Django Project - Project Guidelines
## Project Overview
Built with Django and follows Django's best practices and conventions for project structure and development.
## Development Guidelines
### Frontend Development
- Use Tailwind CSS with component library
- Use existing pagination templates instead of creating new ones
### Coding Standards
- Always include type definitions for all functions and all variables
- Prefer using `list` instead of `List` where possible, same for `dict` and `Dict`
- Reference similar files before writing new code
- Follow existing patterns and conventions
- Use async Django ORM in async functions
### Code Quality Tools
- Pre-push hooks (configured in `.pre-commit-config.yaml`):
- Black: Python code formatting with 88-character line length
- Flake8: Code style enforcement
- Mypy: Static type checking with strict rules:
- All functions must have type annotations
- All parameters must have type annotations
- No untyped decorators
- Strict Optional handling
- No implicit Optional types
- PyLint: Linting
- Django-upgrade: Django compatibility checks
- Additional checks:
- Trailing whitespace and end-of-file fixes
- JSON, TOML, XML, YAML validation
- Debug statement detection
- Private key detection
- Docstring placement verification
### Development Environment
#### Python Requirements
- Python version: 3.12
- Package management: Poetry
- Virtual environment must be activated before development
#### Testing Requirements
- Test files must be named `test_*.py`
- Factory Boy for test data generation
#### Dependencies
Core:
- Django 5.0.9
- Celery 5.4.0 for async tasks
- Redis 5.1.1 for caching
#### Production
- Gunicorn as WSGI server
- Sentry SDK for error tracking
- Django-anymail for email handling💡 Suggested Test Inputs
Loading suggested inputs...
🎯 Community Test Results
Loading results...
📦 Package Info
- Format
- windsurf
- Type
- rule
- Category
- general