I have category model, in which I want to load some default data. How can I achieve it? This is model is for a select box, which is extensible for different applications later
This is the model I have designed it, I tried verifying choice
class Category(db.Model):
categorylist=db.StringListProperty()
Please help.
Thank You
Select Box Model
Right now, I use this in this fashion (I’m using Django Framework).
In the views.py I make an array
and in the templates I populate it this way
All I want is to use this options to be a result of model like Category.all(), should have some default data loaded for the entire app. If necessary, Ill add categories from admin panel