コード例 #1
0
def config(request):
    """
    Adds configuration information to the context.

    To employ, add the conf method reference to your project
    settings TEMPLATE_CONTEXT_PROCESSORS.

    Example:
        TEMPLATE_CONTEXT_PROCESSORS = (
            ...
            "dress_blog.context_processors.config",
        )
    """
    return {'dress_blog_config': Config.get_current()}
コード例 #2
0
 def setUp(self):
     config = Config.get_current()
     config.ping_google = True
     config.save()
コード例 #3
0
ファイル: views.py プロジェクト: danirus/django-dress-blog
 def get_paginate_by(self, queryset):
     return Config.get_current().stories_in_index
コード例 #4
0
ファイル: views.py プロジェクト: SusannaGr/django-dress-blog
 def get_paginate_by(self, queryset):
     return Config.get_current().stories_in_index
コード例 #5
0
ファイル: feeds.py プロジェクト: danirus/django-dress-blog
 def config(self):
     if self._config is None:
         self._config = Config.get_current()
     return self._config
コード例 #6
0
 def setUp(self):
     config = Config.get_current()
     config.ping_google = True
     config.save()
コード例 #7
0
ファイル: feeds.py プロジェクト: SusannaGr/django-dress-blog
 def config(self):
     if self._config is None:
         self._config = Config.get_current()
     return self._config