Skip to content
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

Merged
merged 19 commits into from
Oct 27, 2014

Conversation

danstovall
Copy link
Contributor

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.

@danstovall
Copy link
Contributor Author

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.

@danstovall
Copy link
Contributor Author

Signed-off-by: Dan Stovall dan.stovall@parentlink.net

@mitar
Copy link
Member

mitar commented Oct 25, 2014

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.

@danstovall
Copy link
Contributor Author

I'd be happy to help maintain this project. Thanks.

@mitar
Copy link
Member

mitar commented Oct 27, 2014

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.

@danstovall
Copy link
Contributor Author

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.

danstovall added a commit that referenced this pull request Oct 27, 2014
Support for TastyPie 0.12.1 and Django 1.7
@danstovall danstovall merged commit 1a7e291 into wlanslovenija:master Oct 27, 2014
@mitar
Copy link
Member

mitar commented Oct 27, 2014

I was looking at #68 recently but I thought it was specific to MongoEngine and didn't have anything to do with TastyPie specifcally.

No, it has only with MongoEngine. I miswrote before. I updated my comment above.

@mitar
Copy link
Member

mitar commented Oct 27, 2014

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.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants