Fix imports order
This commit is contained in:
parent
426e27fbec
commit
1fbeac1ffb
1 changed files with 5 additions and 4 deletions
|
@ -1,8 +1,4 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
try:
|
|
||||||
from django.utils.encoding import force_text as force_unicode_or_text
|
|
||||||
except ImportError:
|
|
||||||
from django.utils.encoding import force_unicode as force_unicode_or_text
|
|
||||||
from aldryn_search.helpers import get_plugin_index_data
|
from aldryn_search.helpers import get_plugin_index_data
|
||||||
from aldryn_search.utils import get_index_base, strip_tags
|
from aldryn_search.utils import get_index_base, strip_tags
|
||||||
|
|
||||||
|
@ -11,6 +7,11 @@ from haystack import indexes
|
||||||
from .models import Post
|
from .models import Post
|
||||||
from .settings import get_setting
|
from .settings import get_setting
|
||||||
|
|
||||||
|
try:
|
||||||
|
from django.utils.encoding import force_text as force_unicode_or_text
|
||||||
|
except ImportError:
|
||||||
|
from django.utils.encoding import force_unicode as force_unicode_or_text
|
||||||
|
|
||||||
|
|
||||||
class PostIndex(get_index_base()):
|
class PostIndex(get_index_base()):
|
||||||
haystack_use_for_indexing = get_setting('ENABLE_SEARCH')
|
haystack_use_for_indexing = get_setting('ENABLE_SEARCH')
|
||||||
|
|
Loading…
Reference in a new issue