Django
Official documentation: https://docs.djangoproject.com/en/5.0/
Overview
This skill provides comprehensive documentation for django.
Total references: 96 files (~586,000 tokens)
Topics covered: Upload Handlers, Documentation helpers, Pickling objects, Templates, Refreshing objects from database, Basic forms, Write your views, TheImageFileclass, Executing custom SQL directly, The basics, Widgets inheriting from theSelectwidget, Test cases features...
Reference Files
Load only the reference files relevant to the user's question:
Faq
- FAQ: Getting Help¶ (~729 tokens)
- Topics: How do I do X Why doesnt Y work Where can I go to get help, Why hasnt my message appeared ondjango-users, Nobody answered my question What should I do
General
- General Index (~16,569 tokens)
- Topics: Symbols
Howto
- How to create custom model fields¶ and more (~6,407 tokens)
- Topics: Introduction, Background theory, Writing a field subclass
- How to create custom template tags and filters¶ and more (~7,889 tokens)
- Topics: Code layout, Writing custom template filters, Writing custom template tags
- How to deploy with ASGI¶ and more (~7,586 tokens)
- Topics: Theapplicationobject, Configuring the settings module, Applying ASGI middleware
- How to create PDF files¶ and more (~3,885 tokens)
- Topics: Install ReportLab, Write your view, Other formats
Internals
- Writing documentation¶ and more (~4,330 tokens)
- Topics: The Django documentation process, Contributing to Django, Work on the Django framework
- Django Deprecation Timeline¶ (~7,217 tokens)
- Topics: 110
- The Django source code repository¶ and more (~6,438 tokens)
- Topics: High-level overview, The main branch, Stable branches
- Django’s security policies¶ and more (~2,221 tokens)
- Topics: Reporting security issues, Supported versions, How Django discloses security issues
Intro
- Writing your first contribution for Django¶ and more (~7,187 tokens)
- Topics: Introduction, Code of Conduct, Installing Git
- Advanced tutorial: How to write reusable apps¶ and more (~4,491 tokens)
- Topics: Reusability matters, Your project and your reusable app, Installing some prerequisites
- Writing your first Django app, part 2¶ and more (~7,755 tokens)
- Topics: Database setup, Creating models, Activating models
- Writing your first Django app, part 4¶ and more (~7,095 tokens)
- Topics: Write a minimal form, Use generic views Less code is better, Introducing automated testing
- Writing your first Django app, part 6¶ and more (~4,492 tokens)
- Topics: Customize yourappslook and feel, Adding a background-image, Customize the admin form
Misc
- API stability¶ and more (~2,654 tokens)
- Topics: What stable means, Stable APIs, Exceptions
Ref
- Applications¶ and more (~6,696 tokens)
- Topics: Applications, Application registry, Application configuration
- Admin actions¶ and more (~3,263 tokens)
- Topics: Writing actions, Advanced action techniques, Theactiondecorator
- The Django admin site¶ (~19,532 tokens)
- Topics: Overview, ModelAdminobjects, InlineModelAdminobjects
- django.contrib.auth¶ and more (~6,938 tokens)
- Topics: User model, Authentication, Permissions
- The flatpages app¶ and more (~7,150 tokens)
- Topics: Installation, How it works, How to add change and delete flatpages
- The sitemap framework¶ and more (~5,900 tokens)
- Topics: Overview, Installation, Initialization
- Thestaticfilesapp¶ and more (~5,840 tokens)
- Topics: Settings, Management Commands, Storages
- Databases¶ (~7,094 tokens)
- Topics: General notes, PostgreSQL notes, MariaDB notes
- django (~12,183 tokens)
- Topics: Usage, Available commands, Commands provided by applications
- Django Exceptions¶ and more (~3,776 tokens)
- Topics: Django Core Exceptions, URL Resolver exceptions, Database Exceptions
- The Forms API¶ (~8,971 tokens)
- Topics: Bound and unbound forms, Using forms to validate data, Initial form values
- Form fields¶ (~8,264 tokens)
- Topics: Core field arguments, Checking if the field data has changed, Built-inFieldclasses
- Form and field validation¶ and more (~7,962 tokens)
- Topics: RaisingValidationError, Using validation in practice, Specifying widgets
- Middleware¶ and more (~7,978 tokens)
- Topics: Middleware, Cache middleware, Common middleware
- Model class reference¶ and more (~2,039 tokens)
- Topics: Model class, DoesNotExist, MultipleObjectsReturned
- Database Functions¶ (~8,225 tokens)
- Topics: Comparison and conversion functions, Date functions, Math Functions
- Query Expressions¶ (~7,871 tokens)
- Topics: Supported arithmetic, Output field, Some examples
- Model field reference¶ (~14,675 tokens)
- Topics: Field options, Field types, Relationship fields
- Model index reference¶ and more (~7,469 tokens)
- Topics: Indexoptions, Creating objects, Refreshing objects from database
- Lookup API reference¶ and more (~4,319 tokens)
- Topics: Registration API, The Query Expression API, Transformreference
- QuerySetAPI reference¶ (~24,893 tokens)
- Topics: WhenQuerySets are evaluated, QuerySetAPI, Query-related tools
- Related objects reference¶ and more (~1,749 tokens)
- Topics: RelatedManager, One-to-many relations, Many-to-many relations
- Request and response objects¶ (~7,608 tokens)
- Topics: Quick overview, HttpRequestobjects, QueryDictobjects
- SchemaEditor¶ (~1,064 tokens)
- Topics: Methods, Attributes
- Settings¶ (~17,858 tokens)
- TemplateResponse and SimpleTemplateResponse¶ and more (~7,957 tokens)
- Topics: TemplateResponse, SimpleTemplateResponse, Template rendering
- Built (~14,870 tokens)
- Topics: Built-in tag reference, Built-in filter reference, Internationalization tags and filters
- The Django template language¶ and more (~7,905 tokens)
- Topics: Templates, Variables, Filters
- Validators¶ and more (~2,900 tokens)
- Topics: Writing validators, How validators are run, Built-in validators
Releases
- Archive of security issues¶ (~4,969 tokens)
- Topics: Issues under Djangos security process, Issues prior to Djangos security process
Topics
- Asynchronous support¶ and more (~2,930 tokens)
- Topics: Async views, sync_to_async, async_to_sync
- Customizing authentication in Django¶ (~7,200 tokens)
- Topics: Other authentication sources, Custom permissions, Extending the existingUsermodel
- Using the Django authentication system¶ (~9,773 tokens)
- Topics: Userobjects, Permissions and Authorization, Authentication in web requests
- Password management in Django¶ and more (~5,357 tokens)
- Topics: How Django stores passwords, Manually managing a users password, Password validation
- Django’s cache framework¶ (~9,709 tokens)
- Topics: Setting up the cache, The per-site cache, The per-view cache
- System check framework¶ and more (~5,527 tokens)
- Topics: Writing your own checks, Extending generic views, Generic views of objects
- Using mixins with class and more (~7,048 tokens)
- Topics: Context and template responses, Building up Djangos generic class-based views, Using Djangos class-based view mixins
- Aggregation¶ and more (~6,773 tokens)
- Topics: Cheat sheet, Generating aggregates over aQuerySet, Generating aggregates for each item in aQuerySet
- Models¶ (~9,705 tokens)
- Topics: Quick example, Using models, Fields
- Multiple databases¶ and more (~7,987 tokens)
- Topics: Defining your databases, Synchronizing your databases, Automatic database routing
- Making queries¶ (~11,274 tokens)
- Topics: Creating objects, Saving changes to objects, Retrieving objects
- Search¶ and more (~3,573 tokens)
- Topics: Use Cases, Performing raw queries, Executing custom SQL directly
- Database transactions¶ and more (~4,806 tokens)
- Topics: Managing database transactions, Autocommit, Performing actions after commit
- Sending email¶ and more (~6,102 tokens)
- Topics: Quick example, send_mail, send_mass_mail
- Formsets¶ (~5,657 tokens)
- Topics: Using initial data with a formset, Limiting the maximum number of forms, Limiting the maximum number of instantiated forms
- Form Assets (theMediaclass)¶ (~2,384 tokens)
- Topics: Assets as a static definition, Mediaas a dynamic property, Paths in asset definitions
- Creating forms from models¶ (~7,566 tokens)
- Topics: ModelForm, Model formsets, Inline formsets
- Working with forms¶ and more (~6,776 tokens)
- Topics: HTML forms, Djangos role in forms, Forms in Django
- File Uploads¶ and more (~4,994 tokens)
- Topics: Basic file uploads, Upload Handlers, Writing your own middleware
- How to use sessions¶ and more (~6,273 tokens)
- Topics: Enabling sessions, Configuring the session engine, Using sessions in views
- URL dispatcher¶ and more (~7,021 tokens)
- Topics: Overview, How Django processes a request, Example
- Format localization¶ and more (~5,378 tokens)
- Topics: Overview, Locale aware input in forms, Controlling localization in templates
- Translation¶ (~12,407 tokens)
- Topics: Overview, Internationalization in Python code, Internationalization in template code
- Internationalization and localization¶ and more (~3,490 tokens)
- Topics: Overview, Definitions, Internationalization
- Migrations¶ and more (~7,984 tokens)
- Topics: The Commands, Backend Support, Workflow
- Performance and optimization¶ and more (~5,886 tokens)
- Topics: Introduction, General approaches, Caching
- Serializing Django objects¶ and more (~7,615 tokens)
- Topics: Serializing data, Deserializing data, Serialization formats
- Cryptographic signing¶ and more (~5,302 tokens)
- Topics: Protecting SECRET_KEY, Using the low-level API, Signing values
- Advanced testing topics¶ (~5,248 tokens)
- Topics: The request factory, Testing class-based views, Tests and multiple host names
- Writing and running tests¶ (~2,758 tokens)
- Topics: Writing tests, Running tests
- Testing tools¶ (~13,074 tokens)
- Topics: The test client, Provided test case classes, Test cases features
- Testing in Django¶ (~565 tokens)
- Topics: Testing overview, Test suite, unittest
Usage Guidelines
- Identify relevant sections - Match the user's question to the appropriate reference file(s)
- Load minimally - Only read files directly relevant to the question to conserve context
- Cite sources - Reference specific sections when answering
- Combine knowledge - For complex questions, you may need multiple reference files
When to use each reference:
- Auth: Auth-related features and documentation
- Class Based Views: Class Based Views-related features and documentation
- Contrib: Contrib-related features and documentation
- Contributing: Contributing-related features and documentation
- Db: Db-related features and documentation
- Deployment: Deployment, hosting, and infrastructure
- Faq: Faq-related features and documentation
- Files: Files-related features and documentation
- Forms: Forms-related features and documentation
- General: General documentation, overview, and getting started
- Howto: Howto-related features and documentation
- Http: Http-related features and documentation
- I18N: I18N-related features and documentation
- Internals: Internals-related features and documentation
- Intro: Intro-related features and documentation
- Misc: Misc-related features and documentation
- Models: Models-related features and documentation
- Ref: Ref-related features and documentation
- Releases: Releases-related features and documentation
- Templates: Templates-related features and documentation
- Testing: Testing-related features and documentation
- Topics: Topics-related features and documentation