facts: add fact source back into model
it was silly for me to have dropped this
This commit is contained in:
parent
772df777ba
commit
69ca220b5e
|
@ -0,0 +1,24 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('facts', '0002_auto_20150521_2224'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='fact',
|
||||||
|
name='nickmask',
|
||||||
|
field=models.CharField(default='', max_length=200),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='factcategory',
|
||||||
|
name='show_source',
|
||||||
|
field=models.BooleanField(default=False),
|
||||||
|
),
|
||||||
|
]
|
|
@ -16,6 +16,7 @@ class FactCategory(models.Model):
|
||||||
"""Define categories for facts."""
|
"""Define categories for facts."""
|
||||||
|
|
||||||
name = models.CharField(max_length=200, unique=True)
|
name = models.CharField(max_length=200, unique=True)
|
||||||
|
show_source = models.BooleanField(default=False)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name_plural = 'fact categories'
|
verbose_name_plural = 'fact categories'
|
||||||
|
@ -54,6 +55,7 @@ class Fact(models.Model):
|
||||||
|
|
||||||
fact = models.TextField()
|
fact = models.TextField()
|
||||||
category = models.ForeignKey(FactCategory)
|
category = models.ForeignKey(FactCategory)
|
||||||
|
nickmask = models.CharField(max_length=200, default='')
|
||||||
|
|
||||||
objects = FactManager()
|
objects = FactManager()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue