Django Application

Django Application

Guides an AI agent to build production-grade Django apps: models, views, ORM queries and optimisation, authentication, permissions and the admin interface.

Skill files10 files

references/

scripts/

templates/

SKILL.md82 lines
1
---
2
name: django-application
3
description: >
4
Develop production-grade Django applications with models, views, ORM queries,
5
authentication, and admin interfaces. Use when building web applications,
6
managing databases with Django ORM, and implementing authentication systems.
7
---
8
9
# Django Application
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Build comprehensive Django web applications with proper model design, view hierarchies, database operations, user authentication, and admin functionality following Django conventions and best practices.
22
23
## When to Use
24
25
- Creating Django web applications
26
- Designing models and database schemas
27
- Implementing views and URL routing
28
- Building authentication systems
29
- Using Django ORM for database operations
30
- Creating admin interfaces and dashboards
31
32
## Quick Start
33
34
Minimal working example:
35
36
```bash
37
django-admin startproject myproject
38
cd myproject
39
python manage.py startapp users
40
python manage.py startapp products
41
```
42
43
## Reference Guides
44
45
Detailed implementations in the `references/` directory:
46
47
| Guide | Contents |
48
|---|---|
49
| [Django Project Setup](references/django-project-setup.md) | Django Project Setup |
50
| [Model Design with ORM](references/model-design-with-orm.md) | Model Design with ORM |
51
| [Views with Class-Based and Function-Based Approaches](references/views-with-class-based-and-function-based-approaches.md) | Views with Class-Based and Function-Based Approaches |
52
| [Authentication and Permissions](references/authentication-and-permissions.md) | Authentication and Permissions |
53
| [Database Queries and Optimization](references/database-queries-and-optimization.md) | Database Queries and Optimization |
54
| [URL Routing](references/url-routing.md) | URL Routing |
55
| [Admin Interface Customization](references/admin-interface-customization.md) | Admin Interface Customization |
56
57
## Best Practices
58
59
### ✅ DO
60
61
- Use models for database operations
62
- Implement proper indexes on frequently queried fields
63
- Use select_related and prefetch_related for query optimization
64
- Implement authentication and permissions
65
- Use Django Forms for form validation
66
- Cache expensive queries
67
- Use management commands for batch operations
68
- Implement logging for debugging
69
- Use middleware for cross-cutting concerns
70
- Validate user input
71
72
### ❌ DON'T
73
74
- Use raw SQL without ORM
75
- N+1 query problems without optimization
76
- Store secrets in code
77
- Trust user input directly
78
- Override **init** in models unnecessarily
79
- Make synchronous heavy operations in views
80
- Use inheritance models unless necessary
81
- Expose stack traces in production
82

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,695 prompts

More by @OpenSourceBuffGuy

See all
Three frame underwater movie poster of sinking man prompt image

Three frame underwater movie poster of sinking man

Draws a cinematic three-frame underwater movie poster of a man sinking, moving from close-up to wide shot with light beams, bubbles and a short title.

image-prompt, nano-banana, poster, ocean, cinematic, multi-panel, close-up, medium-shot, wide-shot, dramatic-lighting, photorealistic, moody, bokeh, text-rendering, vertical-format, man, portrait, blue-hour, soft-lighting, muted-colors, for-filmmakers, for-designers, short-film

A summer evening in Seoul, shot like a home video prompt image

A summer evening in Seoul, shot like a home video

Generates a 30-second home-video style clip of a young woman on a summer evening in a Seoul neighborhood, shot like early-2000s camcorder footage with small accidents and natural sound only.

video-prompt, home-video, vlog, handheld, film-grain, candid, korea, multi-shot, ugc-video, lip-sync, guardrails, seedance, long-form, natural-light, vintage, muted-colors, cityscape, for-content-creators, sound-effects, structured-output, summer, timed-beats

Woman in satin bustier taking indoor selfie prompt image

Woman in satin bustier taking indoor selfie

Recreates a reference smartphone selfie as a new adult woman in a luxury living room, matching crop, light and styling while leaving out all on-screen text and icons.

image-prompt, json-prompt, gpt-image, reference-image, selfie, portrait, woman, photorealistic, smartphone-photo, natural-light, fashion, jewelry, hairstyles, interior-design, negative-prompt, structured-output, vertical-format, close-up, social-media-graphic, long-form, advanced

Reviews

Loading reviews…

Discussion

Loading comments…