etianen/django-reversion — Issue #131: list_editable doesn't work with VersionAdmin in Django 1.4
Author: Velmont
Created: 2012-02-19 19:35:58+00:00
State: open

AssertionError: Cannot reorder a query once a slice has been taken.

```
Environment:

Request Method: GET
Request URL: http://medlem.nynorsk.no/admin/medlem/lokallag/

Django Version: 1.4a1
Python Version: 2.6.5
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'medlemssys.medlem',
'reversion')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'reversion.middleware.RevisionMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:
File "/srv/www/medlem.nynorsk.no/env/src/django/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/contrib/admin/options.py" in wrapper
368. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/utils/decorators.py" in _wrapped_view
91. response = view_func(request, *args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/views/decorators/cache.py" in _wrapped_view_func
89. response = view_func(request, *args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/contrib/admin/sites.py" in inner
196. return view(request, *args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/db/transaction.py" in inner
209. return func(*args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/lib/python2.6/site-packages/reversion/revisions.py" in do_revision_context
279. return func(*args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/lib/python2.6/site-packages/reversion/admin.py" in changelist_view
378. return super(VersionAdmin, self).changelist_view(request, context)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/utils/decorators.py" in _wrapper
25. return bound_func(*args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/utils/decorators.py" in _wrapped_view
91. response = view_func(request, *args, **kwargs)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/utils/decorators.py" in bound_func
21. return func(self, *args2, **kwargs2)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/contrib/admin/options.py" in changelist_view
1215. formset = cl.formset = FormSet(queryset=cl.result_list)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/forms/models.py" in __init__
424. super(BaseModelFormSet, self).__init__(**defaults)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/forms/formsets.py" in __init__
50. self._construct_forms()
File "/srv/www/medlem.nynorsk.no/env/src/django/django/forms/formsets.py" in _construct_forms
114. for i in xrange(self.total_form_count()):
File "/srv/www/medlem.nynorsk.no/env/src/django/django/forms/formsets.py" in total_form_count
90. initial_forms = self.initial_form_count()
File "/srv/www/medlem.nynorsk.no/env/src/django/django/forms/models.py" in initial_form_count
429. return len(self.get_queryset())
File "/srv/www/medlem.nynorsk.no/env/src/django/django/forms/models.py" in get_queryset
471. qs = qs.order_by(self.model._meta.pk.name)
File "/srv/www/medlem.nynorsk.no/env/src/django/django/db/models/query.py" in order_by
753. "Cannot reorder a query once a slice has been taken."

Exception Type: AssertionError at /admin/medlem/lokallag/
Exception Value: Cannot reorder a query once a slice has been taken.
```