Django 1.7 RuntimeError: App registry isn't ready yet. #1115

Closed
natecox opened this Issue Jan 14, 2014 · 32 comments

Comments

Projects
None yet
@natecox

natecox commented Jan 14, 2014

Hopefully someone has already addressed this and I just haven't been able to find this.

I'm using Django 1.7 and am not able to install tastypie successfully. I have installed directly from the github repo thinking it may just be an issue with the pip version but I'm still having the same issue.

When I add tastypie to my installed apps, all of my manage.py commands fail with: RuntimeError: App registry isn't ready yet.

Is there a way to get tastypie running with python 2.7 + django 1.7 (dev)?

@natecox

This comment has been minimized.

Show comment Hide comment
@natecox

natecox Jan 18, 2014

Anyone out there have knowledge of this?

natecox commented Jan 18, 2014

Anyone out there have knowledge of this?

@toastdriven

This comment has been minimized.

Show comment Hide comment
@toastdriven

toastdriven Jan 26, 2014

Contributor

Sorry, Tastypie hasn't been prepped for 1.7 yet. The way app-loading has changed was bound to cause some discovery problems. I'll be looking into this within the next week.

Contributor

toastdriven commented Jan 26, 2014

Sorry, Tastypie hasn't been prepped for 1.7 yet. The way app-loading has changed was bound to cause some discovery problems. I'll be looking into this within the next week.

@benjaminEwhite

This comment has been minimized.

Show comment Hide comment
@benjaminEwhite

benjaminEwhite Jan 26, 2014

Have same issue as @natecox . I filed a ticket with Django, and they let me know issue is on Tastypie's end. In case it helps, here's some info I got back:

As implied here:
https://docs.djangoproject.com/en/dev/topics/auth/customizing
/#referencing-the-user-model the User module should be referenced by
settings.AUTH_USER_MODEL at import time. get_user_model() doesn't work
until the initialization sequence is complete.

We could clarify this section of the docs again, and also say something in
the release notes. But the fix belongs to tastypie.

Have same issue as @natecox . I filed a ticket with Django, and they let me know issue is on Tastypie's end. In case it helps, here's some info I got back:

As implied here:
https://docs.djangoproject.com/en/dev/topics/auth/customizing
/#referencing-the-user-model the User module should be referenced by
settings.AUTH_USER_MODEL at import time. get_user_model() doesn't work
until the initialization sequence is complete.

We could clarify this section of the docs again, and also say something in
the release notes. But the fix belongs to tastypie.

@ryan-blunden

This comment has been minimized.

Show comment Hide comment
@ryan-blunden

ryan-blunden Feb 12, 2014

Looking forward to this getting fixed.

Looking forward to this getting fixed.

@un33k

This comment has been minimized.

Show comment Hide comment
@un33k

un33k Mar 10, 2014

Something like this:
un33k/django-tastypie@9efaef9

Tested with my application and works. No unittest.

un33k commented Mar 10, 2014

Something like this:
un33k/django-tastypie@9efaef9

Tested with my application and works. No unittest.

asmallteapot referenced this issue in asmallteapot/django-tastypie Mar 10, 2014

Bill Williams
Lazily load the User class and username field.
Django 1.7 modifies the app loading process such that get_user_model is unavailable at import time.

@ghost ghost referenced this issue in cboelsen/tastytopping Apr 15, 2014

Closed

Test against the latest django when tastypie supports 1.7 #3

@ryan-blunden

This comment has been minimized.

Show comment Hide comment
@ryan-blunden

ryan-blunden Apr 21, 2014

@toastdriven Now that the Django beta-1 is out, will you be looking into this soon? For now, I'm using the patch from @un33k and it's working well.

@toastdriven Now that the Django beta-1 is out, will you be looking into this soon? For now, I'm using the patch from @un33k and it's working well.

@Quintasan

This comment has been minimized.

Show comment Hide comment
@Quintasan

Quintasan Apr 24, 2014

@toastdriven just tried @un33k 's patch, lookin' good.

@toastdriven just tried @un33k 's patch, lookin' good.

@iambibhas

This comment has been minimized.

Show comment Hide comment
@iambibhas

iambibhas May 24, 2014

Really need this now. Any update?

Really need this now. Any update?

@natecox

This comment has been minimized.

Show comment Hide comment
@natecox

natecox May 24, 2014

@iambibhas Highly recommend Django Rest Framework as an alternative.

natecox commented May 24, 2014

@iambibhas Highly recommend Django Rest Framework as an alternative.

@rolandgeider

This comment has been minimized.

Show comment Hide comment
@rolandgeider

rolandgeider May 24, 2014

Contributor

@natecox Are you using it? Do you have the impression that it's being developed more actively?

Contributor

rolandgeider commented May 24, 2014

@natecox Are you using it? Do you have the impression that it's being developed more actively?

@natecox

This comment has been minimized.

Show comment Hide comment
@natecox

natecox May 24, 2014

@rolandgeider I switched to using it when I didn't get any response on this thread back in January. It is very well done, and seems to be actively developed.

natecox commented May 24, 2014

@rolandgeider I switched to using it when I didn't get any response on this thread back in January. It is very well done, and seems to be actively developed.

@iambibhas

This comment has been minimized.

Show comment Hide comment
@iambibhas

iambibhas May 25, 2014

@natecox I feel like this is much simpler than DRF. I'm yet to play around with this, thanks to this bug. But I'm going to try @un33k's patch and give it some more before deciding. If this bug is still open till then, might have no other choice but to go with DRF.

@natecox I feel like this is much simpler than DRF. I'm yet to play around with this, thanks to this bug. But I'm going to try @un33k's patch and give it some more before deciding. If this bug is still open till then, might have no other choice but to go with DRF.

@natecox

This comment has been minimized.

Show comment Hide comment
@natecox

natecox May 26, 2014

@iambibhas In fairness, I posted this bug in mid january and it's still present. Unless someone steps up to fix it I don't think it's going to get resolved anytime soon. I'm extremely happy with DRF and disinclined to spend time fixing this at this point.

natecox commented May 26, 2014

@iambibhas In fairness, I posted this bug in mid january and it's still present. Unless someone steps up to fix it I don't think it's going to get resolved anytime soon. I'm extremely happy with DRF and disinclined to spend time fixing this at this point.

@un33k

This comment has been minimized.

Show comment Hide comment
@un33k

un33k May 26, 2014

I provided a patch, someone work on the unittest so it passes Travis. Then it should be ready for a pull request.

Not providing a fast fix for the yet-to-be-released Django 1.7 is not that unreasonable.

Owner of this package has a full time job and busy with life too. :)

DRF looks greener from far. ;)

On May 26, 2014, at 11:56 AM, Nathan Cox notifications@github.com wrote:

@iambibhas In fairness, I posted this bug in mid january and it's still present. Unless someone steps up to fix it I don't think it's going to get resolved anytime soon. I'm extremely happy with DRF and disinclined to spend time fixing this at this point.


Reply to this email directly or view it on GitHub.

un33k commented May 26, 2014

I provided a patch, someone work on the unittest so it passes Travis. Then it should be ready for a pull request.

Not providing a fast fix for the yet-to-be-released Django 1.7 is not that unreasonable.

Owner of this package has a full time job and busy with life too. :)

DRF looks greener from far. ;)

On May 26, 2014, at 11:56 AM, Nathan Cox notifications@github.com wrote:

@iambibhas In fairness, I posted this bug in mid january and it's still present. Unless someone steps up to fix it I don't think it's going to get resolved anytime soon. I'm extremely happy with DRF and disinclined to spend time fixing this at this point.


Reply to this email directly or view it on GitHub.

@jnvilo

This comment has been minimized.

Show comment Hide comment
@jnvilo

jnvilo Jun 15, 2014

I tested the patch and it works great! Thanks un33k
For those desperately wanting to use tastypie in the yet unreleased Django 1.7 ,

  1. Get tastypie from git
    git clone https://github.com/toastdriven/django-tastypie.git

  2. cd django-tastypie/tastypie

  3. replace compat.py with uu3k's patch file [from: https://github.com/un33k/django-tastypie/commit/9efaef961d5c07db85ab3882a428407eedf1c285](from: un33k/django-tastypie@9efaef9)

or just wget the raw file:
wget https://raw.githubusercontent.com/un33k/django-tastypie/9efaef961d5c07db85ab3882a428407eedf1c285/tastypie/compat.py

I hope this helps.

jnvilo commented Jun 15, 2014

I tested the patch and it works great! Thanks un33k
For those desperately wanting to use tastypie in the yet unreleased Django 1.7 ,

  1. Get tastypie from git
    git clone https://github.com/toastdriven/django-tastypie.git

  2. cd django-tastypie/tastypie

  3. replace compat.py with uu3k's patch file [from: https://github.com/un33k/django-tastypie/commit/9efaef961d5c07db85ab3882a428407eedf1c285](from: un33k/django-tastypie@9efaef9)

or just wget the raw file:
wget https://raw.githubusercontent.com/un33k/django-tastypie/9efaef961d5c07db85ab3882a428407eedf1c285/tastypie/compat.py

I hope this helps.

@klainn

This comment has been minimized.

Show comment Hide comment
@klainn

klainn Jun 15, 2014

Thanks @jnvilo your write up helped lots.

klainn commented Jun 15, 2014

Thanks @jnvilo your write up helped lots.

@steffann

This comment has been minimized.

Show comment Hide comment
@steffann

steffann Jun 23, 2014

Contributor

I know it has been said before, but: please merge this important and simple fix.

Contributor

steffann commented Jun 23, 2014

I know it has been said before, but: please merge this important and simple fix.

@steffann

This comment has been minimized.

Show comment Hide comment
@steffann

steffann Jun 23, 2014

Contributor

Ah, it turns out that this patch hides the error but does not actually work (for me, using py34). I'll try to come up with a new patch

Contributor

steffann commented Jun 23, 2014

Ah, it turns out that this patch hides the error but does not actually work (for me, using py34). I'll try to come up with a new patch

@burakk

This comment has been minimized.

Show comment Hide comment
@burakk

burakk Jul 1, 2014

Is there any progress on this issue?

burakk commented Jul 1, 2014

Is there any progress on this issue?

@dracos dracos referenced this issue in mysociety/sayit Jul 4, 2014

Closed

Test SayIt in Django 1.7 #314

@ddahan

This comment has been minimized.

Show comment Hide comment
@ddahan

ddahan Sep 3, 2014

Django 1.7 is released!
Can we officially say that Tastypie is not compatible with it? (not comfortable with using patches for production critical uses).

ddahan commented Sep 3, 2014

Django 1.7 is released!
Can we officially say that Tastypie is not compatible with it? (not comfortable with using patches for production critical uses).

@un33k

This comment has been minimized.

Show comment Hide comment
@un33k

un33k Sep 3, 2014

I'd say give a week or two and see what happens.
Alternatively you can move to using restless, which is a leaner, meaner and cleaner framework by the same author as tastypie.

If you need to look away, then DRF seems to be a "very good" choice at this point, as it "now" has a successful kickstarter that will only make it better (let's hope) as it gets dedicated attention.

un33k commented Sep 3, 2014

I'd say give a week or two and see what happens.
Alternatively you can move to using restless, which is a leaner, meaner and cleaner framework by the same author as tastypie.

If you need to look away, then DRF seems to be a "very good" choice at this point, as it "now" has a successful kickstarter that will only make it better (let's hope) as it gets dedicated attention.

@aRkadeFR

This comment has been minimized.

Show comment Hide comment
@aRkadeFR

aRkadeFR Sep 8, 2014

I'm using both DRF and Tastypie. I'm in need of tastypie for Django 1.7
Waiting for the patch :)

aRkadeFR commented Sep 8, 2014

I'm using both DRF and Tastypie. I'm in need of tastypie for Django 1.7
Waiting for the patch :)

@AndrewGrossman

This comment has been minimized.

Show comment Hide comment
@AndrewGrossman

AndrewGrossman Sep 8, 2014

Contributor

@aRkadeFR Until it's fixed in the main repo, I have a patched version including @coagulant's and @un33k's fixes here.

Contributor

AndrewGrossman commented Sep 8, 2014

@aRkadeFR Until it's fixed in the main repo, I have a patched version including @coagulant's and @un33k's fixes here.

@un33k

This comment has been minimized.

Show comment Hide comment
@un33k

un33k Sep 8, 2014

Could you test and issue a pull request with your combine patch?

On Mon, Sep 8, 2014 at 2:49 PM, AndrewGrossman notifications@github.com
wrote:

