Htmx django
/htmx-django-cursorrules-prompt-filecApplique des règles Cursor pour développer avec Htmx django de façon cohérente et maintenable.
description: "Cursor rules for HTMX development with Django integration."
globs: */
alwaysApply: false
// HTMX with Django .cursorrules
// HTMX and Django best practices
const htmxDjangoBestPractices = [
"Use Django's template system with HTMX attributes",
"Implement Django forms for form handling",
"Utilize Django's URL routing system",
"Use Django's class-based views for HTMX responses",
"Implement Django ORM for database operations",
"Utilize Django's middleware for request/response processing",
];
// Folder structure
const folderStructure = `
project_name/
app_name/
templates/
static/
css/
js/
models.py
views.py
urls.py
project_name/
settings.py
urls.py
manage.py
`;
// Additional instructions
const additionalInstructions = `
- Use Django's template tags with HTMX attributes
- Implement proper CSRF protection with Django's built-in features
- Utilize Django's HttpResponse for HTMX-specific responses
- Use Django's form validation for HTMX requests
- Implement proper error handling and logging
- Follow Django's best practices for project structure
- Use Django's staticfiles app for managing static assets
`;