Revision history [back]
How can I modify models in askbot?
If I want to add a new element in Class Question(question.py), What should I do?
I have modify askbot/models/question.py like this:
title = models.CharField(max_length=300)
tags = models.ManyToManyField('Tag', related_name='questions')
answer_accepted = models.BooleanField(default=False)
+testestest = models.BooleanField(default=False)
closed = models.BooleanField(default=False)
After modify question.py, I delete old database in mysql, run "python manage.py syncdb; python manage.py migrate". Then I check the question table in mysql again, but "testestest" field isn't exist in question table.
How can I modify models in askbot?
If I want to add a new element in Class Question(question.py), What should I do?
I have modify askbot/models/question.py like this:
title = models.CharField(max_length=300)
tags = models.ManyToManyField('Tag', related_name='questions')
answer_accepted = models.BooleanField(default=False)
+ +testestest testestest = models.BooleanField(default=False)
closed = models.BooleanField(default=False)
models.BooleanField(default=False)
After modify question.py, I delete old database in mysql, run "python manage.py syncdb; python manage.py migrate". Then I check the question table in mysql again, but "testestest" field isn't exist in question table.
How can I modify models in askbot?
If I want to add a new element in Class Question(question.py), What should I do?
I have modify askbot/models/question.py like this:
this:
--- a/askbot/models/question.py
+++ b/askbot/models/question.py
@@ -415,6 +415,7 @@ class Question(content.Content, DeletableContent):
title = models.CharField(max_length=300)
tags = models.ManyToManyField('Tag', related_name='questions')
answer_accepted = models.BooleanField(default=False)
+ testestest = models.BooleanField(default=False)
closed = models.BooleanField(default=False)models.BooleanField(default=False)
closed_by = models.ForeignKey(User, null=True, blank=True, related_name='closed_quest
closed_at = models.DateTimeField(null=True, blank=True)
After modify question.py, I delete old database in mysql, run "python manage.py syncdb; python manage.py migrate". Then I check the question table in mysql again, but "testestest" field isn't exist in question table.