Re: create model instance

2008-06-04 Thread djangoer
" <[EMAIL PROTECTED]> wrote: > http://www.djangoproject.com/documentation/models/fixtures/ > > What you are looking for is an initial_data fixture. You need to serialize > the default instance of the model you want as JSON and save it in > initial_data.json and then it should prepopu

create model instance

2008-06-04 Thread djangoer
A quick newbie question, is there any way that can create a default instance (a pre-specified instance) in the database once the model is created. In other words, when we first run the syncdb(or set up the website), an pre-defined instance is created. For example, we have a Book model, class Bo

table in newform

2008-04-03 Thread djangoer
Hi all, I have some questions regarding the creating a table using newform. Assuming I have a model named Shelf, which has five fields: item_number(int), item_name(char), item_order(int), item_level(int), and taken(boolean). How can I display all the items in a tabular format using the newform