On 11/21/07, Jose Jiménez <[EMAIL PROTECTED]> wrote:
>
> Thanks for your response Artiom, but i have a question about it.
>
> the documentation you link me says: "for each model in each specified
> app, this command looks for the file <appname>/sql/<modelname>.sql"
> but i want initialize the auth_group table, so i haven't a model for
> that. i tried to put a groups.pyyaml.sql but it does not anything.

That section of the documention needs to be revised - loading initial
data from SQL is not the recommended technique any more.

Have a look at: the loaddata and dumpdata commands on manage.py

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

This describes the way in which you can define a fixture - a
JSON/XML/YAML file that contains data you wish to load into the
database. This data can be used to populate your database, or as data
that is used during a test.

If you read the documentation on syncdb:

http://www.djangoproject.com/documentation/django-admin/#syncdb

you will see that as a special case, if you name your fixture
'initial_data', it will be loaded every time you sync your
application.

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