Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Automigrate, autocreatesuperuser if not User.count() in runserver and use manage.py:main as entrypoint

With this awesome manage.py, it will try to migrate first when called with runserver.

Also, this manege.py has super power to be used in your entry point as such:

entry_points = {
    'console_scripts': [
        # u haz a setup.py -> u haz importable module :) 
        'yourcommand = yourproject.manage:main',

Example output:

$ yourcommand ...

Don't be the product, buy the product!