PageRenderTime 31ms CodeModel.GetById 27ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/man/django-admin.1

https://code.google.com/p/mango-py/
Unknown | 238 lines | 236 code | 2 blank | 0 comment | 0 complexity | ff7a0c35694071b30e9508f2c3800ab3 MD5 | raw file
  1.TH "django-admin.py" "1" "March 2008" "Django Project" ""
  2.SH "NAME"
  3django\-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"
 10This utility script provides commands for creation and maintenance of Django
 11projects and apps.
 12.sp
 13With the exception of
 14.BI startproject,
 15all commands listed below can also be performed with the
 16.BI manage.py
 17script found at the top level of each Django project directory.
 18.sp
 19.SH "ACTIONS"
 20.TP
 21.BI cleanup
 22Cleans out old data from the database (only expired sessions at the moment).
 23.TP
 24.BI "compilemessages [" "\-\-locale=LOCALE" "]"
 25Compiles .po files to .mo files for use with builtin gettext support.
 26.TP
 27.BI "createcachetable [" "tablename" "]"
 28Creates the table needed to use the SQL cache backend
 29.TP
 30.BI "createsuperuser [" "\-\-username=USERNAME" "] [" "\-\-email=EMAIL" "]"
 31Creates a superuser account (a user who has all permissions).
 32.TP
 33.B dbshell
 34Runs the command\-line client for the specified
 35.BI database ENGINE.
 36.TP
 37.B diffsettings
 38Displays differences between the current
 39.B settings.py
 40and Django's default settings. Settings that don't appear in the defaults are
 41followed by "###".
 42.TP
 43.BI "dumpdata [" "\-\-all" "] [" "\-\-format=FMT" "] [" "\-\-indent=NUM" "] [" "\-\-natural=NATURAL" "] [" "appname appname appname.Model ..." "]"
 44Outputs to standard output all data in the database associated with the named
 45application(s).
 46.TP
 47.BI flush
 48Returns the database to the state it was in immediately after syncdb was
 49executed.
 50.TP
 51.B inspectdb
 52Introspects the database tables in the database specified in settings.py and outputs a Django
 53model module.
 54.TP
 55.BI "loaddata [" "fixture fixture ..." "]"
 56Searches for and loads the contents of the named fixture into the database.
 57.TP
 58.BI "install [" "appname ..." "]"
 59Executes
 60.B sqlall
 61for the given app(s) in the current database.
 62.TP
 63.BI "makemessages [" "\-\-locale=LOCALE" "] [" "\-\-domain=DOMAIN" "] [" "\-\-extension=EXTENSION" "] [" "\-\-all" "] [" "\-\-symlinks" "] [" "\-\-ignore=PATTERN" "] [" "\-\-no\-default\-ignore" "] [" "\-\-no\-wrap" "]"
 64Runs over the entire source tree of the current directory and pulls out all
 65strings marked for translation. It creates (or updates) a message file in the
 66conf/locale (in the django tree) or locale (for project and application) directory.
 67.TP
 68.BI "reset [" "appname ..." "]"
 69Executes
 70.B sqlreset
 71for the given app(s) in the current database.
 72.TP
 73.BI "runfcgi [" "KEY=val" "] [" "KEY=val" "] " "..."
 74Runs this project as a FastCGI application. Requires flup. Use
 75.B runfcgi help
 76for help on the KEY=val pairs.
 77.TP
 78.BI "runserver [" "\-\-noreload" "] [" "\-\-nostatic" "] [" "\-\-insecure" "] [" "\-\-ipv6" "] [" "\-\-adminmedia=ADMIN_MEDIA_PATH" "] [" "port|ipaddr:port" "]"
 79Starts a lightweight Web server for development.
 80.TP
 81.BI "shell [" "\-\-plain" "]"
 82Runs a Python interactive interpreter. Tries to use IPython, if it's available.
 83The
 84.BI \-\-plain
 85option forces the use of the standard Python interpreter even when IPython is
 86installed.
 87.TP
 88.BI "sql [" "appname ..." "]"
 89Prints the CREATE TABLE SQL statements for the given app name(s).
 90.TP
 91.BI "sqlall [" "appname ..." "]"
 92Prints the CREATE TABLE, initial\-data and CREATE INDEX SQL statements for the
 93given model module name(s).
 94.TP
 95.BI "sqlclear [" "appname ..." "]"
 96Prints the DROP TABLE SQL statements for the given app name(s).
 97.TP
 98.BI "sqlcustom [" "appname ..." "]"
 99Prints the custom SQL statements for the given app name(s).
