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

Python3 support? #77

Open
prymitive opened this issue Apr 26, 2014 · 2 comments
Open

Python3 support? #77

prymitive opened this issue Apr 26, 2014 · 2 comments

Comments

@prymitive
Copy link

Example from docs:

from tastypie import authorization
from tastypie_mongoengine import resources
from test_app import documents

class PersonResource(resources.MongoEngineResource):
    class Meta:
        queryset = documents.Person.objects.all()
        allowed_methods = ('get', 'post', 'put', 'delete')
        authorization = authorization.Authorization()

doesn't work with python3:

    def __new__(cls, name, bases, attrs):
        meta = attrs.get('Meta')

        if meta and hasattr(meta, 'queryset'):
>           setattr(meta, 'object_class', meta.queryset.model)
E           AttributeError: 'QuerySet' object has no attribute 'model'

objects.all() doesn't have model attribute that is required here:
https://github.com/toastdriven/django-tastypie/blob/master/tastypie/resources.py#L1691

@chescales
Copy link

I am also very interested in Py3 support, how is the status on this? Has anyone started on this? Or is it already done? Cheers

@mitar
Copy link
Member

mitar commented Aug 1, 2014

Pull requests are welcome. I think this is a blocker as well: MongoEngine/mongoengine#381

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

No branches or pull requests

3 participants