File tree Expand file tree Collapse file tree 3 files changed +3
-18
lines changed Expand file tree Collapse file tree 3 files changed +3
-18
lines changed Original file line number Diff line number Diff line change 10
10
"""
11
11
from collections import defaultdict
12
12
13
- from django import VERSION as DJANGO_VERSION
14
13
from django .apps import apps
15
14
from django .conf import settings
16
15
from django .contrib import admin
17
16
from django .core .exceptions import ImproperlyConfigured
18
- from django .db .models .signals import class_prepared
19
17
20
18
from mezzanine .boot .lazy_admin import LazyAdminSite
21
19
from mezzanine .utils .importing import import_dotted_path
@@ -89,12 +87,8 @@ def add_extra_model_fields(sender, **kwargs):
89
87
field .contribute_to_class (sender , field_name )
90
88
91
89
92
- if DJANGO_VERSION < (1 , 9 ):
93
- if fields :
94
- class_prepared .connect (add_extra_model_fields , dispatch_uid = "FQFEQ#rfq3r" )
95
- else :
96
- for model_key in fields :
97
- apps .lazy_model_operation (add_extra_model_fields , model_key )
90
+ for model_key in fields :
91
+ apps .lazy_model_operation (add_extra_model_fields , model_key )
98
92
99
93
100
94
# Override django.contrib.admin.site with LazyAdminSite. It must
Original file line number Diff line number Diff line change 1
- from django import VERSION as DJANGO_VERSION
2
1
from django .apps import AppConfig
3
2
4
3
@@ -8,10 +7,3 @@ class CoreConfig(AppConfig):
8
7
9
8
def ready (self ):
10
9
from . import checks # noqa
11
-
12
- if DJANGO_VERSION < (1 , 9 ):
13
- # add_to_builtins was removed in 1.9 and replaced with a
14
- # documented public API configured by the TEMPLATES setting.
15
- from django .template .base import add_to_builtins
16
-
17
- add_to_builtins ("mezzanine.template.loader_tags" )
Original file line number Diff line number Diff line change 1
1
import warnings
2
2
from functools import wraps
3
3
4
- from django import VERSION as DJANGO_VERSION
5
4
from django import template
6
5
7
6
@@ -20,7 +19,7 @@ def as_tag(self, tag_func):
20
19
``var_name`` in the template.
21
20
"""
22
21
package = tag_func .__module__ .split ("." )[0 ]
23
- if DJANGO_VERSION >= ( 1 , 9 ) and package != "mezzanine" :
22
+ if package != "mezzanine" :
24
23
warnings .warn (
25
24
"The `as_tag` template tag builder is deprecated in favour of "
26
25
"Django's built-in `simple_tag`, which supports variable "
You can’t perform that action at this time.
0 commit comments