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()}
def setUp(self): config = Config.get_current() config.ping_google = True config.save()
def get_paginate_by(self, queryset): return Config.get_current().stories_in_index
def config(self): if self._config is None: self._config = Config.get_current() return self._config