File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 7
7
from dbtemplates .utils .cache import (cache , get_cache_key ,
8
8
set_and_return , get_cache_notfound_key )
9
9
10
- if django .get_version () >= '1.8' :
11
- from django .template .loaders .base import Loader as tLoaderCls
10
+ if django .VERSION [: 2 ] >= ( 1 , 8 ) :
11
+ from django .template .loaders .base import Loader as BaseLoader
12
12
else :
13
- from django .template .loader import BaseLoader as tLoaderCls # noqa
13
+ from django .template .loader import BaseLoader # noqa
14
14
15
15
16
- class Loader (tLoaderCls ):
16
+ class Loader (BaseLoader ):
17
17
"""
18
18
A custom template loader to load templates from the database.
19
19
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Migration(migrations.Migration):
12
12
('sites' , '0001_initial' ),
13
13
]
14
14
15
- if django .get_version () >= '1.8' :
15
+ if django .VERSION [: 2 ] >= ( 1 , 8 ) :
16
16
operations = [
17
17
migrations .CreateModel (
18
18
name = 'Template' ,
Original file line number Diff line number Diff line change 37
37
'dbtemplates.loader.Loader' ,
38
38
)
39
39
40
- if django .get_version () <= '1.6' :
40
+ if django .VERSION [: 2 ] <= ( 1 , 6 ) :
41
41
TEST_RUNNER = 'discover_runner.DiscoverRunner'
You can’t perform that action at this time.
0 commit comments