X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/6f1d6a6fe9607eb612d2dc95340d414dda043e92..97a6fccf2124739922f1f5e3e7fc472e2e402a2b:/migdal/__init__.py diff --git a/migdal/__init__.py b/migdal/__init__.py index 05322b4..fe90406 100644 --- a/migdal/__init__.py +++ b/migdal/__init__.py @@ -5,7 +5,7 @@ Migdal (מִגְדָּל) is a multilingual blog Django app. Author: Radek Czajka """ from django.conf import settings -from prawokultury.helpers import AppSettings +from fnpdjango.utils.app import AppSettings from django.utils.translation import ugettext_lazy as _ from migdal.helpers import EntryType @@ -14,9 +14,9 @@ class Settings(AppSettings): # Types of entries: # (slug, commentable, on main) TYPES = ( - EntryType('news', _('news'), commentable=True, on_main=True), - EntryType('publications', _('publications'), commentable=False, on_main=False), - EntryType('info', _('info'), commentable=False, on_main=False), + EntryType('news', _('news'), commentable=True, on_main=True, promotable=True), + EntryType('publications', _('publications')), + EntryType('info', _('info')), ) TYPE_SUBMIT = 'news' TAXONOMIES = ( @@ -25,6 +25,8 @@ class Settings(AppSettings): ) LAST_COMMENTS = 5 + MAIN_PAGE_ENTRY = None + TYPES_DICT = None def _more_TYPES_DICT(self, value): return dict((t.db, t) for t in self.TYPES) @@ -33,6 +35,10 @@ class Settings(AppSettings): def _more_TYPES_ON_MAIN(self, value): return tuple(t.db for t in self.TYPES if t.on_main) + TYPES_PROMOTABLE = None + def _more_TYPES_PROMOTABLE(self, value): + return tuple(t.db for t in self.TYPES if t.promotable) + OBLIGATORY_LANGUAGES = None def _more_OBLIGATORY_LANGUAGES(self, value): return value or tuple(lang for lang in settings.LANGUAGES @@ -44,6 +50,3 @@ class Settings(AppSettings): if lang not in self.OBLIGATORY_LANGUAGES) app_settings = Settings('MIGDAL') - - -