Hi Russ, Quote: initial_data is intended for data that must _always_ be in your database.
Shouldn't developers have the option to run syncdb without loading initial_data? For example: a model has changed and the developer merely wishes to synchronize the database without loading any data. Regards, Manoj On Jul 17, 11:15 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > > > > I have created an initial_data fixture for using with my test cases. > > However I do not want these to be loaded every time I run syncdb after > > making a change during development. Is there a way to turn off loading > > initial_data, perhaps using a command line switch? > > initial_data is intended for data that must _always_ be in your database. > > If you have a need for data for a particular test that isn't required > for normal operation, put it in a different fixture name, and direct > Django to load that fixture during testing. To do this, use a Django > TestCase, defining a fixtures attribute: > > from django.test import TestCase > > class MyTest(TestCase): > fixtures = ['test_data.json'] > > def test_something(self): > ... > > In this example, 'test_data.json' will be loaded into the database > before running the test_something testcase. > > 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 -~----------~----~----~----~------~----~------~--~---