How can I loaddata for default list of users, when I syncdb ?
+1
A:
What I do.
Create users manually.
Do a
dumpdata
for theauth.users
table.After doing syncdb, do a
loaddata
for the dumped users.
It's not totally "automatic" because -- in the long run -- totally automatic is a terrible idea. Most syncdb
operations involve database changes that also require you preserve some legacy data, perhaps dropping tables, and doing other "schema migration" steps. Each time it involves something special. So "total automation" rarely works out well.
S.Lott
2010-05-19 10:13:37
Note: when running `syncdb` all fixtures named `initial_data.format` found in apps `fixtures` directory are loaded (where "format" is either json, xml etc.). If your fixtures are named other then initial_data you need to explicity load them using `loaddata` command.
rebus
2010-05-19 10:19:28
Thanks I got the solution I was using plain text pwd to dump data and so was not able to login using demo data - but dumpdata showed me sha1 encrypted text ! thanks its working now.
Tumbleweed
2010-05-19 10:27:02