I am trying to implement website login using Facebook credentials. I see different responses when I press Cancel on Facebook widget or Okay. When I press Cancel I see the following
Environment:
Request Method: GET
Request URL: http://wakevent.com/complete/facebook/?redirect_state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT&error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied&state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT
Django Version: 1.8.2
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'mainapp',
'social.apps.django_app.default')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'social.apps.django_app.middleware.SocialAuthExceptionMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view
58. return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py" in wrapper
51. return func(request, backend, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py" in complete
28. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/actions.py" in do_complete
43. user = backend.complete(user=user, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/backends/base.py" in complete
41. return self.auth_complete(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/utils.py" in wrapper
229. return func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/backends/facebook.py" in auth_complete
68. self.process_error(self.data)
File "/usr/local/lib/python2.7/dist-packages/social/backends/facebook.py" in process_error
60. super(FacebookOAuth2, self).process_error(data)
File "/usr/local/lib/python2.7/dist-packages/social/backends/oauth.py" in process_error
363. raise AuthCanceled(self, data.get('error_description', ''))
Exception Type: AuthCanceled at /complete/facebook/
Exception Value: Authentication process canceled
Which is predicatble. But when I press Okay I see another error.
Environment:
Request Method: GET
Request URL: http://wakevent.com/complete/facebook/?redirect_state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT&code=AQBe5WWQYk9BJE2fvNIt0RWVYxLaddhXT6t3UQwtF3aJcvbbLrVwsMlxsKEgwulVAtV4WHlYG5lG1HbEHk_cjFhMfWEHy9B8dedrOZagw0AWyGVyvaFtRqOn8_3G8nQb2nEe-DZMdG13V7Jgzrebtu6QXxGuyNzZPVXRnbPiKGUz8jW2p-r_wWB7QAuW-6rdZuII8_1ePBBoGgzmLlKLvMLfZoCqI62h0slF5t2IoAraHahRtnkWeIeH6AVf5u4vzZ8qXatz9fuun8ZK-8rqv5p5HDWZOdydNGm7ZtNh0g1OSpZU4TFAGxAqWbo0LpgiCRs&state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT
Django Version: 1.8.2
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'mainapp',
'social.apps.django_app.default')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'social.apps.django_app.middleware.SocialAuthExceptionMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view
58. return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py" in wrapper
51. return func(request, backend, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py" in complete
28. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/actions.py" in do_complete
43. user = backend.complete(user=user, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/backends/base.py" in complete
41. return self.auth_complete(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/social/utils.py" in wrapper
232. raise AuthCanceled(args[0])
Exception Type: AuthCanceled at /complete/facebook/
Exception Value: Authentication process canceled
I am running the website locally on Ubuntu 14.04 apache web server with 80 port. I suspect wrong Facebook app setup but do not know what to debug.
Also, I can mention that Twitter login is working on the same setup.
Please advise!
I did wrong Facebook app setup. In the Security / Server IP Whitelist I put 127.0.0.1 address. The problem was gone after removing this address (blank space is okey).
Check the redirect URL. I had wrongly specified redirect URL along with client ID while making post request. For Facebook redirect URI is optional. Try removing that and it will work fine.
Related
We currently have a CA setup with django connected through its API (dogtag). We recently set up a new subordinate CA and tried to redirect django to this new IP, however we are receiving the following error when submitting a CSR request to my CA using django:
KeyError at /
'Output'
Request Method: POST
Request URL: https://10.10.50.4/
Django Version: 2.2.14
Python Executable: /app/PKIWeb/venv/bin/python3.6 Python Version: 3.6.6 Python Path: ['/app/PKIWeb', '/app/PKIWeb/venv/bin', '/app/PKIWeb/venv/lib64/python36.zip', '/app/PKIWeb/venv/lib64/python3.6', '/app/PKIWeb/venv/lib64/python3.6/lib-dynload', '/usr/lib64/python3.6', '/usr/lib/python3.6', '/app/PKIWeb/venv/lib/python3.6/site-packages']
Server time: Sáb, 26 Jun 2021 21:14:30 -0400 Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'core',
'api',
'django_extensions',
'widget_tweaks',
'rest_framework',
'rest_framework_api_key',
'drf_yasg']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'camaracomercio.middleware.CsrAPILocaleMiddleware']
Traceback:
File "/app/PKIWeb/venv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
97. return handler(request, *args, **kwargs)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/django/views/generic/edit.py" in post
142. return self.form_valid(form)
File "/app/PKIWeb/core/views.py" in form_valid
39. cert_request_infos = self.request_ca_certificate(data, profile)
File "/app/PKIWeb/core/views.py" in request_ca_certificate
62. enroll_request = client.create_enrollment_request(profile, data)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/pki/__init__.py" in handler
304. return fn_call(inst, *args, **kwargs)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/pki/cert.py" in create_enrollment_request
962. enrollment_template = self.get_enrollment_template(profile_id)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/pki/__init__.py" in handler
304. return fn_call(inst, *args, **kwargs)
File "/app/PKIWeb/venv/lib/python3.6/site-packages/pki/cert.py" in get_enrollment_template
945. enrollment_template = CertEnrollmentRequest.from_json(r.json())
File "/app/PKIWeb/venv/lib/python3.6/site-packages/pki/cert.py" in from_json
520. outputs = attr_list['Output']
Exception Type: KeyError at /
Exception Value: 'Output'
This only happens with my new CA, this means I had an old CA setup and didn't face these issues.
Any inputs?
I am using cookie cutter Django and on the url http://localhost:8000/accounts/login/ whenever I enter a wrong password I am getting the following traceback and a 500 Internal Server Error on the network console. I am using sqlite database. I am not able to understand why I am getting this error because when I create an empty project using the same database no such error is thrown.
Environment:
Request Method: POST
Request URL: http://localhost:8000/accounts/login/
Django Version: 2.1.4
Python Version: 3.6.7
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'crispy_forms',
'allauth',
'allauth.account',
'allauth.socialaccount',
'rest_framework',
'widget_tweaks',
'core.users.apps.UsersAppConfig',
'core.userManagement.apps.UsermanagementConfig',
'debug_toolbar',
'django_extensions']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware']
Traceback:
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/views/generic/base.py" in view
68. return self.dispatch(request, *args, **kwargs)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/utils/decorators.py" in _wrapper
45. return bound_method(*args, **kwargs)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
76. return view(request, *args, **kwargs)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/allauth/account/views.py" in dispatch
137. return super(LoginView, self).dispatch(request, *args, **kwargs)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/allauth/account/views.py" in dispatch
80. **kwargs)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/views/generic/base.py" in dispatch
88. return handler(request, *args, **kwargs)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/allauth/account/views.py" in post
102. if form.is_valid():
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/forms/forms.py" in is_valid
185. return self.is_bound and not self.errors
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/forms/forms.py" in errors
180. self.full_clean()
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/forms/forms.py" in full_clean
382. self._clean_form()
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/forms/forms.py" in _clean_form
409. cleaned_data = self.clean()
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/allauth/account/forms.py" in clean
179. **credentials)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/allauth/account/adapter.py" in authenticate
489. user = authenticate(request, **credentials)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/contrib/auth/__init__.py" in authenticate
73. user = backend.authenticate(request, **credentials)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/allauth/account/auth_backends.py" in authenticate
26. ret = self._authenticate_by_username(**credentials)
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/allauth/account/auth_backends.py" in _authenticate_by_username
40. user = filter_users_by_username(username).get()
File "/home/power/Documents/Projects/core/venv/lib/python3.6/site-packages/django/db/models/query.py" in get
403. (self.model._meta.object_name, num)
Exception Type: MultipleObjectsReturned at /accounts/login/
Exception Value: get() returned more than one User -- it returned 2!
I was trying to add django-allauth to my Django web app and I am getting an error when trying to sign up. The error happens when sending the email. The domain variable at that point is getting my computer's name (I am working in locahost) that has a non-ascii character. The error is being raised in the core.mail module of Django. How could I fix this?
Thanks in advance.
Environment:
Request Method: POST
Request URL: http://localhost:8000/accounts/signup/
Django Version: 1.8.1
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django_extensions',
'debug_toolbar',
'sorl.thumbnail',
'core',
'authentication',
'allauth',
'allauth.account',
'allauth.socialaccount')
Installed Middleware:
(u'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
34. return bound_func(*args, **kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
76. return view(request, *args, **kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
30. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/views.py" in dispatch
169. return super(SignupView, self).dispatch(request, *args, **kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/views.py" in dispatch
66. **kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/views.py" in dispatch
147. **kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
89. return handler(request, *args, **kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/views.py" in post
82. response = self.form_valid(form)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/views.py" in form_valid
185. self.get_success_url())
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/utils.py" in complete_signup
157. signal_kwargs=signal_kwargs)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/utils.py" in perform_login
114. send_email_confirmation(request, user, signup=signup)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/utils.py" in send_email_confirmation
286. signup=signup)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/models.py" in send_confirmation
60. confirmation.send(request, signup=signup)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/models.py" in send
137. ctx)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/allauth/account/adapter.py" in send_mail
101. msg.send()
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/core/mail/message.py" in send
304. return self.get_connection(fail_silently).send_messages([self])
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/core/mail/backends/console.py" in send_messages
36. self.write_message(message)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/core/mail/backends/console.py" in write_message
18. msg = message.message()
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/core/mail/message.py" in message
284. msg['Message-ID'] = make_msgid(domain=DNS_NAME)
File "/Users/user/.virtualenvs/app/lib/python2.7/site-packages/django/core/mail/message.py" in make_msgid
64. msgid = '<%s.%s.%s%s#%s>' % (utcdate, pid, randint, idstring, domain)
Exception Type: UnicodeDecodeError at /accounts/signup/
Exception Value: 'ascii' codec can't decode byte 0xc3 in position 18: ordinal not in range(128)
I answer my own question. This is an existing issue with python (Issue 9377). Basically, it is necessary to change your computer's name to something without non-ASCII characters. My recommendation is to do it through the terminal with the next command: sudo scutil --set HostName [NewHostNameHere]. Probably will also be required restarting the computer.
I'm getting an error when trying to follow the quickstart example of the Django Rest Framework. As far as i can tell i've set up everything as needed, I've gone over it a couple of times, but can't seem to find the error
The error is as follows
Environment:
Request Method: GET
Request URL: http://webdev.lab.unlab.ca/
Django Version: 1.6
Python Version: 2.7.3
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
114. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view
57. return view_func(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
399. response = self.handle_exception(exc)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in dispatch
387. self.initial(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in initial
317. self.check_permissions(request)
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in check_permissions
273. for permission in self.get_permissions():
File "/usr/local/lib/python2.7/dist-packages/rest_framework/views.py" in get_permissions
226. return [permission() for permission in self.permission_classes]
Exception Type: TypeError at /
Exception Value: 'type' object is not iterable
anyone see what's going on?
The permission_classes in your View/ViewSet must be a tuple
You wrote something like this:
permission_classes = (permissions.IsAuthenticated)
forgetting a comma.
try with:
permission_classes = (permissions.IsAuthenticated,)
The variable
self.permission_classes
in the line:
return [permission() for permission in self.permission_classes]
does not return a list. And therefore your server is unable to loop over it, i.e. "not iterable".
As the title states, I created a 'child' page and BAM: 500. Following is what I believe is the actual traceback, and a bit of information on the 500 page that I believe is germane to the topic.
Is there anything I can do? I attempted to manually remove the page afterwards to no prevail. (Don't worry, I modified a copy of the database).
AssertionError at /admin/cms/page/
Negative indexing is not supported.
Request Method: GET
Request URL: http://192.168.56.101:8080/admin/cms/page/
Django Version: 1.3.1
Exception Type: AssertionError
Exception Value:
Negative indexing is not supported.
Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/models/query.py in __getitem__, line 157
Python Executable: /usr/bin/python
Python Version: 2.7.3
Environment:
Request Method: GET
Request URL: http://192.168.56.101:8080/admin/cms/page/
Django Version: 1.3.1
Python Version: 2.7.3
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.staticfiles',
'cms',
'menus',
'mptt',
'south',
'cms.plugins.text',
'cms.plugins.picture',
'cms.plugins.link',
'cms.plugins.file',
'cms.plugins.snippet',
'cms.plugins.googlemap',
'sekizai',
'registration',
'cms_themes']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware')
Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py" in wrapper
307. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py" in _wrapped_view
93. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
79. response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in inner
197. return view(request, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/cms/admin/pageadmin.py" in changelist_view
657. cl.set_items(request)
File "/usr/local/lib/python2.7/dist-packages/cms/admin/change_list.py" in set_items
198. children[-1].last = False
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in __getitem__
157. "Negative indexing is not supported."
Exception Type: AssertionError at /admin/cms/page/
Exception Value: Negative indexing is not supported.
Make sure your version of django-mptt is 0.5.1.