forked from rc/aircox
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:
@ -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.
|
||||
|
Reference in New Issue
Block a user