@aRkadeFR https://github.com/aRkadeFR Until it's fixed in the main
repo, I have a patched version including @coagulant
https://github.com/coagulant's and @un33k https://github.com/un33k's
fixes here
https://github.com/AndrewGrossman/django-tastypie/tree/feature/django-1.7
.


Reply to this email directly or view it on GitHub
toastdriven#1115 (comment)
.

un33k commented Sep 8, 2014

Could you test and issue a pull request with your combine patch?

On Mon, Sep 8, 2014 at 2:49 PM, AndrewGrossman notifications@github.com
wrote:

@aRkadeFR https://github.com/aRkadeFR Until it's fixed in the main
repo, I have a patched version including @coagulant
https://github.com/coagulant's and @un33k https://github.com/un33k's
fixes here
https://github.com/AndrewGrossman/django-tastypie/tree/feature/django-1.7
.


Reply to this email directly or view it on GitHub
toastdriven#1115 (comment)
.

@AndrewGrossman

This comment has been minimized.

Show comment Hide comment
@AndrewGrossman

AndrewGrossman Sep 8, 2014

Contributor

@un33k My version is based off of a yet-to-be merged pull request from @coagulant's repo; my preference would be to at least wait for that.

Contributor

AndrewGrossman commented Sep 8, 2014

@un33k My version is based off of a yet-to-be merged pull request from @coagulant's repo; my preference would be to at least wait for that.

@erikcw

This comment has been minimized.

Show comment Hide comment
@erikcw

erikcw Sep 9, 2014

@AndrewGrossman I've been testing your repo (commit 54eb2cd) and getting this traceback:

