﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23582	Django 1.7 initial data can't relies on other apps one.	Nicals	nobody	"In django 1.7, we are told to create initial data using datamigrations instead of fixtures.

But if those initial data depends on other initial data that are created during a post_migrate signal catch we can't access them. Same thing if I need to relies on other apps initial data create on a datamigration : I never know in which order these data are created.

A typical scenario I'm facing:

I need a group spam_user_group that have some django.contrib.admin autogenerated permission in it. I can't relly on python script in datamigration to fetch the Permission I need because their are created within a post_migrate signal.

If I try to create those migrations in my own post_migrate signal handler, I can't be sure that my script will be executed after django.contrib.admin ones.

---


Maybe I've misunderstood the documentation about this point, but after a lot of tries and fails I couldn't find a clean way to achieve the scenario I'm presenting here. Maybe this tickets is not a bug, but in this case some documentation about that is to be added."	Cleanup/optimization	new	Documentation	1.7	Normal		initial data,migrations		Accepted	0	0	0	0	0	0
