Login

Snippets by givity

Snippet List

manage.py reboot

1) Simply create a "management/commands" folder in one of your INSTALLED_APPS folders. Then add a "reboot.py" file in your "management/commands" 2) In settings.py, you can OPTIONALLY add: PROJECT_NAME = 'Blah' PROJECT_DOMAIN = 'blah.com' These two settings will be used to create a "Site" object as well as a superuser. If you choose not to use these settings, the reboot command simply reverts to using your DATABASES[default] username as superuser. 3) Execute the command via "python manage.py reboot" Enjoy.

  • runserver
  • setup superuser
  • recreate database
  • install fixtures
Read More

givity has posted 1 snippet.