On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote:
>
> > If there are times that you don't want to load the data, then it isn't
> > initial data. Put it in a different fixture, and load it when you need
> > it.
>
> I am bit confused now. Are you implying that the developer should not
> prepare an initial_data fixture (with data that is absolutely
> essential for the DB) until he has *completed* and *locked down* the
> design and coding of the models?

No - I'm saying that the purpose is to put _essential_ data into the
database - for example, out of laziness, I often use it to set up the
admin user, rather than going through the prompts. initial_data is
data that _must_ exist, and generally doesn't change.

It doesn't matter if this data is installed repeatedly; because of the
way Django fixtures work, installing the admin user 100 times doesn't
create 100 admin users - it just resets the data to the value in
initial_data.

> > In general practice, this won't make much of a difference, since you
> > generally only call syncdb once when installing a finished
> > application.
>
> Is this the common experience?!! I am surprised because I find myself
> running syncdb multiple times during development.  What am I doing
> wrong? Do all other Django users run syncdb only once ever , that too
> after all development (of models) is over?

No - during development, you can (and probably will) call syncdb many
times. However, you also shouldn't have any valuable data in your
database during development, so overwriting intial data shouldn't be a
major issue. In fact, it could be considered an advantage, as each
syncdb will reset the contents of the core elements of the database to
a known state.

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