On 4/26/07, Greg Taylor <[EMAIL PROTECTED]> 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.

Yes, there is, using the fixtures framework. Look at the documentation
for the 'loaddata' and 'dumpdata' commands on manage.py. These allow
you to load initial data for any model class, as long as you provide a
fixture that references them.

http://www.djangoproject.com/documentation/django-admin/#dumpdata-appname-appname
http://www.djangoproject.com/documentation/django-admin/#loaddata-fixture-fixture

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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