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()}
Exemplo n.º 2
0
 def setUp(self):
     config = Config.get_current()
     config.ping_google = True
     config.save()
Exemplo n.º 3
0
 def get_paginate_by(self, queryset):
     return Config.get_current().stories_in_index
Exemplo n.º 4
0
 def get_paginate_by(self, queryset):
     return Config.get_current().stories_in_index
Exemplo n.º 5
0
 def config(self):
     if self._config is None:
         self._config = Config.get_current()
     return self._config
Exemplo n.º 6
0
 def setUp(self):
     config = Config.get_current()
     config.ping_google = True
     config.save()
Exemplo n.º 7
0
 def config(self):
     if self._config is None:
         self._config = Config.get_current()
     return self._config