django-conventions

Enforce Django project structure and best practices during code reviews.

1|Updated Dec 24, 2025
One-click install
npx skills add https://github.com/clostaunau/holiday-card --skill django-conventions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-conventions
Source: https://github.com/clostaunau/holiday-card/tree/main/.claude/skills/django-conventions
Command: npx skills add https://github.com/clostaunau/holiday-card --skill django-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive reference of Django conventions to ensure code quality, security, and maintainability across Django projects. It acts as a practical guide during code reviews and development to keep teams aligned with community best practices.

Core Features & Use Cases

  • Project structure guidance: Clear separation between project configuration and apps.
  • Model and DB patterns: Verbose names, proper field choices, indexes, Meta options, and migrations.
  • Views and DRF patterns: CBVs vs FBVs, serializers, permissions, and templates.
  • Security and performance defaults: CSRF, XSS, SQL injection prevention, and query optimization.
  • Code review usage: Reference during reviews to verify adherence to Django standards and maintainability.

Quick Start

Review a Django project against these conventions and receive a prioritized list of fixes and improvements.

Frequently Asked Questions about django-conventions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Django best practices and conventions across my project?

Django conventions codify and enforce best practices for project layout, app organization, models, views, forms, templates, security, and performance. Use this reference during development and code reviews to ensure consistent structure, prevent anti-patterns, and maintain code quality across your entire Django ecosystem.

What are Django model best practices for fields, choices, and database constraints?

Django model conventions recommend using TextChoices for choice fields, explicit on_delete and related_name on foreign keys, indexes and constraints in Meta, custom managers and QuerySets, and proper timestamp fields. These practices prevent silent data loss, improve query performance, and ensure database integrity.

How do I structure Django views and serializers following best practices?

Best practices cover choosing between class-based and function-based views, organizing DRF serializers, implementing proper permissions, and handling templates. Following these conventions improves code reusability, security, and maintainability while keeping your view layer consistent and testable.

What security defaults should I apply in Django projects?

Django security conventions enforce CSRF protection, HTTPS, XSS prevention, SQL injection avoidance through ORM, and keeping secrets out of code. Applying these defaults from project start reduces vulnerability surface and prevents common security misconfigurations.

Can I use Django conventions to guide code reviews and catch anti-patterns?

Yes. This reference provides a prioritized checklist for code reviews, helping teams identify deviations from Django standards, anti-patterns, and maintainability issues. Use it during reviews to verify adherence to conventions and deliver consistent feedback.

What's the best way to organize Django project structure and settings across environments?

Django conventions recommend clear separation between project configuration and apps, environment-specific settings files, and structured app organization. This approach prevents configuration conflicts, simplifies deployment, and keeps projects maintainable as they scale.