100.TP
101.BI "sqlflush [" "appname ..." "]"
102Prints the SQL statements that would be executed for the "flush" 
103command.
104.TP
105.BI "sqlindexes [" "appname ..." "]"
106Prints the CREATE INDEX SQL statements for the given model module name(s).
107.TP
108.BI "sqlinitialdata [" "appname ..." "]"
109Prints the initial INSERT SQL statements for the given app name(s).
110.TP
111.BI "sqlreset [" "appname ..." "]"
112Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app
113name(s).
114.TP
115.BI "sqlsequencereset [" "appname ..." "]"
116Prints the SQL statements for resetting PostgreSQL sequences for the
117given app name(s).
118.TP
119.BI "startapp [" "appname" "]"
120Creates a Django app directory structure for the given app name in
121the current directory.
122.TP
123.BI "startproject [" "projectname" "]"
124Creates a Django project directory structure for the given project name
125in the current directory.
126.TP
127.BI syncdb
128Creates the database tables for all apps in INSTALLED_APPS whose tables
129haven't already been created.
130.TP
131.BI "test [" "\-\-verbosity" "] [" "\-\-failfast" "] [" "appname ..." "]"
132Runs the test suite for the specified applications, or the entire project if
133no apps are specified
134.TP
135.BI "testserver [" "\-\-addrport=ipaddr|port" "] [" "fixture fixture ..." "]"
136Runs the test suite for the specified applications, or the entire project if
137no apps are specified
138.TP
139.BI validate
140Validates all installed models.
141.SH "OPTIONS"
142.TP
143.I \-\-version
144Show program's version number and exit.
145.TP
146.I \-h, \-\-help
147Show this help message and exit.
148.TP
149.I \-\-settings=SETTINGS
150Python path to settings module, e.g. "myproject.settings.main". If
151this isn't provided, the DJANGO_SETTINGS_MODULE environment variable
152will be used.
153.TP
154.I \-\-pythonpath=PYTHONPATH
155Lets you manually add a directory the Python path,
156e.g. "/home/djangoprojects/myproject".
157.TP
158.I \-\-plain
159Use plain Python, not IPython, for the "shell" command.
160.TP
161.I \-\-noinput
162Do not prompt the user for input.
163.TP
164.I \-\-noreload
165Disable the development server's auto\-reloader.
166.TP
167.I \-\-nostatic
168Disable automatic serving of static files from STATIC_URL.
169.TP
170.I \-\-insecure
171Enables serving of static files even if DEBUG is False.
172.TP
173.I \-\-ipv6
174Enables IPv6 addresses.
175.TP
176.I \-\-verbosity=VERBOSITY
177Verbosity level: 0=minimal output, 1=normal output, 2=all output.
178.TP
179.I \-\-adminmedia=ADMIN_MEDIA_PATH
180Specifies the directory from which to serve admin media when using the development server.
181.TP
182.I \-\-traceback
183By default, django-admin.py will show a simple error message whenever an
184error occurs. If you specify this option, django-admin.py  will
185output a full stack trace whenever an exception is raised.
186.TP
187.I \-l, \-\-locale=LOCALE
188The locale to process when using makemessages or compilemessages.
189.TP
190.I \-d, \-\-domain=DOMAIN
191The domain of the message files (default: "django") when using makemessages.
192.TP
193.I \-e, \-\-extension=EXTENSION
194The file extension(s) to examine (default: ".html", separate multiple
195extensions with commas, or use -e multiple times).
196.TP
197.I \-s, \-\-symlinks
198Follows symlinks to directories when examining source code and templates for
199translation strings.
200.TP
201.I \-i, \-\-ignore=PATTERN
202Ignore files or directories matching this glob-style pattern. Use multiple
203times to ignore more.
204.TP
205.I \-\-no\-default\-ignore
206Don't ignore the common private glob-style patterns 'CVS', '.*' and '*~'.
207.TP
208.I \-\-no\-wrap
209Don't break long message lines into several lines.
210.TP
211.I \-a, \-\-all
212Process all available locales when using makemessages..SH "ENVIRONMENT"
213.TP
214.I DJANGO_SETTINGS_MODULE
215In the absence of the
216.BI \-\-settings
217option, this environment variable defines the settings module to be read.
218It should be in Python-import form, e.g. "myproject.settings".
219.I \-\-database=DB
220Used to specify the database on which a command will operate. If not
221specified, this option will default to an alias of "default".
222.TP
223
224.SH "SEE ALSO"
225Full descriptions of all these options, with examples, as well as documentation
226for the rest of the Django framework, can be found on the Django site:
227.sp
228.I http://docs.djangoproject.com/en/dev/
229.sp
230or in the distributed documentation.
231.SH "AUTHORS/CREDITS"
232Originally developed at World Online in Lawrence, Kansas, USA. Refer to the
233AUTHORS file in the Django distribution for contributors.
234.sp
235.SH "LICENSE"
236New BSD license. For the full license text refer to the LICENSE file in the
237Django distribution.
238