On Sat, Aug 1, 2009 at 5:38 PM, Mirat Can Bayrak<miratcanbay...@gmail.com> wrote: > > i am playing a lot with my models in my project nowadays. On every change i > am deleting my sqlite3 file and running syncdb again.. its ok but creating a > admin user in every syncdb is booored me. is there any way to give django a > inital user with username : admin, and pass : admin ?
Yes. What you do is exploit the initial_data fixture loading of Django. 1. Run "./manage.py syncdb", and create your admin user. 2. Run "./manage.py dumpdata auth --indent=2 > initial_data.json" 3. Edit initial_data.json and delete everything _except_ the reference to the admin user you want. You may also need to clean out the 'user_permissions' entry for the admin user. Now, whenever your drop your database and resynchronize, the admin user will be re-created. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---