Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Django 1.7 RuntimeError: App registry isn't ready yet. #1115
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
natecox
commented
Jan 18, 2014
Anyone out there have knowledge of this? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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.
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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.
benjaminEwhite
commented
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:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
ryan-blunden
commented
Feb 12, 2014
Looking forward to this getting fixed. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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: Tested with my application and works. No unittest. |
referenced
this issue
in asmallteapot/django-tastypie
Mar 10, 2014
ghost
referenced this issue
in cboelsen/tastytopping
Apr 15, 2014
Closed
Test against the latest django when tastypie supports 1.7 #3
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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.
ryan-blunden
commented
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Quintasan
commented
Apr 24, 2014
@toastdriven just tried @un33k 's patch, lookin' good. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
iambibhas
commented
May 24, 2014
Really need this now. Any update? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
natecox
commented
May 24, 2014
@iambibhas Highly recommend Django Rest Framework as an alternative. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
rolandgeider
May 24, 2014
Contributor
@natecox Are you using it? Do you have the impression that it's being developed more actively?
@natecox Are you using it? Do you have the impression that it's being developed more actively? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
iambibhas
commented
May 25, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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. ;)
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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 ,
-
Get tastypie from git
git clone https://github.com/toastdriven/django-tastypie.git -
cd django-tastypie/tastypie
-
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
or just wget the raw file: I hope this helps. |
klainn
commented
Jun 15, 2014
Thanks @jnvilo your write up helped lots. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
steffann
Jun 23, 2014
Contributor
I know it has been said before, but: please merge this important and simple fix.
I know it has been said before, but: please merge this important and simple fix. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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
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 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
burakk
commented
Jul 1, 2014
Is there any progress on this issue? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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. 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. |
coagulant
referenced this issue
Sep 4, 2014
Closed
In Django 1.7+, models.py generates a AppRegistryNotReady error upon import #1219
AndrewGrossman
referenced this issue
Sep 4, 2014
Closed
Django 1.7 compatibility for applications making use of django.contrib.a... #1221
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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.
@aRkadeFR Until it's fixed in the main repo, I have a patched version including @coagulant's and @un33k's fixes here. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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.
@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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
erikcw
Sep 9, 2014
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
So the new commit now generates this related traceback:
I'll test your alternate branch. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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.
gusreyes01
commented
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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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.
This should be fixed as a result of merging #1214. Please open new issues/PRs should you run into further issues. |
toastdriven
closed this
Sep 12, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
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? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
toastdriven
Sep 18, 2014
Contributor
@spythonman Yes, Tastypie is Django 1.7 compatible as of v0.12.0.
@spythonman Yes, Tastypie is Django 1.7 compatible as of v0.12.0. |
natecox commentedJan 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)?