raceback (most recent call last):
  File "/Users/erik/Dropbox/home/git/proj/api/tests/test_advertiser.py", line 160, in test_get_detail_as_subuser
    resp = self.api_client.get(self.detail_url, format='json', authentication=self.get_credentials(user=subuser))
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/test.py", line 68, in get
    return self.client.get(uri, **kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 467, in get
    **extra)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 285, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 355, in generic
    return self.request(**r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 437, in request
    six.reraise(*exc_info)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 201, in wrapper
    response = callback(request, *args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 441, in dispatch_detail
    return self.dispatch('detail', request, **kwargs)
  File "/Users/erik/Dropbox/home/git/proj/api/resources.py", line 63, in dispatch
    return super(BasePortalResource, self).dispatch(request_type, request, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 459, in dispatch
    self.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 542, in is_authenticated
    auth_result = self._meta.authentication.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 504, in is_authenticated
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 198, in is_authenticated
    except (User.DoesNotExist, User.MultipleObjectsReturned):
AttributeError: 'function' object has no attribute 'DoesNotExist'

erikcw commented Sep 9, 2014

@AndrewGrossman I've been testing your repo (commit 54eb2cd) and getting this traceback:

raceback (most recent call last):
  File "/Users/erik/Dropbox/home/git/proj/api/tests/test_advertiser.py", line 160, in test_get_detail_as_subuser
    resp = self.api_client.get(self.detail_url, format='json', authentication=self.get_credentials(user=subuser))
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/test.py", line 68, in get
    return self.client.get(uri, **kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 467, in get
    **extra)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 285, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 355, in generic
    return self.request(**r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 437, in request
    six.reraise(*exc_info)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 201, in wrapper
    response = callback(request, *args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 441, in dispatch_detail
    return self.dispatch('detail', request, **kwargs)
  File "/Users/erik/Dropbox/home/git/proj/api/resources.py", line 63, in dispatch
    return super(BasePortalResource, self).dispatch(request_type, request, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 459, in dispatch
    self.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 542, in is_authenticated
    auth_result = self._meta.authentication.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 504, in is_authenticated
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 198, in is_authenticated
    except (User.DoesNotExist, User.MultipleObjectsReturned):
AttributeError: 'function' object has no attribute 'DoesNotExist'
@AndrewGrossman

This comment has been minimized.

Show comment Hide comment
@AndrewGrossman

AndrewGrossman Sep 9, 2014

Contributor

@erikcw I've put a fix in on that branch. I have also created another branch using my original alternative method of handling this problem (as opposed to the incorporated patch from above), in a branch here.

Contributor

AndrewGrossman commented Sep 9, 2014

@erikcw I've put a fix in on that branch. I have also created another branch using my original alternative method of handling this problem (as opposed to the incorporated patch from above), in a branch here.

@erikcw

This comment has been minimized.

Show comment Hide comment
@erikcw

erikcw Sep 9, 2014

@AndrewGrossman

So the new commit now generates this related traceback:

raceback (most recent call last):
  File "/Users/erik/Dropbox/home/git/proj/api/tests/test_advertiser.py", line 160, in test_get_detail_as_subuser
    resp = self.api_client.get(self.detail_url, format='json', authentication=self.get_credentials(user=subuser))
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/test.py", line 68, in get
    return self.client.get(uri, **kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 467, in get
    **extra)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 285, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 355, in generic
    return self.request(**r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 437, in request
    six.reraise(*exc_info)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 201, in wrapper
    response = callback(request, *args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 441, in dispatch_detail
    return self.dispatch('detail', request, **kwargs)
  File "/Users/erik/Dropbox/home/git/proj/api/resources.py", line 63, in dispatch
    return super(BasePortalResource, self).dispatch(request_type, request, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 459, in dispatch
    self.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 542, in is_authenticated
    auth_result = self._meta.authentication.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 503, in is_authenticated
    check = backend.is_authenticated(request, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 197, in is_authenticated
    user = User.objects.get(**lookup_kwargs)
AttributeError: 'function' object has no attribute 'objects'

I'll test your alternate branch.

erikcw commented Sep 9, 2014

@AndrewGrossman

So the new commit now generates this related traceback:

raceback (most recent call last):
  File "/Users/erik/Dropbox/home/git/proj/api/tests/test_advertiser.py", line 160, in test_get_detail_as_subuser
    resp = self.api_client.get(self.detail_url, format='json', authentication=self.get_credentials(user=subuser))
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/test.py", line 68, in get
    return self.client.get(uri, **kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 467, in get
    **extra)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 285, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 355, in generic
    return self.request(**r)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/test/client.py", line 437, in request
    six.reraise(*exc_info)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 201, in wrapper
    response = callback(request, *args, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 441, in dispatch_detail
    return self.dispatch('detail', request, **kwargs)
  File "/Users/erik/Dropbox/home/git/proj/api/resources.py", line 63, in dispatch
    return super(BasePortalResource, self).dispatch(request_type, request, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 459, in dispatch
    self.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/resources.py", line 542, in is_authenticated
    auth_result = self._meta.authentication.is_authenticated(request)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 503, in is_authenticated
    check = backend.is_authenticated(request, **kwargs)
  File "/Users/erik/.virtualenvs/proj/src/django-tastypie/tastypie/authentication.py", line 197, in is_authenticated
    user = User.objects.get(**lookup_kwargs)
AttributeError: 'function' object has no attribute 'objects'

I'll test your alternate branch.

@gusreyes01

This comment has been minimized.

Show comment Hide comment
@gusreyes01

gusreyes01 Sep 11, 2014

@AndrewGrossman your patch worked excellent for me,thanks! I just had to replace the my models.py for yours on my TastyPie branch.

Seems to work well until the official merge is done.

Regards.

@AndrewGrossman your patch worked excellent for me,thanks! I just had to replace the my models.py for yours on my TastyPie branch.

Seems to work well until the official merge is done.

Regards.

@toastdriven

This comment has been minimized.

Show comment Hide comment
@toastdriven

toastdriven Sep 12, 2014

Contributor

This should be fixed as a result of merging #1214. Please open new issues/PRs should you run into further issues.

Contributor

toastdriven commented Sep 12, 2014

This should be fixed as a result of merging #1214. Please open new issues/PRs should you run into further issues.

@ddahan

This comment has been minimized.

Show comment Hide comment
@ddahan

ddahan Sep 14, 2014

I'm not sure to understand well. Is Tastypie officially compatible with Django 1.7 now?

ddahan commented Sep 14, 2014

I'm not sure to understand well. Is Tastypie officially compatible with Django 1.7 now?

@toastdriven

This comment has been minimized.

Show comment Hide comment
@toastdriven

toastdriven Sep 18, 2014

Contributor

@spythonman Yes, Tastypie is Django 1.7 compatible as of v0.12.0.

Contributor

toastdriven commented Sep 18, 2014

@spythonman Yes, Tastypie is Django 1.7 compatible as of v0.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment