I would like to know this also.  Can anyone provide an example of how to do 
this in 1.7?  The doc leaves a lot to the imagination.  I'd be willing to 
help update the docs if there's guidance on what the official "sanctioned" 
approach is to replicate the same functionality, that behaves like the 
initial_data files.

On Saturday, April 26, 2014 1:51:41 PM UTC-7, Tim Chase wrote:
>
> According to [1] 
>
> """ 
> [automatically loading initial data via fixtures is d]eprecated since 
> version 1.7: If an application uses migrations, there is no automatic 
> loading of fixtures. Since migrations will be required for 
> applications in Django 1.9, this behavior is considered deprecated. 
> If you want to load initial data for an app, consider doing it in a 
> migration. 
> """ 
>
> However, the docs don't link to how that data should be furnished to 
> the migration.  As best I can tell from reading[2], it sounds like 
> one needs to create a Python function that creates & saves the data, 
> and then provide that function to migrations.RunPython to be 
> executed.  Is this correct, or is there some easier way to provide 
> that initial data to an app? 
>
> Thanks, 
>
> -tkc 
>
> [1] 
>
> https://docs.djangoproject.com/en/dev/howto/initial-data/#automatically-loading-initial-data-fixtures
>  
>
> [2] 
> https://docs.djangoproject.com/en/dev/topics/migrations/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5a94f5dd-7865-408e-ac7a-247384f1eaf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to