mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-30 23:04:59 +08:00
rename to deprecated
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Advises using Django's class-based views when constructing HTMX responses in view files. Class-based views provide a structured way to handle different HTTP methods.
|
||||
globs: **/views.py
|
||||
---
|
||||
- Use Django's class-based views for HTMX responses
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
description: Specifies that Django forms should be used when handling form inputs in Python files named forms.py. This rule ensures consistent form handling practices within the project.
|
||||
globs: **/forms.py
|
||||
---
|
||||
- Implement Django forms for form handling
|
||||
- Use Django's form validation for HTMX requests
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Recommends utilizing Django's middleware for handling request and response processing. Middleware allows for global actions to be performed on requests and responses.
|
||||
globs: **/middleware.py
|
||||
---
|
||||
- Utilize Django's middleware for request/response processing
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Specifies that Django's ORM should be used for interacting with the database when defining models. This encourages a consistent approach to database operations across the project.
|
||||
globs: **/models.py
|
||||
---
|
||||
- Implement Django ORM for database operations
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Specifies the use of Django's staticfiles app for managing static assets within the 'static' directory. This promotes consistent and efficient management of CSS, JavaScript, and other static files.
|
||||
globs: **/static/**/*.*
|
||||
---
|
||||
- Use Django's staticfiles app for managing static assets
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Ensures Django's URL routing system is used in URL configuration files. This promotes consistent and maintainable URL management across Django projects.
|
||||
globs: **/urls.py
|
||||
---
|
||||
- Utilize Django's URL routing system
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: Encourages adhering to Django's best practices for project structure, especially in settings files. This promotes maintainability and standardization across Django projects.
|
||||
globs: **/settings.py
|
||||
---
|
||||
- Follow Django's best practices for project structure
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
---
|
||||
description: Applies best practices for HTMX and Django integration, focusing on template usage within the 'templates' directory. It encourages using Django's templating engine with HTMX attributes.
|
||||
globs: **/templates/**/*.*
|
||||
---
|
||||
- Use Django's template system 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
|
||||
- Use Django's template tags with HTMX attributes
|
||||
Reference in New Issue
Block a user