Manage:¶
startapp {name}¶
Flags: -t (–templates) create app folder in templates -st (–static) create app folder in static
Creates a folder {name} with forms, models, urls, views .py files
runserver¶
Runs your project
db {method}¶
init¶
Initializes database, should be runed before the first migration
migrate¶
Models migration.
Put all models in the models list before you start.
# {project}/config.py
# add your file containing models
models = [
]
...
upgrade¶
Upgrades your database
downgrade¶
Rollback to a previous migration
add custom methods¶
# manage.py
... manage.py default code
@manage.manager.command
def my_command(params):
pass