Changes between Version 2 and Version 3 of CookBookScriptsNoSuperUserSyncdb
- Timestamp:
- Sep 14, 2006, 7:52:16 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookScriptsNoSuperUserSyncdb
v2 v3 1 1 = How to run {{{manage.py syncdb}}} without being prompted to create a superuser = 2 2 3 '''This applies only to post-magic-removal versions of Django.''' 3 '''This applies only to post-magic-removal versions of Django, pre [3660].''' 4 5 In [3660] or greater, the problem described on this page can be solved by providing the ``--noinput`` argument to ``./manage.py``, or by calling ``management.syncdb(interactive=False)``. 6 7 '''Disable the signal''' 4 8 5 9 In my project I found it annoying being prompted to create a superuser everytime I ran {{{manage.py syncdb}}} or from my custom installation script {{{management.syncdb()}}}. Delving a little deeper I found that I could disable this by "disconnecting" {{{django.contrib.auth.mangement.create_superuser}}} from the new event dispatcher in Django. … … 35 39 36 40 Above code will create superuser based on the {{{settings}}} of your project. 41