django-admin.py(1)

NAME
django-admin.py - Utility script for the Django web framework

SYNOPSIS
django-admin.py <action> [options]

DESCRIPTION
This utility script provides commands for creation and maintenance of Django projects and apps.

With the exception of startproject, all commands listed below can also be performed with the manage.py script found at the top level of each Django project directory.

ACTIONS

adminindex [appname ...]
    Prints the admin-index template snippet for the given app name(s).

createcachetable [tablename]
    Creates the table needed to use the SQL cache backend

dbshell
    Runs the command-line client for the current DATABASE_ENGINE.

diffsettings
    Displays differences between the current settings.py and Django's default settings. Settings that don't appear in the defaults are followed by "###".

inspectdb
    Introspects the database tables in the database specified in settings.py and outputs a Django model module.

install [appname ...]
    Executes sqlall for the given app(s) in the current database.

reset [appname ...]
    Executes sqlreset for the given app(s) in the current database.

runfcgi [KEY=val] [KEY=val] ...
    Runs this project as a FastCGI application. Requires flup. Use runfcgi help for help on the KEY=val pairs.

runserver [--noreload] [--adminmedia=ADMIN_MEDIA_PATH] [port|ipaddr:port]
    Starts a lightweight Web server for development.

shell [--plain]
    Runs a Python interactive interpreter. Tries to use IPython, if it's available. The --plain option forces the use of the standard Python interpreter even when IPython is installed.

sql [appname ...]
    Prints the CREATE TABLE SQL statements for the given app name(s).

sqlall [appname ...]
    Prints the CREATE TABLE, initial-data and CREATE INDEX SQL statements for the given model module name(s).

sqlclear [appname ...]
    Prints the DROP TABLE SQL statements for the given app name(s).

sqlindexes [appname ...]
    Prints the CREATE INDEX SQL statements for the given model module name(s).

sqlinitialdata [appname ...]
    Prints the initial INSERT SQL statements for the given app name(s).

sqlreset [appname ...]
    Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).

sqlsequencereset [appname ...]
    Prints the SQL statements for resetting PostgreSQL sequences for the given app name(s).

startapp [appname]
    Creates a Django app directory structure for the given app name in the current directory.

startproject [projectname]
    Creates a Django project directory structure for the given project name in the current directory.

syncdb
    Creates the database tables for all apps in INSTALLED_APPS whose tables haven't already been created.

test [--verbosity] [appname ...]
    Runs the test suite for the specified applications, or the entire project if no apps are specified

validate
    Validates all installed models.

OPTIONS

--version
    Show program's version number and exit.

-h, --help
    Show this help message and exit.

--settings=SETTINGS
    Python path to settings module, e.g. "myproject.settings.main". If this isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.

--pythonpath=PYTHONPATH
    Lets you manually add a directory the Python path, e.g. "/home/djangoprojects/myproject".

--plain
    Use plain Python, not IPython, for the "shell" command.

--noinput
    Do not prompt the user for input.

--noreload
    Disable the development server's auto-reloader.

--verbosity=VERBOSITY
    Verbosity level: 0=minimal output, 1=normal output, 2=all output.

--adminmedia=ADMIN_MEDIA_PATH
    Specifies the directory from which to serve admin media when using the development server.

ENVIRONMENT

DJANGO_SETTINGS_MODULE
    In the absence of the --settings option, this environment variable defines the settings module to be read. It should be in Python-import form, e.g. "myproject.settings".

SEE ALSO
Full descriptions of all these options, with examples, as well as documentation for the rest of the Django framework, can be found on the Django site:

http://www.djangoproject.com/documentation/

or in the distributed documentation.

AUTHORS/CREDITS
Originally developed at World Online in Lawrence, Kansas, USA. Refer to the AUTHORS file in the Django distribution for contributors.

LICENSE
New BSD license. For the full license text refer to the LICENSE file in the Django distribution.