Other commands - zamaniamin/python GitHub Wiki

Django shell (Run projet code direclty)

python manage.py shell

example of code to run in the shell:

>>> from app_name.models import User
>>> user1 = User.objects.first()

Prepare static folders for production

python manage.py collectstatic

Take all data from app blog and export in json

python manage.py dumpdata blog >myapp.json

Take all data in json file and import in app data table

python manage.py loaddata myapp.json