add website app, move articles to it, fix programs.models

This commit is contained in:
bkfox
2015-09-18 12:46:04 +02:00
parent dae9545e27
commit ef4c098d2e
11 changed files with 227 additions and 210 deletions

35
website/models.py Normal file
View File

@ -0,0 +1,35 @@
from django.db import models
from django.utils.translation import ugettext as _, ugettext_lazy
from programs.models import Publication
class Article (Publication):
parent = models.ForeignKey(
'self',
verbose_name = _('parent'),
blank = True, null = True,
help_text = _('parent article'),
)
static_page = models.BooleanField(
_('static page'),
default = False,
)
focus = models.BooleanField(
_('article is focus'),
default = False,
)
referring_tag = models.CharField(
_('referring tag'),
max_length = 32,
blank = True, null = True,
help_text = _('tag used by other to refers to this article'),
)
class Meta:
verbose_name = _('Article')
verbose_name_plural = _('Articles')