Created
January 2, 2016 13:47
-
-
Save andrewsmedina/c5ee574a5b5b2944b66d to your computer and use it in GitHub Desktop.
output from django-admin2 tests with django 1.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
py27-dj1.8.x installed: Django==1.8.7,django-braces==1.8.1,django-crispy-forms==1.5.2,django-debug-toolbar==1.4,django-extra-views==0.7.1,django-filter==0.11.0,django-floppyforms==1.2.0,djangorestframework==2.4.4,py==1.4.31,pytest==2.8.5,pytest-django==2.9.1,pytz==2014.7,six==1.10.0,sqlparse==0.1.18,wheel==0.24.0 | |
py27-dj1.8.x runtests: PYTHONHASHSEED='1485872978' | |
py27-dj1.8.x runtests: commands[0] | py.test | |
============================= test session starts ============================== | |
platform darwin -- Python 2.7.10, pytest-2.8.5, py-1.4.31, pluggy-0.3.1 | |
django settings: example.settings (from environment variable) | |
rootdir: /Users/andrews/projects/opensource/django-admin2, inifile: | |
plugins: django-2.9.1 | |
collected 212 items | |
djadmin2/tests/test_actions.py .. | |
djadmin2/tests/test_admin2tags.py .......... | |
djadmin2/tests/test_auth_admin.py .. | |
djadmin2/tests/test_core.py .......... | |
djadmin2/tests/test_renderers.py ................. | |
djadmin2/tests/test_types.py ....... | |
djadmin2/tests/test_utils.py .................. | |
djadmin2/tests/test_views.py ... | |
example/blog/tests/test_apiviews.py ........ | |
example/blog/tests/test_builtin_api_resources.py ........ | |
example/blog/tests/test_filters.py . | |
example/blog/tests/test_modelforms.py .........F..........F................ | |
example/blog/tests/test_nestedobjects.py ..F... | |
example/blog/tests/test_permissions.py F..FF. | |
example/blog/tests/test_views.py ....F.FFFFFFFFFFFFFFFFFF.F...F.FF..... | |
example/files/tests/test_models.py ... | |
example/files/tests/test_views.py ............... | |
example/polls/tests/test_models.py ...... | |
example/polls/tests/test_views.py .FFFFF.F...F.FF | |
=================================== FAILURES =================================== | |
_______________ GetFloppyformWidgetTest.test_hiddeninput_widget ________________ | |
self = <blog.tests.test_modelforms.GetFloppyformWidgetTest testMethod=test_hiddeninput_widget> | |
def test_hiddeninput_widget(self): | |
self.assertExpectWidget( | |
forms.widgets.HiddenInput(), | |
floppyforms.widgets.HiddenInput) | |
widget = forms.widgets.HiddenInput() | |
> widget.is_hidden = False | |
E AttributeError: can't set attribute | |
example/blog/tests/test_modelforms.py:106: AttributeError | |
___________ GetFloppyformWidgetTest.test_splithiddendatetime_widget ____________ | |
self = <blog.tests.test_modelforms.GetFloppyformWidgetTest testMethod=test_splithiddendatetime_widget> | |
def test_splithiddendatetime_widget(self): | |
widget = forms.widgets.SplitHiddenDateTimeWidget() | |
self.assertExpectWidget( | |
widget, | |
> floppyforms.widgets.SplitHiddenDateTimeWidget) | |
example/blog/tests/test_modelforms.py:327: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
example/blog/tests/test_modelforms.py:25: in assertExpectWidget | |
new_instance = floppify_widget(instance) | |
djadmin2/forms.py:246: in floppify_widget | |
return create_widget(widget) | |
djadmin2/forms.py:76: in create_new_widget | |
time_format=original.widgets[1].format) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <floppyforms.widgets.SplitHiddenDateTimeWidget object at 0x11194af50> | |
attrs = {}, date_format = None, time_format = None | |
def __init__(self, attrs=None, date_format=None, time_format=None): | |
super(SplitHiddenDateTimeWidget, self).__init__(attrs, date_format, | |
time_format) | |
for widget in self.widgets: | |
widget.input_type = 'hidden' | |
> widget.is_hidden = True | |
E AttributeError: can't set attribute | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/floppyforms/widgets.py:571: AttributeError | |
_________________ NestedObjectsTests.test_on_delete_do_nothing _________________ | |
self = <blog.tests.test_nestedobjects.NestedObjectsTests testMethod=test_on_delete_do_nothing> | |
def test_on_delete_do_nothing(self): | |
""" | |
Check that the nested collector doesn't query for DO_NOTHING objects. | |
""" | |
objs = [Event.objects.create()] | |
n = NestedObjects(using=None) | |
EventGuide.objects.create(event=objs[0]) | |
with self.assertNumQueries(2): | |
# One for Location, one for Guest, and no query for EventGuide | |
> n.collect(objs) | |
example/blog/tests/test_nestedobjects.py:73: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
djadmin2/utils.py:134: in collect | |
return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:223: in collect | |
batches = self.get_del_batches(new_objs, field) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:169: in get_del_batches | |
connections[self.using].ops.bulk_batch_size([field.name], objs), 1) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <django.db.utils.ConnectionHandler object at 0x1100b6810>, alias = None | |
def __getitem__(self, alias): | |
> if hasattr(self._connections, alias): | |
E TypeError: hasattr(): attribute name must be string | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/utils.py:235: TypeError | |
__________________ TemplatePermissionTest.test_admin_binding ___________________ | |
self = <blog.tests.test_permissions.TemplatePermissionTest testMethod=test_admin_binding> | |
def test_admin_binding(self): | |
user_admin = djadmin2.default.get_admin_by_name('auth_user') | |
post_admin = djadmin2.default.get_admin_by_name('blog_post') | |
request = self.factory.get(reverse('admin2:auth_user_index')) | |
request.user = self.user | |
permissions = TemplatePermissionChecker(request, user_admin) | |
post = Post.objects.create(title='Hello', body='world') | |
context = { | |
'post': post, | |
'post_admin': post_admin, | |
'permissions': permissions, | |
} | |
result = self.render( | |
'{% load admin2_tags %}' | |
'{{ permissions|for_admin:post_admin }}', | |
context) | |
self.assertEqual(result, '') | |
result = self.render( | |
'{% load admin2_tags %}' | |
'{{ permissions.has_add_permission }}' | |
'{% with permissions|for_admin:post_admin as permissions %}' | |
'{{ permissions.has_add_permission }}' | |
'{% endwith %}', | |
context) | |
self.assertEqual(result, 'FalseFalse') | |
post_add_permission = Permission.objects.get( | |
content_type__app_label='blog', | |
content_type__model='post', | |
codename='add_post') | |
self.user.user_permissions.add(post_add_permission) | |
# invalidate the users permission cache | |
if hasattr(self.user, '_perm_cache'): | |
del self.user._perm_cache | |
result = self.render( | |
'{% load admin2_tags %}' | |
'{{ permissions.has_add_permission }}' | |
'{% with permissions|for_admin:post_admin as permissions %}' | |
'{{ permissions.has_add_permission }}' | |
'{% endwith %}' | |
'{{ permissions.blog_post.has_add_permission }}', | |
context) | |
> self.assertEqual(result, 'FalseTrueTrue') | |
E AssertionError: u'FalseFalseFalse' != 'FalseTrueTrue' | |
example/blog/tests/test_permissions.py:137: AssertionError | |
________________ TemplatePermissionTest.test_permission_wrapper ________________ | |
self = <blog.tests.test_permissions.TemplatePermissionTest testMethod=test_permission_wrapper> | |
def test_permission_wrapper(self): | |
model_admin = ModelAdmin2(Post, djadmin2.default) | |
request = self.factory.get(reverse('admin2:blog_post_index')) | |
request.user = self.user | |
permissions = TemplatePermissionChecker(request, model_admin) | |
context = { | |
'permissions': permissions, | |
} | |
result = self.render( | |
'{{ permissions.has_unvalid_permission }}', | |
context) | |
self.assertEqual(result, '') | |
result = self.render('{{ permissions.has_add_permission }}', context) | |
self.assertEqual(result, 'False') | |
post_add_permission = Permission.objects.get( | |
content_type__app_label='blog', | |
content_type__model='post', | |
codename='add_post') | |
self.user.user_permissions.add(post_add_permission) | |
# invalidate the users permission cache | |
if hasattr(self.user, '_perm_cache'): | |
del self.user._perm_cache | |
result = self.render('{{ permissions.has_add_permission }}', context) | |
> self.assertEqual(result, 'True') | |
E AssertionError: u'False' != 'True' | |
example/blog/tests/test_permissions.py:55: AssertionError | |
___________________ TemplatePermissionTest.test_view_binding ___________________ | |
self = <blog.tests.test_permissions.TemplatePermissionTest testMethod=test_view_binding> | |
def test_view_binding(self): | |
user_admin = djadmin2.default.get_admin_by_name('auth_user') | |
post_admin = djadmin2.default.get_admin_by_name('blog_post') | |
request = self.factory.get(reverse('admin2:auth_user_index')) | |
request.user = self.user | |
permissions = TemplatePermissionChecker(request, user_admin) | |
context = { | |
'post_admin': post_admin, | |
'post_add_view': post_admin.create_view, | |
'permissions': permissions, | |
} | |
result = self.render( | |
'{% load admin2_tags %}' | |
'{{ permissions|for_view:"add" }}', | |
context) | |
self.assertEqual(result, 'False') | |
# view classes are not supported yet | |
result = self.render( | |
'{% load admin2_tags %}' | |
'{{ permissions|for_view:post_add_view }}', | |
context) | |
self.assertEqual(result, '') | |
result = self.render( | |
'{% load admin2_tags %}' | |
# user add permission | |
'{{ permissions.has_add_permission }}' | |
'{% with permissions|for_admin:"blog_post"|for_view:"add" as post_add_perm %}' | |
# post add permission | |
'{{ post_add_perm }}' | |
'{% endwith %}', | |
context) | |
self.assertEqual(result, 'FalseFalse') | |
post_add_permission = Permission.objects.get( | |
content_type__app_label='blog', | |
content_type__model='post', | |
codename='add_post') | |
self.user.user_permissions.add(post_add_permission) | |
user_change_permission = Permission.objects.get( | |
content_type__app_label='auth', | |
content_type__model='user', | |
codename='change_user') | |
self.user.user_permissions.add(user_change_permission) | |
# invalidate the users permission cache | |
if hasattr(self.user, '_perm_cache'): | |
del self.user._perm_cache | |
result = self.render( | |
'{% load admin2_tags %}' | |
# user add permission | |
'{{ permissions.has_add_permission }}' | |
'{% with permissions|for_admin:"blog_post"|for_view:"add" as post_add_perm %}' | |
# post add permission | |
'{{ post_add_perm }}' | |
'{% endwith %}' | |
# user change permission | |
'{{ permissions|for_view:"change" }}', | |
context) | |
> self.assertEqual(result, 'FalseTrueTrue') | |
E AssertionError: u'FalseFalseFalse' != 'FalseTrueTrue' | |
example/blog/tests/test_permissions.py:220: AssertionError | |
_____________________ PostListTest.test_actions_displayed ______________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_actions_displayed> | |
def test_actions_displayed(self): | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:140: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
___________________ PostListTest.test_all_unselected_action ____________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_all_unselected_action> | |
def test_all_unselected_action(self): | |
self._create_posts() | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:293: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
____________________ PostListTest.test_delete_selected_post ____________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_delete_selected_post> | |
def test_delete_selected_post(self): | |
post = Post.objects.create(title="A Post Title", body="body") | |
params = {'action': 'DeleteSelectedAction', | |
'selected_model_pk': str(post.pk)} | |
> response = self.client.post(reverse("admin2:blog_post_index"), params) | |
example/blog/tests/test_views.py:154: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:512: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:313: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/views.py:134: in post | |
response = action_callable.as_view(queryset=queryset, model_admin=self.model_admin)(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/actions.py:167: in post | |
return self.get(request) | |
djadmin2/actions.py:111: in get | |
return super(BaseListAction, self).get(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:158: in get | |
context = self.get_context_data(**kwargs) | |
djadmin2/actions.py:98: in get_context_data | |
collector.collect(self.queryset) | |
djadmin2/utils.py:134: in collect | |
return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:223: in collect | |
batches = self.get_del_batches(new_objs, field) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:169: in get_del_batches | |
connections[self.using].ops.bulk_batch_size([field.name], objs), 1) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <django.db.utils.ConnectionHandler object at 0x1100b6810>, alias = None | |
def __getitem__(self, alias): | |
> if hasattr(self._connections, alias): | |
E TypeError: hasattr(): attribute name must be string | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/utils.py:235: TypeError | |
_____________ PostListTest.test_delete_selected_post_confirmation ______________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_delete_selected_post_confirmation> | |
def test_delete_selected_post_confirmation(self): | |
post = Post.objects.create(title="A Post Title", body="body") | |
params = {'action': 'DeleteSelectedAction', | |
'selected_model_pk': str(post.pk), 'confirmed': 'yes'} | |
response = self.client.post(reverse("admin2:blog_post_index"), params) | |
> self.assertRedirects(response, reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:164: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/testcases.py:290: in assertRedirects | |
secure=(scheme == 'https')) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________ PostListTest.test_delete_selected_post_none_selected _____________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_delete_selected_post_none_selected> | |
def test_delete_selected_post_none_selected(self): | |
Post.objects.create(title="A Post Title", body="body") | |
params = {'action': 'DeleteSelectedAction'} | |
response = self.client.post( | |
> reverse("admin2:blog_post_index"), params, follow=True) | |
example/blog/tests/test_views.py:170: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:514: in post | |
response = self._handle_redirects(response, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:661: in _handle_redirects | |
response = self.get(url.path, QueryDict(url.query), follow=False, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_________________________ PostListTest.test_drilldowns _________________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_drilldowns> | |
def test_drilldowns(self): | |
self._create_posts() | |
> response = self.client.get(reverse('admin2:blog_post_index')) | |
example/blog/tests/test_views.py:210: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
____________________ PostListTest.test_list_filter_presence ____________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_list_filter_presence> | |
def test_list_filter_presence(self): | |
Post.objects.create(title="post_1_title", body="body") | |
Post.objects.create(title="post_2_title", body="another body") | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:131: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
____________________ PostListTest.test_list_selected_shows _____________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_list_selected_shows> | |
def test_list_selected_shows(self): | |
Post.objects.create(title="post_1_title", body="body") | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:136: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
__________________________ PostListTest.test_ordering __________________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_ordering> | |
def test_ordering(self): | |
self._create_posts() | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:269: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_______________________ PostListTest.test_renderer_body ________________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_renderer_body> | |
def test_renderer_body(self): | |
Post.objects.create( | |
title='title', body='a lowercase body', published=False) | |
> response = self.client.get(reverse('admin2:blog_post_index')) | |
example/blog/tests/test_views.py:194: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________________ PostListTest.test_renderer_published _____________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_renderer_published> | |
def test_renderer_published(self): | |
Post.objects.create(title='title', body='body', published=True) | |
> response = self.client.get(reverse('admin2:blog_post_index')) | |
example/blog/tests/test_views.py:204: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_______________________ PostListTest.test_renderer_title _______________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_renderer_title> | |
def test_renderer_title(self): | |
Post.objects.create( | |
title='a lowercase title', body='body', published=False) | |
> response = self.client.get(reverse('admin2:blog_post_index')) | |
example/blog/tests/test_views.py:188: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
____________________ PostListTest.test_renderer_unpublished ____________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_renderer_unpublished> | |
def test_renderer_unpublished(self): | |
Post.objects.create(title='title', body='body', published=False) | |
> response = self.client.get(reverse('admin2:blog_post_index')) | |
example/blog/tests/test_views.py:199: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
________________________ PostListTest.test_search_posts ________________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_search_posts> | |
def test_search_posts(self): | |
Post.objects.create(title="A Post Title", body="body") | |
Post.objects.create(title="Another Post Title", body="body") | |
Post.objects.create( | |
title="Post With Keyword In Body", body="another post body") | |
params = {"q": "another"} | |
> response = self.client.get(reverse("admin2:blog_post_index"), params) | |
example/blog/tests/test_views.py:180: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
__________________________ PostListTest.test_view_ok ___________________________ | |
self = <blog.tests.test_views.PostListTest testMethod=test_view_ok> | |
def test_view_ok(self): | |
post = Post.objects.create(title="A Post Title", body="body") | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:125: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
________ PostListTestCustomAction.test_publish_action_displayed_in_list ________ | |
self = <blog.tests.test_views.PostListTestCustomAction testMethod=test_publish_action_displayed_in_list> | |
def test_publish_action_displayed_in_list(self): | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:331: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________ PostListTestCustomAction.test_publish_selected_items _____________ | |
self = <blog.tests.test_views.PostListTestCustomAction testMethod=test_publish_selected_items> | |
def test_publish_selected_items(self): | |
post = Post.objects.create(title="A Post Title", | |
body="body", | |
published=False) | |
self.assertEqual(Post.objects.filter(published=True).count(), 0) | |
params = {'action': 'CustomPublishAction', | |
'selected_model_pk': str(post.pk), | |
'confirmed': 'yes'} | |
response = self.client.post(reverse("admin2:blog_post_index"), params) | |
> self.assertRedirects(response, reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:345: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/testcases.py:290: in assertRedirects | |
secure=(scheme == 'https')) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_______ PostListTestCustomAction.test_unpublish_action_displayed_in_list _______ | |
self = <blog.tests.test_views.PostListTestCustomAction testMethod=test_unpublish_action_displayed_in_list> | |
def test_unpublish_action_displayed_in_list(self): | |
> response = self.client.get(reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:350: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
____________ PostListTestCustomAction.test_unpublish_selected_items ____________ | |
self = <blog.tests.test_views.PostListTestCustomAction testMethod=test_unpublish_selected_items> | |
def test_unpublish_selected_items(self): | |
post = Post.objects.create(title="A Post Title", | |
body="body", | |
published=True) | |
self.assertEqual(Post.objects.filter(published=True).count(), 1) | |
params = {'action': 'unpublish_items', | |
'selected_model_pk': str(post.pk)} | |
response = self.client.post(reverse("admin2:blog_post_index"), params) | |
> self.assertRedirects(response, reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:363: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/testcases.py:290: in assertRedirects | |
secure=(scheme == 'https')) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________________ PostCreateViewTest.test_create_post ______________________ | |
self = <blog.tests.test_views.PostCreateViewTest testMethod=test_create_post> | |
def test_create_post(self): | |
# Generated by inspecting the request with the pdb debugger | |
post_data = { | |
"comments-TOTAL_FORMS": u'2', | |
"comments-INITIAL_FORMS": u'0', | |
"comments-MAX_NUM_FORMS": u'', | |
"comments-0-body": u'Comment Body', | |
'comments-0-post': '', | |
'comments-0-id': '', | |
"title": "A Post Title", | |
"body": "a_post_body", | |
} | |
response = self.client.post(reverse("admin2:blog_post_create"), | |
post_data, | |
> follow=True) | |
example/blog/tests/test_views.py:400: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:514: in post | |
response = self._handle_redirects(response, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:661: in _handle_redirects | |
response = self.get(url.path, QueryDict(url.query), follow=False, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________________ PostDeleteViewTest.test_delete_post ______________________ | |
self = <blog.tests.test_views.PostDeleteViewTest testMethod=test_delete_post> | |
def test_delete_post(self): | |
post = Post.objects.create(title="A Post Title", body="body") | |
response = self.client.post(reverse("admin2:blog_post_delete", | |
args=(post.pk, ))) | |
> self.assertRedirects(response, reverse("admin2:blog_post_index")) | |
example/blog/tests/test_views.py:459: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/testcases.py:290: in assertRedirects | |
secure=(scheme == 'https')) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_________________ PostDeleteActionTest.test_confirmation_page __________________ | |
self = <blog.tests.test_views.PostDeleteActionTest testMethod=test_confirmation_page> | |
def test_confirmation_page(self): | |
p1 = Post.objects.create(title="A Post Title", body="body") | |
p2 = Post.objects.create(title="A Post Title", body="body") | |
post_data = { | |
'action': 'DeleteSelectedAction', | |
'selected_model_pk': [p1.pk, p2.pk] | |
} | |
response = self.client.post(reverse("admin2:blog_post_index"), | |
> post_data) | |
example/blog/tests/test_views.py:477: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:512: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:313: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/views.py:134: in post | |
response = action_callable.as_view(queryset=queryset, model_admin=self.model_admin)(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/actions.py:167: in post | |
return self.get(request) | |
djadmin2/actions.py:111: in get | |
return super(BaseListAction, self).get(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:158: in get | |
context = self.get_context_data(**kwargs) | |
djadmin2/actions.py:98: in get_context_data | |
collector.collect(self.queryset) | |
djadmin2/utils.py:134: in collect | |
return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:223: in collect | |
batches = self.get_del_batches(new_objs, field) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:169: in get_del_batches | |
connections[self.using].ops.bulk_batch_size([field.name], objs), 1) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <django.db.utils.ConnectionHandler object at 0x1100b6810>, alias = None | |
def __getitem__(self, alias): | |
> if hasattr(self._connections, alias): | |
E TypeError: hasattr(): attribute name must be string | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/utils.py:235: TypeError | |
____________________ PostDeleteActionTest.test_results_page ____________________ | |
self = <blog.tests.test_views.PostDeleteActionTest testMethod=test_results_page> | |
def test_results_page(self): | |
p1 = Post.objects.create(title="A Post Title", body="body") | |
p2 = Post.objects.create(title="A Post Title", body="body") | |
post_data = { | |
'action': 'DeleteSelectedAction', | |
'selected_model_pk': [p1.pk, p2.pk], | |
'confirmed': 'yes' | |
} | |
response = self.client.post(reverse("admin2:blog_post_index"), | |
> post_data, follow=True) | |
example/blog/tests/test_views.py:490: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:514: in post | |
response = self._handle_redirects(response, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:661: in _handle_redirects | |
response = self.get(url.path, QueryDict(url.query), follow=False, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:333: in _qs_date_or_datetime | |
qs = object_list.dates(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:631: in dates | |
'datefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________________ PollListTest.test_actions_displayed ______________________ | |
self = <polls.tests.test_views.PollListTest testMethod=test_actions_displayed> | |
def test_actions_displayed(self): | |
> response = self.client.get(reverse("admin2:polls_poll_index")) | |
example/polls/tests/test_views.py:41: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:331: in _qs_date_or_datetime | |
qs = object_list.datetimes(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:652: in datetimes | |
'datetimefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
____________________ PollListTest.test_delete_selected_poll ____________________ | |
self = <polls.tests.test_views.PollListTest testMethod=test_delete_selected_poll> | |
def test_delete_selected_poll(self): | |
poll = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
params = {'action': 'DeleteSelectedAction', | |
'selected_model_pk': str(poll.pk)} | |
> response = self.client.post(reverse("admin2:polls_poll_index"), params) | |
example/polls/tests/test_views.py:50: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:512: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:313: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/views.py:134: in post | |
response = action_callable.as_view(queryset=queryset, model_admin=self.model_admin)(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/actions.py:167: in post | |
return self.get(request) | |
djadmin2/actions.py:111: in get | |
return super(BaseListAction, self).get(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:158: in get | |
context = self.get_context_data(**kwargs) | |
djadmin2/actions.py:98: in get_context_data | |
collector.collect(self.queryset) | |
djadmin2/utils.py:134: in collect | |
return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:223: in collect | |
batches = self.get_del_batches(new_objs, field) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:169: in get_del_batches | |
connections[self.using].ops.bulk_batch_size([field.name], objs), 1) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <django.db.utils.ConnectionHandler object at 0x1100b6810>, alias = None | |
def __getitem__(self, alias): | |
> if hasattr(self._connections, alias): | |
E TypeError: hasattr(): attribute name must be string | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/utils.py:235: TypeError | |
_____________ PollListTest.test_delete_selected_poll_confirmation ______________ | |
self = <polls.tests.test_views.PollListTest testMethod=test_delete_selected_poll_confirmation> | |
def test_delete_selected_poll_confirmation(self): | |
poll = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
params = {'action': 'DeleteSelectedAction', | |
'selected_model_pk': str(poll.pk), 'confirmed': 'yes'} | |
response = self.client.post(reverse("admin2:polls_poll_index"), params) | |
> self.assertRedirects(response, reverse("admin2:polls_poll_index")) | |
example/polls/tests/test_views.py:60: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/testcases.py:290: in assertRedirects | |
secure=(scheme == 'https')) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:331: in _qs_date_or_datetime | |
qs = object_list.datetimes(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:652: in datetimes | |
'datetimefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________ PollListTest.test_delete_selected_poll_none_selected _____________ | |
self = <polls.tests.test_views.PollListTest testMethod=test_delete_selected_poll_none_selected> | |
def test_delete_selected_poll_none_selected(self): | |
Poll.objects.create(question="some question", pub_date=timezone.now()) | |
params = {'action': 'DeleteSelectedAction'} | |
response = self.client.post( | |
> reverse("admin2:polls_poll_index"), params, follow=True) | |
example/polls/tests/test_views.py:66: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:514: in post | |
response = self._handle_redirects(response, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:661: in _handle_redirects | |
response = self.get(url.path, QueryDict(url.query), follow=False, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:331: in _qs_date_or_datetime | |
qs = object_list.datetimes(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:652: in datetimes | |
'datetimefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
__________________________ PollListTest.test_view_ok ___________________________ | |
self = <polls.tests.test_views.PollListTest testMethod=test_view_ok> | |
def test_view_ok(self): | |
poll = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
> response = self.client.get(reverse("admin2:polls_poll_index")) | |
example/polls/tests/test_views.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:331: in _qs_date_or_datetime | |
qs = object_list.datetimes(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:652: in datetimes | |
'datetimefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________________ PollCreateViewTest.test_create_poll ______________________ | |
self = <polls.tests.test_views.PollCreateViewTest testMethod=test_create_poll> | |
def test_create_poll(self): | |
params = { | |
"question": "some question", | |
"pub_date": "2012-01-01", | |
"choice_set-TOTAL_FORMS": u'0', | |
"choice_set-INITIAL_FORMS": u'0', | |
"choice_set-MAX_NUM_FORMS": u'', | |
} | |
response = self.client.post(reverse("admin2:polls_poll_create"), | |
params, | |
> follow=True) | |
example/polls/tests/test_views.py:97: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:514: in post | |
response = self._handle_redirects(response, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:661: in _handle_redirects | |
response = self.get(url.path, QueryDict(url.query), follow=False, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:331: in _qs_date_or_datetime | |
qs = object_list.datetimes(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:652: in datetimes | |
'datetimefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_____________________ PollDeleteViewTest.test_delete_poll ______________________ | |
self = <polls.tests.test_views.PollDeleteViewTest testMethod=test_delete_poll> | |
def test_delete_poll(self): | |
poll = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
response = self.client.post(reverse("admin2:polls_poll_delete", | |
args=(poll.pk, ))) | |
> self.assertRedirects(response, reverse("admin2:polls_poll_index")) | |
example/polls/tests/test_views.py:153: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/testcases.py:290: in assertRedirects | |
secure=(scheme == 'https')) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:331: in _qs_date_or_datetime | |
qs = object_list.datetimes(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:652: in datetimes | |
'datetimefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
_________________ PollDeleteActionTest.test_confirmation_page __________________ | |
self = <polls.tests.test_views.PollDeleteActionTest testMethod=test_confirmation_page> | |
def test_confirmation_page(self): | |
p1 = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
p2 = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
params = { | |
'action': 'DeleteSelectedAction', | |
'selected_model_pk': [p1.pk, p2.pk] | |
} | |
response = self.client.post(reverse("admin2:polls_poll_index"), | |
> params) | |
example/polls/tests/test_views.py:173: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:512: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:313: in post | |
secure=secure, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/views.py:134: in post | |
response = action_callable.as_view(queryset=queryset, model_admin=self.model_admin)(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
djadmin2/actions.py:167: in post | |
return self.get(request) | |
djadmin2/actions.py:111: in get | |
return super(BaseListAction, self).get(request) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:158: in get | |
context = self.get_context_data(**kwargs) | |
djadmin2/actions.py:98: in get_context_data | |
collector.collect(self.queryset) | |
djadmin2/utils.py:134: in collect | |
return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:223: in collect | |
batches = self.get_del_batches(new_objs, field) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/deletion.py:169: in get_del_batches | |
connections[self.using].ops.bulk_batch_size([field.name], objs), 1) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <django.db.utils.ConnectionHandler object at 0x1100b6810>, alias = None | |
def __getitem__(self, alias): | |
> if hasattr(self._connections, alias): | |
E TypeError: hasattr(): attribute name must be string | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/utils.py:235: TypeError | |
____________________ PollDeleteActionTest.test_results_page ____________________ | |
self = <polls.tests.test_views.PollDeleteActionTest testMethod=test_results_page> | |
def test_results_page(self): | |
p1 = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
p2 = Poll.objects.create( | |
question="some question", pub_date=timezone.now()) | |
params = { | |
'action': 'DeleteSelectedAction', | |
'selected_model_pk': [p1.pk, p2.pk], | |
'confirmed': 'yes' | |
} | |
response = self.client.post(reverse("admin2:polls_poll_index"), | |
> params, follow=True) | |
example/polls/tests/test_views.py:188: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:514: in post | |
response = self._handle_redirects(response, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:661: in _handle_redirects | |
response = self.get(url.path, QueryDict(url.query), follow=False, **extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:500: in get | |
**extra) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:303: in get | |
return self.generic('GET', path, secure=secure, **r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:379: in generic | |
return self.request(**r) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/test/client.py:466: in request | |
six.reraise(*exc_info) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/core/handlers/base.py:132: in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:71: in view | |
return self.dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:116: in dispatch | |
return super(Admin2Mixin, self).dispatch(request, *args, **kwargs) | |
djadmin2/viewmixins.py:61: in dispatch | |
return super(PermissionMixin, self).dispatch(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/base.py:89: in dispatch | |
return handler(request, *args, **kwargs) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/views/generic/list.py:174: in get | |
context = self.get_context_data() | |
djadmin2/views.py:290: in get_context_data | |
context["dates"] = self._format_years(context) | |
djadmin2/views.py:295: in _format_years | |
years = self._qs_date_or_datetime(context['object_list'], 'year') | |
djadmin2/views.py:331: in _qs_date_or_datetime | |
qs = object_list.datetimes(self.model_admin.date_hierarchy, type) | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:652: in datetimes | |
'datetimefield', flat=True | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = [], field_names = () | |
def distinct(self, *field_names): | |
""" | |
Returns a new QuerySet instance that will select only distinct results. | |
""" | |
assert self.query.can_filter(), \ | |
> "Cannot create distinct fields once a slice has been taken." | |
E AssertionError: Cannot create distinct fields once a slice has been taken. | |
.tox/py27-dj1.8.x/lib/python2.7/site-packages/django/db/models/query.py:821: AssertionError | |
==================== 38 failed, 174 passed in 20.89 seconds ==================== | |
ERROR: InvocationError: '/Users/andrews/projects/opensource/django-admin2/.tox/py27-dj1.8.x/bin/py.test' | |
___________________________________ summary ____________________________________ | |
ERROR: py27-dj1.8.x: commands failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment