Skip to content

Commit

Permalink
Stop using methods deprecated in Wagtail
Browse files Browse the repository at this point in the history
Some code was using methods from Wagtail, even though those methods were
deprecated with alternatives provided. Those alternatives are now used
instead.
  • Loading branch information
mx-moth committed Mar 23, 2016
1 parent 5b4aa8b commit 5dc9ded
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions wagtail/api/v2/serializers.py
Expand Up @@ -8,7 +8,6 @@
from rest_framework.fields import Field, SkipField
from taggit.managers import _TaggableManager

from wagtail.utils.compat import get_related_model
from wagtail.wagtailcore import fields as wagtailcore_fields

from .utils import get_full_url, pages_for_site
Expand Down Expand Up @@ -363,7 +362,7 @@ def build_relational_field(self, field_name, relation_info):
if relation_info.to_many:
model = getattr(self.Meta, 'model')
child_relations = {
child_relation.field.rel.related_name: get_related_model(child_relation)
child_relation.field.rel.related_name: child_relation.related_model
for child_relation in get_all_child_relations(model)
}

Expand Down
2 changes: 1 addition & 1 deletion wagtail/wagtaildocs/views/multiple.py
@@ -1,11 +1,11 @@
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseBadRequest, JsonResponse
from django.shortcuts import get_object_or_404, render
from django.template.loader import render_to_string
from django.utils.encoding import force_text
from django.views.decorators.http import require_POST
from django.views.decorators.vary import vary_on_headers

from wagtail.utils.compat import render_to_string
from wagtail.wagtailadmin.utils import PermissionPolicyChecker
from wagtail.wagtailsearch.backends import get_search_backends

Expand Down

0 comments on commit 5dc9ded

Please sign in to comment.