7
``lava-server`` is a command-line management interface to a LAVA instance,
8
and the Django database management tools for that instance.
13
lava-server manage subcommand [options] [args]
18
Most of these options are imported from ``django`` or ``south`` and more
19
information can be found in the documentation of those projects.
21
These options are supported for all subcommands.
23
-v VERBOSITY, --verbosity=VERBOSITY
24
Verbosity level; 0=minimal output, 1=normal output,
25
2=verbose output, 3=very verbose output
26
--settings=SETTINGS The Python path to a settings module, e.g.
27
"myproject.settings.main". If this isn't provided, the
28
DJANGO_SETTINGS_MODULE environment variable will be
30
--pythonpath=PYTHONPATH
31
A directory to add to the Python path, e.g.
32
"/home/djangoprojects/myproject".
33
--traceback Print traceback on exception
34
--version show program's version number and exit
35
-h, --help show this help message and exit
40
Type ``lava-server manage help <subcommand>`` for help on a specific subcommand.
47
Change a user's password for django.contrib.auth.
50
lava-server manage changepassword [options]
52
--database=DATABASE Specifies the database to use. Default is "default".
55
Used to create a superuser.
58
lava-server manage createsuperuser [options]
60
--username=USERNAME Specifies the username for the superuser.
61
--email=EMAIL Specifies the email address for the superuser.
62
--noinput Tells Django to NOT prompt the user for input of any
63
kind. You must use ``--username`` and ``--email`` with
64
``--noinput`` and superusers created with ``--noinput`` will
65
not be able to log in until they are given a valid
67
--database=DATABASE Specifies the database to use. Default is **default**.
71
Can be run as a cronjob or directly to clean out old data from the
72
database (only expired sessions at the moment).
75
lava-server manage cleanup [options]
78
Compiles .po files to .mo files for use with builtin gettext support.
81
lava-server manage compilemessages [options]
83
-l LOCALE, --locale=LOCALE
84
The locale to process. Default is to process all.
86
Creates the table needed to use the SQL cache backend.
89
lava-server manage createcachetable [options] <tablename>
91
--database=DATABASE Nominates a database onto which the cache table will
92
be installed. Defaults to the "default" database.
95
Runs the command-line client for specified database, or the default database if none is provided.
98
lava-server manage dbshell [options]
100
--database=DATABASE Nominates a database onto which to open a shell.
101
Defaults to the "default" database.
104
Displays differences between the current settings.py and the
105
Django default settings. Settings that do not appear in the
106
defaults are followed by "###".
109
lava-server manage diffsettings [options]
112
Output the contents of the database as a fixture of the given
113
format (using each model's default manager unless ``--all`` is specified).
116
lava-server manage dumpdata [options] [appname appname.ModelName ...]
119
--format=FORMAT Specifies the output serialization format for
121
--indent=INDENT Specifies the indent level to use when pretty-printing
123
--database=DATABASE Nominates a specific database to dump fixtures from.
124
Defaults to the "default" database.
125
-e EXCLUDE, --exclude=EXCLUDE
126
An appname or appname.ModelName to exclude (use
127
multiple --exclude to exclude multiple apps/models).
128
-n, --natural Use natural keys if they are available.
129
-a, --all Use Django's base manager to dump all models stored in
130
the database, including those that would otherwise be
131
filtered or modified by a custom manager.
134
Returns the database to the state it was in immediately after
135
syncdb was executed. This means that all data will be removed from
136
the database, any post-synchronization handlers will be re-executed
137
and the initial_data fixture will be re-installed.
140
lava-server manage flush [options]
142
--noinput Tells Django to NOT prompt the user for input of any
144
--database=DATABASE Nominates a database to flush. Defaults to the
148
Introspects the database tables in the given database and outputs
149
a Django model module.
152
lava-server manage inspectdb [options]
154
--database=DATABASE Nominates a database to introspect. Defaults to using
155
the "default" database.
158
Installs the named fixture(s) in the database.
161
lava-server manage loaddata [options] fixture [fixture ...]
164
--database=DATABASE Nominates a specific database to load fixtures into.
165
Defaults to the "default" database.
169
Runs over the entire source tree of the current directory and
170
pulls out all strings marked for translation. It creates (or
171
updates) a message file in the conf/locale (in the django tree)
172
or locale (for projects and applications) directory.
175
lava-server manage makemessages [options]
178
-l LOCALE, --locale=LOCALE
179
Creates or updates the message files for the given
181
-d DOMAIN, --domain=DOMAIN
182
The domain of the message files (default: "django").
183
-a, --all Updates the message files for all existing locales.
184
-e EXTENSIONS, --extension=EXTENSIONS
185
The file extension(s) to examine (default: "html,txt",
186
or "js" if the domain is "djangojs"). Separate
187
multiple extensions with commas, or use -e multiple
189
-s, --symlinks Follows symlinks to directories when examining source
190
code and templates for translation strings.
191
-i PATTERN, --ignore=PATTERN
192
Ignore files or directories matching this glob-style
193
pattern. Use multiple times to ignore more.
194
--no-default-ignore Don't ignore the common glob-style patterns ``'CVS'``,
195
``'.*'`` and ``'*~'``.
196
--no-wrap Don't break long message lines into several lines
197
--no-location Don't write '#: filename:line' lines
198
--no-obsolete Remove obsolete message strings
201
Executes ``sqlreset`` for the given app(s) in the current database.
204
lava-server manage reset [options] [appname ...]
206
--noinput Tells Django to NOT prompt the user for input of any
208
--database=DATABASE Nominates a database to reset. Defaults to the
212
Run this project as a fastcgi (or some other protocol supported
213
by flup) application. To do this, the flup package from
214
http://www.saddi.com/software/flup/ is required.
217
lava-server manage runfcgi [options] [fcgi settings]
220
See the django documentation for information on this option.
223
Runs a Python interactive interpreter. Tries to use IPython, if it's available.
226
lava-server manage shell [options]
229
--plain Tells Django to use plain Python, not IPython.
233
Prints the CREATE TABLE SQL statements for the given app name(s).
236
lava-server manage sql [options] <appname appname ...>
239
--database=DATABASE Nominates a database to print the SQL for.
240
Defaults to the "default" database.
244
Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL statements
245
for the given model module name(s).
248
lava-server manage sqlall [options] <appname appname ...>
251
--database=DATABASE Nominates a database to print the SQL for.
252
Defaults to the "default" database.
255
Prints the DROP TABLE SQL statements for the given app name(s).
258
lava-server manage sqlclear [options] <appname appname ...>
261
--database=DATABASE Nominates a database to print the SQL for.
262
Defaults to the "default" database.
266
Prints the custom table modifying SQL statements for the given app name(s).
269
lava-server manage sqlcustom [options] <appname appname ...>
272
--database=DATABASE Nominates a database to print the SQL for.
273
Defaults to the "default" database.
276
Returns a list of the SQL statements required to return all tables
277
in the database to the state they were in just after they were installed.
280
lava-server manage sqlflush [options]
283
--database=DATABASE Nominates a database to print the SQL for.
284
Defaults to the "default" database.
287
Prints the CREATE INDEX SQL statements for the given model module name(s).
290
lava-server manage sqlindexes [options] <appname appname ...>
293
--database=DATABASE Nominates a database to print the SQL for.
294
Defaults to the "default" database.
297
RENAMED: see ``sqlcustom``
300
Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).
303
lava-server manage sqlreset [options] <appname appname ...>
306
--database=DATABASE Nominates a database to print the SQL for.
307
Defaults to the "default" database.
310
Prints the SQL statements for resetting sequences for the given app name(s).
313
lava-server manage sqlsequencereset [options] <appname appname ...>
316
--database=DATABASE Nominates a database to print the SQL for.
317
Defaults to the "default" database.
319
Creates a Django app directory structure for the given app name
320
in the current directory or optionally in the given directory.
323
lava-server manage startapp [options] [name] [optional destination directory]
326
--template=TEMPLATE The dotted import path to load the template from.
327
-e EXTENSIONS, --extension=EXTENSIONS
328
The file extension(s) to render (default: "py").
329
Separate multiple extensions with commas, or use -e
331
-n FILES, --name=FILES
332
The file name(s) to render. Separate multiple
333
extensions with commas, or use -n multiple times.
335
Creates a Django project directory structure for the given project
336
name in the current directory or optionally in the given directory.
339
lava-server manage startproject [options] [name] [optional destination directory]
342
--template=TEMPLATE The dotted import path to load the template from.
343
-e EXTENSIONS, --extension=EXTENSIONS
344
The file extension(s) to render (default: "py").
345
Separate multiple extensions with commas, or use -e
347
-n FILES, --name=FILES
348
The file name(s) to render. Separate multiple
349
extensions with commas, or use -n multiple times.
352
Validates all installed models.
355
lava-server manage validate [options]
359
Clean up stale OpenID associations and nonces
362
lava-server manage openid_cleanup [options]
366
Run the LAVA test job scheduler
369
lava-server manage scheduler [options]
371
--use-fake Use fake dispatcher (for testing)
372
--dispatcher=DISPATCHER
373
Dispatcher command to invoke
376
Run the LAVA test job scheduler
379
lava-server manage schedulermonitor [options]
382
-l LOGLEVEL, --loglevel=LOGLEVEL
383
Log level, default is taken from settings.
384
-f LOGFILE, --logfile=LOGFILE
385
Path to log file, default is taken from settings.
388
Fill out results_bundle on old testjobs.
391
lava-server manage testjobmigrate [options]
395
Quickly converts the named application to use South if it is currently using syncdb.
398
lava-server manage convert_to_south [options]
400
--delete-ghost-migrations
401
Tells South to delete any 'ghost' migrations (ones in
402
the database but not on disk).
403
--ignore-ghost-migrations
404
Tells South to ignore any 'ghost' migrations (ones in
405
the database but not on disk) and continue to apply
409
Creates a new template data migration for the given app
412
lava-server manage datamigration [options]
415
--freeze=FREEZE_LIST Freeze the specified app(s). Provide an app name with
416
each; use the option multiple times for multiple apps
417
--stdout Print the migration to stdout instead of writing it to
421
Outputs a GraphViz dot file of all migration dependencies to stdout.
424
lava-server manage graphmigrations [options]
427
Runs migrations for all apps.
430
lava-server manage migrate [options] [appname]
431
[migrationname|zero] [--all] [--list] [--skip] [--merge]
432
[--no-initial-data] [--fake] [--db-dry-run] [--database=dbalias]
435
--all Run the specified migration for all apps.
436
--list List migrations noting those that have been applied
437
--changes List changes for migrations
438
--skip Will skip over out-of-order missing migrations
439
--merge Will run out-of-order missing migrations as they are -
441
--no-initial-data Skips loading initial data if specified.
442
--fake Pretends to do the migrations, but doesn't actually
444
--db-dry-run Doesn't execute the SQL generated by the db methods,
445
and doesn't store a record that the migration(s)
446
occurred. Useful to test migrations before applying
448
--delete-ghost-migrations
449
Tells South to delete any 'ghost' migrations (ones in
450
the database but not on disk).
451
--ignore-ghost-migrations
452
Tells South to ignore any 'ghost' migrations (ones in
453
the database but not on disk) and continue to apply
455
--noinput Tells Django to NOT prompt the user for input of any
457
--database=DATABASE Nominates a database to synchronize. Defaults to the
461
Runs migrations for each app in turn, detecting missing depends_on values.
464
lava-server manage migrationcheck [options]
467
Creates a new template schema migration for the given app
470
lava-server manage schemamigration [options]
472
--freeze=FREEZE_LIST Freeze the specified app(s). Provide an app name with
473
each; use the option multiple times for multiple apps
474
--stdout Print the migration to stdout instead of writing it to
476
--add-model=ADDED_MODEL_LIST
477
Generate a Create Table migration for the specified
478
model. Add multiple models to this migration with
479
subsequent --model parameters.
480
--add-field=ADDED_FIELD_LIST
481
Generate an Add Column migration for the specified
482
modelname.fieldname - you can use this multiple times
483
to add more than one column.
484
--add-index=ADDED_INDEX_LIST
485
Generate an Add Index migration for the specified
486
modelname.fieldname - you can use this multiple times
487
to add more than one column.
488
--initial Generate the initial schema for the app.
489
--auto Attempt to automatically detect differences from the
491
--empty Make a blank migration.
497
Create the database tables for all apps in INSTALLED_APPS whose
498
tables have not already been created, except those which use
502
lava-server manage syncdb [options]
504
--noinput Tells Django to NOT prompt the user for input of any
506
--database=DATABASE Nominates a database to synchronize. Defaults to the
508
--migrate Tells South to also perform migrations after the sync.
509
Default for during testing, and other internal calls.
510
--all Makes syncdb work on all apps, even migrated ones. Be
514
Runs the test suite for the specified applications, or the entire site if no apps are specified.
517
lava-server manage test [options] [appname ...]
519
--noinput Tells Django to NOT prompt the user for input of any
521
--failfast Tells Django to stop running the test suite after
523
--testrunner=TESTRUNNER
524
Tells Django to use specified test runner class
525
instead of the one specified by the TEST_RUNNER
527
--liveserver=LIVESERVER
528
Overrides the default address where the live server
529
(used with LiveServerTestCase) is expected to run
530
from. The default value is localhost:8081.
533
Runs a development server with data from the given fixture(s).
536
lava-server manage testserver [options] [fixture ...]
538
--noinput Tells Django to NOT prompt the user for input of any
540
--addrport=ADDRPORT port number or ipaddr:port to run the server on
541
-6, --ipv6 Tells Django to use a IPv6 address.
545
Collect static files in a single location.
548
lava-server manage collectstatic [options]
550
--noinput Do NOT prompt the user for input of any kind.
551
--no-post-process Do NOT post process collected files.
552
-i PATTERN, --ignore=PATTERN
553
Ignore files or directories matching this glob-style
554
pattern. Use multiple times to ignore more.
555
-n, --dry-run Do everything except modify the filesystem.
556
-c, --clear Clear the existing files using the storage before
557
trying to copy or link the original file.
558
-l, --link Create a symbolic link to each file instead of
560
--no-default-ignore Don't ignore the common private glob-style patterns
561
``'CVS'``, ``'.*'`` and ``'*~'``.
564
Finds the absolute paths for the given static file(s).
566
Usage: lava-server manage findstatic [options] [file ...]
569
--first Only return the first match for each static file.
572
Starts a lightweight Web server for development and also serves static files.
575
lava-server manage runserver [options] [optional port number, or ipaddr:port]
577
-6, --ipv6 Tells Django to use a IPv6 address.
578
--nothreading Tells Django to NOT use threading.
579
--noreload Tells Django to NOT use the auto-reloader.
580
--nostatic Tells Django to NOT automatically serve static files
582
--insecure Allows serving static files even if DEBUG is False.