I'm investigating this as well. I just read that using the natural
keys dumpdata option might help.

https://docs.djangoproject.com/en/dev/topics/serialization/#topics-serialization-natural-keys

On Oct 28, 9:48 am, ycseattle <[email protected]> wrote:
> Hi,
>
> In my application, I have fixed groups (like admin, staff, subscribers)
> etc, and this data in auth_groups is not intended to change in the program,
> so I am loading them in initial_data.json. I also want to load data into
> auth_group_permissions as the application is not expected to change it. The
> problem is that I noticed the table auth_permissions is generated by
> Django, so the permissions IDs will be dynamic (especially when I add new
> models as it seems the permissions are ordered by the model names). Is
> there a way to load my definition of group permissions through
> initial_data.json, or am I stuck with running a piece of code to do this?
>
> Thanks,
> Yi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to