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
        email: ad...@myapp.com
        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!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/rLEjHGseMZ8J.
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