djangosnippets.org: Latest snippets tagged with 'managepy'https://djangosnippets.org/tags/managepy_1/2017-09-17T16:29:15.499988-05:00Automigrate, autocreatesuperuser if not User.count() in runserver and use manage.py:main as entrypoint
2017-09-17T16:29:15.499988-05:00jpichttps://djangosnippets.org/snippets/10622/<p>With this awesome manage.py, it will try to migrate first when called with runserver.</p>
<p>Also, this manege.py has super power to be used in your entry point as such:</p>
<pre><code>entry_points = {
'console_scripts': [
# u haz a setup.py -> u haz importable module :)
'yourcommand = yourproject.manage:main',
],
}, …</code></pre>
Freely redistributable