carlxaeron / django-rosetta

Automatically exported from code.google.com/p/django-rosetta
MIT License
0 stars 0 forks source link

New paginator raises deprecation warning (as of Django revision 7306) #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Update Django to SVN 7306
2. Start Rosetta
3. Get an error

Since the ObjectPaginator which Rosetta normally uses is Deprecated anyway,
I thought it would be nice to switch to the new Paginator object. I've
included a patch for both the profile.html template and views.py to fix the
problem.

Do note that I have not tested it with the current stable release so I'm
not sure it will work there.

Rick van Hattem
http://www.youtellme.com/

Original issue reported on code.google.com by Wolphie on 21 Mar 2008 at 2:11

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the patch. Unfortunately it is backwards-incompatible: users running 
any revision prior to [7306] will 
get similar results.

The bug is actually due to Django issue #6823: 
http://code.djangoproject.com/ticket/6823  Let's wait a couple 
days and see is the Django devs fix this.

Original comment by mbonetti on 21 Mar 2008 at 10:35

GoogleCodeExporter commented 8 years ago
The issue has been fixed in the Django SVN. Although it might be possible to 
make a 
hybrid solution which automatically detects if the Paginator class is available 
and 
falls back to the ObjectPaginator. 

I for one am not too happy with the deprecation warning ;)

Original comment by Wolphie on 23 Mar 2008 at 4:58

GoogleCodeExporter commented 8 years ago
aye: neither am I. :(

I'll look into a hybrid solution as soon as I can find some spare time.

Original comment by mbonetti on 23 Mar 2008 at 5:06

GoogleCodeExporter commented 8 years ago
Fixed as of [24]

I know, this isn't a real fix, what we'd really have to do is come up with a 
hybrid solution which will work for 
Django pre-7306, Django-trunk and for the day Django will get rid of the 
deprecated ObjectPaginator.

Original comment by mbonetti on 18 May 2008 at 1:03