1 | .TH "django-admin.py" "1" "June 2007" "Django Project" ""
|
---|
2 | .SH "NAME"
|
---|
3 | django\-admin.py \- Utility script for the Django web framework
|
---|
4 | .SH "SYNOPSIS"
|
---|
5 | .B django\-admin.py <
|
---|
6 | .I action
|
---|
7 | .B > [options]
|
---|
8 | .sp
|
---|
9 | .SH "DESCRIPTION"
|
---|
10 | This utility script provides commands for creation and
|
---|
11 | maintenance of Django projects and apps.
|
---|
12 | .sp
|
---|
13 | With the exception of
|
---|
14 | .BI startproject,
|
---|
15 | all commands listed below can also be performed with the
|
---|
16 | .BI manage.py
|
---|
17 | script found at the top level of each Django project directory.
|
---|
18 | .sp
|
---|
19 | .SH "ACTIONS"
|
---|
20 | .TP
|
---|
21 | .BI "adminindex [" "appname ..." "]"
|
---|
22 | Prints the admin\-index template snippet for the given app name(s).
|
---|
23 | .TP
|
---|
24 | .BI "createcachetable [" "tablename" "]"
|
---|
25 | Creates the table needed to use the SQL cache backend
|
---|
26 | .TP
|
---|
27 | .B dbshell
|
---|
28 | Runs the command\-line client for the current
|
---|
29 | .BI DATABASE_ENGINE.
|
---|
30 | .TP
|
---|
31 | .B diffsettings
|
---|
32 | Displays differences between the current
|
---|
33 | .B settings.py
|
---|
34 | and Django's default settings. Settings that don't appear in the defaults are
|
---|
35 | followed by "###".
|
---|
36 | .TP
|
---|
37 | .B inspectdb
|
---|
38 | Introspects the database tables in the database specified in settings.py and outputs a Django
|
---|
39 | model module.
|
---|
40 | .TP
|
---|
41 | .BI "install [" "appname ..." "]"
|
---|
42 | Executes
|
---|
43 | .B sqlall
|
---|
44 | for the given app(s) in the current database.
|
---|
45 | .TP
|
---|
46 | .BI "reset [" "appname ..." "]"
|
---|
47 | Executes
|
---|
48 | .B sqlreset
|
---|
49 | for the given app(s) in the current database.
|
---|
50 | .TP
|
---|
51 | .BI "runfcgi [" "KEY=val" "] [" "KEY=val" "] " "..."
|
---|
52 | Runs this project as a FastCGI application. Requires flup. Use
|
---|
53 | .B runfcgi help
|
---|
54 | for help on the KEY=val pairs.
|
---|
55 | .TP
|
---|
56 | .BI "runserver [" "\-\-noreload" "] [" "\-\-adminmedia=ADMIN_MEDIA_PATH" "] [" "port|ipaddr:port" "]"
|
---|
57 | Starts a lightweight Web server for development.
|
---|
58 | .TP
|
---|
59 | .BI "shell [" "\-\-plain" "]"
|
---|
60 | Runs a Python interactive interpreter. Tries to use IPython, if it's available. The
|
---|
61 | .BI \-\-plain
|
---|
62 | option forces the use of the standard Python interpreter even when IPython is installed.
|
---|
63 | .TP
|
---|
64 | .BI "sql [" "appname ..." "]"
|
---|
65 | Prints the CREATE TABLE SQL statements for the given app name(s).
|
---|
66 | .TP
|
---|
67 | .BI "sqlall [" "appname ..." "]"
|
---|
68 | Prints the CREATE TABLE, initial\-data and CREATE INDEX SQL statements for the
|
---|
69 | given model module name(s).
|
---|
70 | .TP
|
---|
71 | .BI "sqlclear [" "appname ..." "]"
|
---|
72 | Prints the DROP TABLE SQL statements for the given app name(s).
|
---|
73 | .TP
|
---|
74 | .BI "sqlindexes [" "appname ..." "]"
|
---|
75 | Prints the CREATE INDEX SQL statements for the given model module name(s).
|
---|
76 | .TP
|
---|
77 | .BI "sqlinitialdata [" "appname ..." "]"
|
---|
78 | Prints the initial INSERT SQL statements for the given app name(s).
|
---|
79 | .TP
|
---|
80 | .BI "sqlreset [" "appname ..." "]"
|
---|
81 | Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app
|
---|
82 | name(s).
|
---|
83 | .TP
|
---|
84 | .BI "sqlsequencereset [" "appname ..." "]"
|
---|
85 | Prints the SQL statements for resetting PostgreSQL sequences for the
|
---|
86 | given app name(s).
|
---|
87 | .TP
|
---|
88 | .BI "startapp [" "appname" "]"
|
---|
89 | Creates a Django app directory structure for the given app name in
|
---|
90 | the current directory.
|
---|
91 | .TP
|
---|
92 | .BI "startproject [" "projectname" "]"
|
---|
93 | Creates a Django project directory structure for the given project name
|
---|
94 | in the current directory.
|
---|
95 | .TP
|
---|
96 | .BI syncdb
|
---|
97 | Creates the database tables for all apps in INSTALLED_APPS whose tables
|
---|
98 | haven't already been created.
|
---|
99 | .TP
|
---|
100 | .BI "test [" "\-\-verbosity" "] [" "appname ..." "]"
|
---|
101 | Runs the test suite for the specified applications, or the entire project if
|
---|
102 | no apps are specified
|
---|
103 | .TP
|
---|
104 | .BI validate
|
---|
105 | Validates all installed models.
|
---|
106 | .SH "OPTIONS"
|
---|
107 | .TP
|
---|
108 | .I \-\-version
|
---|
109 | Show program's version number and exit.
|
---|
110 | .TP
|
---|
111 | .I \-h, \-\-help
|
---|
112 | Show this help message and exit.
|
---|
113 | .TP
|
---|
114 | .I \-\-settings=SETTINGS
|
---|
115 | Python path to settings module, e.g. "myproject.settings.main". If
|
---|
116 | this isn't provided, the DJANGO_SETTINGS_MODULE environment variable
|
---|
117 | will be used.
|
---|
118 | .TP
|
---|
119 | .I \-\-pythonpath=PYTHONPATH
|
---|
120 | Lets you manually add a directory the Python path,
|
---|
121 | e.g. "/home/djangoprojects/myproject".
|
---|
122 | .TP
|
---|
123 | .I \-\-plain
|
---|
124 | Use plain Python, not IPython, for the "shell" command.
|
---|
125 | .TP
|
---|
126 | .I \-\-noinput
|
---|
127 | Do not prompt the user for input.
|
---|
128 | .TP
|
---|
129 | .I \-\-noreload
|
---|
130 | Disable the development server's auto\-reloader.
|
---|
131 | .TP
|
---|
132 | .I \-\-verbosity=VERBOSITY
|
---|
133 | Verbosity level: 0=minimal output, 1=normal output, 2=all output.
|
---|
134 | .TP
|
---|
135 | .I \-\-adminmedia=ADMIN_MEDIA_PATH
|
---|
136 | Specifies the directory from which to serve admin media when using the development server.
|
---|
137 |
|
---|
138 | .SH "ENVIRONMENT"
|
---|
139 | .TP
|
---|
140 | .I DJANGO_SETTINGS_MODULE
|
---|
141 | In the absence of the
|
---|
142 | .BI \-\-settings
|
---|
143 | option, this environment variable defines the settings module to be read.
|
---|
144 | It should be in Python-import form, e.g. "myproject.settings".
|
---|
145 |
|
---|
146 | .SH "SEE ALSO"
|
---|
147 | Full descriptions of all these options, with examples, as well as documentation
|
---|
148 | for the rest of the Django framework, can be found on the Django site:
|
---|
149 | .sp
|
---|
150 | .I http://www.djangoproject.com/documentation/
|
---|
151 | .sp
|
---|
152 | .SH "AUTHORS/CREDITS"
|
---|
153 | Originally developed at World Online in Lawrence, Kansas, USA.
|
---|
154 | Refer to the AUTHORS file in the Django distribution for contributors.
|
---|
155 | .sp
|
---|
156 | .SH "LICENSE"
|
---|
157 | BSD license. For the full license text refer to the LICENSE file
|
---|
158 | in the Django distribution.
|
---|