Welcome to the django-extensions documentation! — django-extensions 2.0.0 documentation

# Welcome to the django-extensions documentation!

Django Extensions is a collection of custom extensions for the Django Framework.

These include management commands, additional database fields, admin extensions and much more.

这篇文档当然还有中文版

# Getting Started

The easiest way to figure out what Django Extensions are all about is to watch the excellent screencast by Eric Holscher. In a couple minutes Eric walks you through a half a dozen command extensions.

# Getting it

You can get Django Extensions by using pip:

    $ pip install django-extensions

If you want to install it from source, grab the git repository and run setup.py:

    $ git clone git://github.com/django-extensions/django-extensions.git
    $ cd django-extensions
    $ python setup.py install

For more detailed instructions check out our Installation instructions. Enjoy.

# Compatibility with versions of Python and Django

We follow the Django guidelines for supported Python and Django versions. See more at Django Supported Versions

This might mean the django-extensions may work with older or unsupported versions but we do not guarantee it and most likely will not fix bugs related to incompatibilities with older versions.

At this time we test on and thrive to support valid combinations of Python 2.7, 3.4, 3.5, 3.6, pypy and pypy3 with Django versions 1.8 to 1.11.

# Contents

- Installation instructions
  - Installation
    - For usage
    - For development
    - Configuration
- Current Command Extensions
- Ideas for New Command Extensions
- Command Signals
  - Basic Example
  - Custom Permissions For All Models
  - Using pre/post signals on your own commands
- Current Admin Extensions
  - Example Usage
- shell_plus
  - Interactive Python Shells
  - Configuration
  - Collision resolvers
  - Writing your custom collision resolver
  - Import Subclasses
  - IPython Notebook
  - Additional Imports
  - Database application signature
  - SQL queries
- create_app
  - Example Usage
  - Example generated from sample.dia
- delete_squashed_migrations
  - Example Usage
- dumpscript
  - Why?
  - Features
  - How?
  - Caveats
    - Naming conflicts
- RunScript
  - Introduction
  - Getting Started
  - Usage
  - Passing arguments
  - Setting execution directory
  - Debugging
- export_emails
  - Example Usage
  - Supported Formats
    - address
    - google
    - outlook
    - linkedin
    - vcard
- Field Extensions
  - Current Database Model Field Extensions
- Graph models
  - Selecting a library
  - Default Settings
  - Templates
  - Example Usage
- Jobs scheduling
  - Setup
  - Create a job
  - Run a job
- merge_model_instances
  - Example Usage
- Model extensions
  - Introduction
  - Current Database Model Extensions
- Namespace proposal
  - Introduction
  - Proposal of a Namespace
- print_settings
  - Introduction
  - More Info
- RunProfileServer
  - Introduction
  - gather_profile_stats.py
  - Profiler choice
  - KCacheGrind
  - Links
- RunServerPlus
  - Introduction
  - Getting Started
  - Usage
    - View Source
    - Interactive Debugging Console
    - SSL
    - Certificates paths
    - Configuration
    - IO Calls and CPU Usage
  - Debugger PIN
- sync_s3
  - Example Usage
  - Required libraries and settings
  - Optional settings
- sqldiff
  - Supported Databases
  - Exit Codes
  - Example Usage
- sqlcreate
  - Introduction
  - Usage
  - Example
    - PostgreSQL
    - MySQL
  - Known Issues
- sqldsn
  - Supported Databases
  - Exit Codes
  - Example Usage
- validate_templates
  - Options
    - verbosity
    - break
    - ignore_app
    - includes
    - no_apps
  - Settings
    - VALIDATE_TEMPLATES_IGNORE_APPS
    - VALIDATE_TEMPLATES_IGNORES
    - VALIDATE_TEMPLATES_EXTRA_TEMPLATE_DIRS
  - Usage Example

# Indices and tables

- Search Page