wlanslovenija/django-tastypie-mongoengine — pull request #81 by danstovall (2014-10-23 19:40:15+00:00)
Title: Support for TastyPie 0.12.1 and Django 1.7

Django 1.7 wasn't compatible with anything before Tastypie 0.12.0. To be able to upgrade to the most recent versions of Django we needed to be able to support versions of tastypie from 0.11.0 and beyond.

The only code changes were to the MonogoEngineResource class. The get_via_url method was The _wrap_polymorphic method would replace the _meta.resource_name with one of the polymorphic resources, and then didn't reset it in the finally statement. We also over-wrote the get_via_url method. In tastypie 0.11.0 the get_via_url didn't use the url resolver, instead it checked the URL directly against the specific resource URLs. This mean that polymorphic resources would return a NotFound or Resolver404 error if the uri provided was one for the polymorphic resources. The get_via_uri method now checks the main resource, and then checks each polymorphic resource in turn to see if the resource can be matched.