Initial commit.
[django-ssify.git] / ssify / __init__.py
1 """
2 Implements two-phase rendering using SSI statements.
3
4 Define reqest-dependent SSI variables to use as template tags
5 with `ssi_variable` decorator.
6
7 Define views to be cached and included as SSI include
8 with `ssi_included` decorator.
9
10 """
11
12 __version__ = '1.0'
13 __date__ = '2014-08-26'
14 __all__ = ('ssi_expect', 'SsiVariable', 'ssi_included', 'ssi_variable')
15
16 from django.conf import settings
17 from django.utils.functional import lazy
18
19 SETTING = lazy(
20     lambda name, default: getattr(settings, name, default),
21     bool, int, list, tuple, unicode)
22
23 INCLUDES_CACHES = SETTING('SSIFY_INCLUDES_CACHES', ('ssify',))
24 DEBUG = SETTING('SSIFY_DEBUG', False)
25 DEBUG_VERBOSE = SETTING('SSIFY_DEBUG_VERBOSE', True)
26
27
28 from .variables import ssi_expect, SsiVariable
29 from .decorators import ssi_included, ssi_variable