I'm using Django's authentication.  I would like to add several users
through a command-line script (not through code executed via the
website).  Something like manage.py createsuperuser but for normal
users and not interactive.  I want to be able to put code like this in
a script I can run offline like manage.py:

>>> from django.contrib.auth.models import User
>>> User.objects.create_user('john', 'len...@thebeatles.com', 'johnpassword')

...but I don't know what needs to go above that code to set up the
environment to make it work.  I've started looking into how manage.py
works, but I'm getting lost in Django internals.  I'd rather not
fiddle with the database manually, since I'm not sure I know
everything I'd need to touch to keep it consistent.

Any ideas?  How do I set up the environment of a Django app offline,
in a simple command line script so that Users (or other parts of the
db) can be modified without running through a web server?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to