django-flask-patterns

Django / Flask Patterns

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "django-flask-patterns" with this command: npx skills add sraloff/gravityboots/sraloff-gravityboots-django-flask-patterns

Django / Flask Patterns

When to use this skill

  • Maintaining Django or Flask applications.

  • Writing migrations.

  • Working with templates (Jinja2/DTL).

  1. Django
  • Models: Fat models, thin views. Put business logic in Model methods or Managers.

  • CBV vs FBV: Context dependent, but stick to one style per project. Function-Based Views often cleaner for simple logic.

  • ORM: Use select_related (FK) and prefetch_related (M2M) to avoid N+1 queries.

  1. Flask
  • Blueprints: Always use Blueprints to organize routes.

  • Application Factory: Use the create_app() pattern for better testing and config management.

  • Extensions: Initialize extensions (db.init_app(app) ) inside the factory.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

apache-lamp-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

caddy-modern-config

No summary provided by upstream source.

Repository SourceNeeds Review
General

postgresql-query-opt

No summary provided by upstream source.

Repository SourceNeeds Review