Hi,
So I have the following directories:
myproject
myproject
accounts
fixtures
initial_data.yaml
Now, inside accounts, I have a class called UserProfile. In the fixtures directory, I added initial_data.yaml, but it is not working. Basically, I want to create a default admin user everything time I do syncdb, and attach a userprofile to it. I need that because one of my field can't be empty, and whenever I do the first syncdb, it always crashes (since I added the automatic profile creation to the user).
- model: auth_user
pk: 1
fields:
username: admin
first_name: App
last_name: Administrator
password: passWordlol
is_staff: 1
is_active: 1
is_superuser: 1
- model: accounts.UserProfile
pk: 1
fields:
user_id: 1
employer_number: 0
What is wrong with that?!
Thanks!