-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for TastyPie 0.12.1 and Django 1.7 #81
Conversation
…alls with the location header. Replaced call to assertRedirect with individual checks of status code and loction header value
…ource_name after _wrap_polymorphic is called
…ndle ImportError or reoder_suite to keep backwards compatibility with previous versions of Django
…and tastypie 0.10 to fail
It should be noted that by supporting Django 1.5+, and TastyPie 0.9.12+ there is a possible invalid configuration option. Django1.7 is incompatible with TastyPie 0.10.0. TastyPie 0.10.0 imports django.utils.simplejson, which has been removed in Django 1.7. |
Signed-off-by: Dan Stovall dan.stovall@parentlink.net |
Waw, amazing work. Sadly, I don't have resources anymore to maintain this package. I don't use it in any of my projects anymore and is hard for me to keep up with changes. Would you be willing to take over maintenance of it and drive it in any direction you think is the best (which Tastypie versions to support, which Django versions to support)? I can give you admin permissions and I will be still around to help if there will be unclear things, but sadly I will not be able to contribute much more. |
I'd be happy to help maintain this project. Thanks. |
I just gave you admin rights. So please prepare a new release then, in any way you see fit, and I can then release it. If there are any others who would like to join the discussion of changes necessary for next version, please join. There are also some other pull requests open, maybe check them as well. In #68 there is some discussion why currently this package is limited to old mongoengine. There is one edge case for which 0.8 mongoengine fails. One option is to send a patch upstream, or to use a fork of mongoengine with fixed thing. Another is to modify semantic of this package how it behaves with empty values and then we do not depend on old (pre 0.8) behavior of mongoengine, which was broken/changed in 0.8. |
Thanks. I was looking at #68 recently but I thought it was specific to MongoEngine and didn't have anything to do with TastyPie specifcally. MongoEngine hasn't had any movement on that specific issue. It is marked for their 0.9 release but no one has worked on it yet. It was going to be my next project. I will merge in this pull request and check the others to see if there is anything that can be merged. Then I will prepare a release. Thanks. |
Support for TastyPie 0.12.1 and Django 1.7
No, it has only with MongoEngine. I miswrote before. I updated my comment above. |
Thank you! |
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.