Greg Taylor wrote:
> Greetings,
> 
> I was wondering if there's a way to include initial data for Django 
> classes. I noticed that there is a way to do so via a 'sql' 
> subdirectory under your own models, but didn't see any indication if 
> there was a way to do this for base Django classes.
> 

You can do this for example by creating a management.py file in your
app. This file will be executed, when your app gets installed.

You can find some details on Alan Green's blog [1] where he also
provides a bare-bone snippet :-)

[1]
<http://www.bright-green.com/blog/2006_07_12/initialising_application_data_.html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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