django 1.7 upgrade + tastypie -> AppRegistryNotReady

215 views
Skip to first unread message

Frank Bieniek

unread,
Jul 2, 2014, 10:49:24 AM7/2/14
to django...@googlegroups.com
Hi all,
does currently anybody upgrade his
django 1.6 projects with south and tastypie to the new django1.7

Resources definition of Tastypie collids with the new app registry loading.

I do want to upgrade the project to django 1.7
but I can not replace the whole rest api app -
"an upgrade fork idea" would be great.

Thats the problem:
class MyResource(ModelResource):
...
class Meta:
queryset = AnyModel.objects.all()

Some models just hit the AppRegistryNotReady Exception...

Any Ideas/Hints/Magic are welcome

Thanks
Frank

Tom Evans

unread,
Jul 2, 2014, 12:13:17 PM7/2/14
to django...@googlegroups.com
Four options (and these are basically the same for any third party
library you use)

1) Wait for Tastypie developers to add support for Django 1.7 to a
release, using 1.6 in the meantime
2) Add support for Django 1.7 to Tastypie and send the patch to
Tastypie developers
3) Hire someone to do 2)
4) Work around the issue if possible

Tastypie is a very popular framework, so I would expect them to have a
release out that supports Django 1.7 soon after Django 1.7 is actually
released.

As a work around, can you give a callable as the "queryset" attribute
on your resource meta class?

Cheers

Tom

Frank Bieniek

unread,
Jul 2, 2014, 5:40:30 PM7/2/14
to django...@googlegroups.com
Thanks Tom for the 4 evergreen options.

Tastypies currently does not allow to deferr it to a callable,
it accesses a property on the queryset...
https://github.com/toastdriven/django-tastypie/blob/master/tastypie/resources.py#L1712

As I do not understand the new app registry and how a normal django
model form can,
deferr their meta model handling, I was looking for some hints for
building a workaround.

Thanks
Frank


Am 02.07.14 18:12, schrieb Tom Evans:
Reply all
Reply to author
Forward
0 new messages