Bill,
thanks for answer, my comments are inline:
On Sep 8, 4:29 pm, Bill Freeman wrote:
> Well, do you want this to happen every time that the module is imported? Or
> spend time
> each server start determining that these items are already in the data base
> and skipping
> the initialization?
Jan,
Well, do you want this to happen every time that the module is imported? Or
spend time
each server start determining that these items are already in the data base
and skipping
the initialization? If not, then you're stuck telling the system when to do
this anyway (perhaps
a syncdb extension
Thanks Bill, yes, that is one possible solution, when implementing
such feature from the scratch.
I am only asking, if there is some existing framework for such need,
which I see as common.
For example some add-on to Django, which will do this for me. Let's
imagine additional option for any fiel
Perhaps I'm not understanding correctly, but how about, assuming you have a
function
run_data_inits() that calls your chain of init_sample_data() functions:
$ python manage.py shell
>>> import myproject.myapp.models as m
>>> m.run_data_inits()
>>> ^D
Bill
On Thu, Aug 20, 2009 at 9:25 AM, Jan Os
Hello,
we are in the initial phase of software project, and data model and
names of attributes are changing very often, and very often we need to
create new database and fill it with the same sample data for testing.
We want to automate this creation of sample data.
Our idea: add into each model
5 matches
Mail list logo