asked 2012-01-25 06:00:35 -0500A little girl
I want to add more table to the askbot database. Usually, in Django, we can make new file in models.py (or create new file in folder model). Then run manage.py syncdb. But, I cannot do that in askbot. What am I missing?
my file is name subject.py in models
import re from django.db import models from django.db import connection, transaction from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from askbot.models.base import DeletableContent from askbot.models.base import BaseQuerySetManager from askbot import const
class Subject(models.Model): subject = models.CharField(max_length=64)
class Meta: app_label='askbot' db_table = u'subject' def __unicode__(self): return self.subject
I have used from askbot.models.subject import Subject in __init__.py in folder models.
answered 2012-02-27 13:20:03 -0500ajk14
Has this question been resolved? I'm having the exact same problem, where syncdb is not creating the new table that I am expecting.
I've added my model to the __all__ list in models/__init__.py but that doesn't seem to have helped.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2012-01-25 06:00:35 -0500
Seen: 141 times
Last updated: Feb 27 '12