On 5/12/07, Christian M Hoeppner <[EMAIL PROTECTED]> wrote:
>
> The environment is a neat thing I've been missing in Django so far. Depending
> on the way you call your app, you get a different set of settings loaded.
> Neat for development/production/staging/else.
I don't know much about Symfony, but as I understand what you are
saying, the Django approach to achieving this would be to have
multiple fixtures, one for each 'environment'.
> Is there some sort of structure, enforced in order to make the file
> django-readable? I'd be writing them by hand to make up testing data.
Your fixture file has to be valid YAML, and it has to follow a
particular structure, along the lines of:
- fields: {attr1: value, attr2: value }
model: app.model
pk: '1'
If you want a more elaborate example, use ./manage.py dumpdata --format=yaml
> Also, is the fixtures system capable of being used as data-transfer system?
Sure. One of the larger projects at the place I work uses fixtures for
exactly that purpose.
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---