First time here? Check out the FAQ!

Revision history  [back]

customize askbot

Hi,

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.

Thanks.