Welcome | Get started | Dive into Lino | Contribute | Topics | Reference | More

About django-admin commands

Lino applications are Django projects. Here is some more Django know-how you should know as a Lino developer.

The manage.py file in every demo project is the standard Django interface for running a so-called django-admin command, also known as "admin command" or "django-admin command". If you did't know that, please read django-admin.py and manage.py.

Here are some standard django-admin commands that you should know.

shell

Start an interactive Python session on the application defined by the settings.py file. See the Django documentation

runserver

Start a web server which "runs" the application defined by the settings.py. See the Django documentation

dumpdata

Output all data in the database (or some tables) to a serialized stream. Serialization formats include json or xml. The default will write to stdout, but you usually redirect this into a file. See the Django documentation

With a Lino application you will probably prefer pm dump2py.

flush

Removes all data from the database and re-executes any post-synchronization handlers. The migrations history is not cleared. If you would rather start from an empty database and re-run all migrations, you should drop and recreate the database and then run migrate instead. See the Django documentation

With a Lino application you will probably prefer initdb or pm prep.

loaddata

Loads the contents of the named fixtures into the database. See the Django documentation.

With a Lino application you will probably prefer initdb or pm prep.

migrate

Updates the database schema.

With a Lino application you will probably prefer pm dump2py as explained in Data migrations à la Lino.