remove Station model (to much trouble for few advantages); start new player; rename Post.detail_url to Post.url, same for ListItem; move Article into website app; add website.Sound post; work on lists;...

This commit is contained in:
bkfox
2016-06-12 21:34:31 +02:00
parent 13bf57b401
commit c3ae0e012c
18 changed files with 180 additions and 196 deletions

View File

@ -166,7 +166,10 @@ class Post (models.Model, Routable):
)
return qs
def detail_url(self):
def url(self):
"""
Return an url to the post detail view.
"""
return self.route_url(
routes.DetailRoute,
pk = self.pk, slug = slugify(self.title)
@ -209,24 +212,6 @@ class Post (models.Model, Routable):
abstract = True
class Article (Post):
"""
Represent an article or a static page on the website.
"""
static_page = models.BooleanField(
_('static page'),
default = False,
)
focus = models.BooleanField(
_('article is focus'),
default = False,
)
class Meta:
verbose_name = _('Article')
verbose_name_plural = _('Articles')
class RelatedPostBase (models.base.ModelBase):
"""
Metaclass for RelatedPost children.
@ -356,6 +341,7 @@ class RelatedPost (Post, metaclass = RelatedPostBase):
class Meta:
abstract = True
# FIXME: declare a binding only for init
class Relation:
"""
Relation descriptor used to generate and manage the related object.