mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-24 01:57:32 +01:00
Updated wagtail to use treebeard 2.0
This commit is contained in:
parent
606fcdd6a4
commit
b7e823037f
1
setup.py
1
setup.py
@ -45,6 +45,7 @@ setup(
|
||||
"django-libsass>=0.1",
|
||||
"django-modelcluster>=0.1",
|
||||
"django-taggit>=0.11.2",
|
||||
"django-treebeard==2.0",
|
||||
"Pillow>=2.3.0",
|
||||
"beautifulsoup4>=4.3.2",
|
||||
"lxml>=3.3.0",
|
||||
|
@ -13,20 +13,14 @@ from django.conf import settings
|
||||
from django.template.response import TemplateResponse
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from treebeard.mp_tree import MP_Node
|
||||
|
||||
from wagtail.wagtailcore.util import camelcase_to_underscore
|
||||
from wagtail.wagtailcore.query import PageQuerySet
|
||||
|
||||
from wagtail.wagtailsearch import Indexed, get_search_backend
|
||||
|
||||
|
||||
# hack to import our patched copy of treebeard at wagtail/vendor/django-treebeard -
|
||||
# based on http://stackoverflow.com/questions/17211078/how-to-temporarily-modify-sys-path-in-python
|
||||
treebeard_path = os.path.join(os.path.dirname(__file__), '..', 'vendor', 'django-treebeard')
|
||||
sys.path.insert(0, treebeard_path)
|
||||
from treebeard.mp_tree import MP_Node
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
class SiteManager(models.Manager):
|
||||
def get_by_natural_key(self, hostname):
|
||||
return self.get(hostname=hostname)
|
||||
|
@ -1,15 +1,6 @@
|
||||
from django.db.models import Q
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
|
||||
|
||||
# hack to import our patched copy of treebeard at wagtail/vendor/django-treebeard -
|
||||
# based on http://stackoverflow.com/questions/17211078/how-to-temporarily-modify-sys-path-in-python
|
||||
import sys
|
||||
import os
|
||||
treebeard_path = os.path.join(os.path.dirname(__file__), '..', 'vendor', 'django-treebeard')
|
||||
sys.path.insert(0, treebeard_path)
|
||||
from treebeard.mp_tree import MP_NodeQuerySet
|
||||
sys.path.pop(0)
|
||||
|
||||
|
||||
class PageQuerySet(MP_NodeQuerySet):
|
||||
|
Loading…
Reference in New Issue
Block a user