1 | .TH "django-admin" "1" "January 2007" "Django Project" ""
|
---|
2 | .SH "NAME"
|
---|
3 | Django \- The Web framework for perfectionists with deadlines
|
---|
4 | .br
|
---|
5 | django\-admin \- main helper script
|
---|
6 | .SH "SYNOPSIS"
|
---|
7 | .B django\-admin <
|
---|
8 | .I action
|
---|
9 | .B > [options]
|
---|
10 | .sp
|
---|
11 | .SH "DESCRIPTION"
|
---|
12 | .B Django
|
---|
13 | Developed and used over two years by a fast-moving online-news operation,
|
---|
14 | Django was designed to handle two challenges: the intensive deadlines of
|
---|
15 | a newsroom and the stringent requirements of the experienced Web developers
|
---|
16 | who wrote it. It lets you build high-performing, elegant Web applications
|
---|
17 | quickly.
|
---|
18 |
|
---|
19 | Django focuses on automating as much as possible and adhering to the DRY
|
---|
20 | principle
|
---|
21 | .sp
|
---|
22 | .B django-admin
|
---|
23 | This helper script allows you to create new projects form scratch creating
|
---|
24 | the basic directory structure for a django project. On this basic structure
|
---|
25 | a file called
|
---|
26 | .BI manage.py
|
---|
27 | will be created. This file provides an easier access to the project
|
---|
28 | specific
|
---|
29 | .I actions
|
---|
30 | by setting the
|
---|
31 | .BI DJANGO_SETTINGS
|
---|
32 | environment variable for you.
|
---|
33 | .sp
|
---|
34 | From all the
|
---|
35 | .I actions
|
---|
36 | descibed below, all are accesible from
|
---|
37 | .BI manage.py
|
---|
38 | except
|
---|
39 | .BI startproject
|
---|
40 | .sp
|
---|
41 | .SH "ACTIONS"
|
---|
42 | .TP
|
---|
43 | .BI "adminindex [" "appname ..." "]"
|
---|
44 | Prints the admin\-index template snippet for the given app name(s).
|
---|
45 | .TP
|
---|
46 | .BI "createcachetable [" "tablename" "]"
|
---|
47 | Creates the table needed to use the SQL cache backend
|
---|
48 | .TP
|
---|
49 | .B dbshell
|
---|
50 | Runs the command\-line client for the current
|
---|
51 | .BI DATABASE_ENGINE.
|
---|
52 | .TP
|
---|
53 | .B diffsettings
|
---|
54 | Displays differences between the current
|
---|
55 | .B settings.py
|
---|
56 | and Django's default settings. Settings that don't appear in the defaults are
|
---|
57 | followed by "###".
|
---|
58 | .TP
|
---|
59 | .B inspectdb
|
---|
60 | Introspects the database tables in the given database and outputs a Django
|
---|
61 | model module.
|
---|
62 | .TP
|
---|
63 | .BI "install [" "appname ..." "]"
|
---|
64 | Executes
|
---|
65 | .B sqlall
|
---|
66 | for the given app(s) in the current database.
|
---|
67 | .TP
|
---|
68 | .BI "reset [" "appname ..." "]"
|
---|
69 | Executes
|
---|
70 | .B sqlreset
|
---|
71 | for the given app(s) in the current database.
|
---|
72 | .TP
|
---|
73 | .BI "runfcgi [" "KEY=val" "] [" "KEY=val" "] " "..."
|
---|
74 | Runs this project as a FastCGI application. Requires flup. Use
|
---|
75 | .B runfcgi help
|
---|
76 | for help on the KEY=val pairs
|
---|
77 | .TP
|
---|
78 | .BI "runserver [" "\-\-noreload" "] [" "\-\-adminmedia=ADMIN_MEDIA_PATH" "] [" "port|ipaddr:port" "]"
|
---|
79 | Starts a lightweight Web server for development.
|
---|
80 | .TP
|
---|
81 | .BI "shell [" "\-\-plain" "]"
|
---|
82 | Runs a Python interactive interpreter. Tries to use IPython, if it's available.
|
---|
83 | .TP
|
---|
84 | .BI "sql [" "appname ..." "]"
|
---|
85 | Prints the CREATE TABLE SQL statements for the given app name(s).
|
---|
86 | .TP
|
---|
87 | .BI "sqlall [" "appname ..." "]"
|
---|
88 | Prints the CREATE TABLE, initial\-data and CREATE INDEX SQL statements for the
|
---|
89 | given model module name(s).
|
---|
90 | .TP
|
---|
91 | .BI "sqlclear [" "appname ..." "]"
|
---|
92 | Prints the DROP TABLE SQL statements for the given app name(s).
|
---|
93 | .TP
|
---|
94 | .BI "sqlindexes [" "appname ..." "]"
|
---|
95 | Prints the CREATE INDEX SQL statements for the given model module name(s).
|
---|
96 | .TP
|
---|
97 | .BI "sqlinitialdata [" "appname ..." "]"
|
---|
98 | Prints the initial INSERT SQL statements for the given app name(s).
|
---|
99 | .TP
|
---|
100 | .BI "sqlreset [" "appname ..." "]"
|
---|
101 | Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app
|
---|
102 | name(s).
|
---|
103 | .TP
|
---|
104 | .BI "sqlsequencereset [" "appname ..." "]"
|
---|
105 | Prints the SQL statements for resetting PostgreSQL sequences for the
|
---|
106 | given app name(s).
|
---|
107 | .TP
|
---|
108 | .BI "startapp [" "appname" "]"
|
---|
109 | Creates a Django app directory structure for the given app name in
|
---|
110 | the current directory.
|
---|
111 | .TP
|
---|
112 | .BI "startproject [" "projectname" "]"
|
---|
113 | Creates a Django project directory structure for the given project name
|
---|
114 | in the current directory.
|
---|
115 | .TP
|
---|
116 | .BI syncdb
|
---|
117 | Creates the database tables for all apps in INSTALLED_APPS whose tables
|
---|
118 | haven't already been created.
|
---|
119 | .TP
|
---|
120 | .BI "test [" "\-\-verbosity" "] [" "appname ..." "]"
|
---|
121 | Runs the test suite for the specified applications, or the entire site if
|
---|
122 | no apps are specified
|
---|
123 | .TP
|
---|
124 | .BI validate
|
---|
125 | Validates all installed models.
|
---|
126 | .SH "OPTIONS"
|
---|
127 | .TP
|
---|
128 | .I \-\-version
|
---|
129 | show program's version number and exit
|
---|
130 | .TP
|
---|
131 | .I \-h, \-\-help
|
---|
132 | show this help message and exit
|
---|
133 | .TP
|
---|
134 | .I \-\-settings=SETTINGS
|
---|
135 | Python path to settings module, e.g. "myproject.settings.main". If
|
---|
136 | this isn't provided, the DJANGO_SETTINGS_MODULE environment variable
|
---|
137 | will be used.
|
---|
138 | .TP
|
---|
139 | .I \-\-pythonpath=PYTHONPATH
|
---|
140 | Lets you manually add a directory the Python path,
|
---|
141 | e.g. "/home/djangoprojects/myproject".
|
---|
142 | .TP
|
---|
143 | .I \-\-plain
|
---|
144 | Tells Django to use plain Python, not IPython, for "shell" command.
|
---|
145 | .TP
|
---|
146 | .I \-\-noinput
|
---|
147 | Tells Django to NOT prompt the user for input of any kind.
|
---|
148 | .TP
|
---|
149 | .I \-\-noreload
|
---|
150 | Tells Django to NOT use the auto\-reloader when running the development
|
---|
151 | server.
|
---|
152 | .TP
|
---|
153 | .I \-\-verbosity=VERBOSITY
|
---|
154 | Verbosity level; 0=minimal output, 1=normal output, 2=all output
|
---|
155 | .TP
|
---|
156 | .I \-\-adminmedia=ADMIN_MEDIA_PATH
|
---|
157 | Specifies the directory from which to serve admin media for runserver.
|
---|
158 | .SH "SEE ALSO"
|
---|
159 | .B Django
|
---|
160 | has a comprehensive documentation on it's website, a community driven
|
---|
161 | Wiki and some mailling-lists. Try them!
|
---|
162 | .sp
|
---|
163 | .I http://www.djangoproject.com/documentation/
|
---|
164 | .SH "FILES"
|
---|
165 | .TP
|
---|
166 | .I settings.py
|
---|
167 | Project speciffic settings, this file resides on the top directory of your
|
---|
168 | project, it is created by
|
---|
169 | .BI "django-admin" "startproject"
|
---|
170 | .SH "AUTHORS/CREDITS"
|
---|
171 | .B Django
|
---|
172 | was developed at World Online the Web department of a newspaper in Lawrence,
|
---|
173 | Kansas, USA. And released as Open Source.
|
---|
174 | .sp
|
---|
175 | Django has the policy of not putting author names on it's source files, hence
|
---|
176 | this manpage was written by the "Django Developers".
|
---|