On Jan 30, 2008 8:17 AM, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:
>
> I ran into a situation today where for every future site I set up,
> I'll want to load an initial_data fixture, but for some existing sites
> that I'm upgrading, it's very useful to be able to run syncdb without
> loading any fixtures. Thus http://code.djangoproject.com/ticket/6511

This sort of thing has been proposed previously. I'm a -0 on adding it.

My reading of 'initial data' is that it should be a minimal set of
data that _must_ exist, and _cannot_ change - default categories, root
nodes of trees, that sort of thing. As a result, my reaction to this
proposal has historically been "if you don't want a fixture to be
loaded every time, it's not initial data - so don't call it that. Call
it something else, and load it when you need it".

I imagine the use case here is that the data in the initial data
fixture might be modified after being loaded, in which case you don't
want the modifications being overwritten on each syncdb. IMHO, the
better solution to this problem would be to ensure that initial_data
for a given model is only loaded for models that have been added as a
result of the syncdb (e.g, on first sync, contrib.User is added, so
the initial_data users are added; on the second sync, blog.Entry is
added, so the initial entry is added, but the initial user is not
reloaded). I haven't looked at this in detail, but my gut reaction is
that this wouldn't be a trivial thing to implement. In the meantime,
calling your fixture something else works fine :-)

Russ %-)

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

Reply via email to