Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Can't set attribute" error on user registration #123

Closed
balkantechnologies opened this issue Nov 10, 2015 · 9 comments
Closed

"Can't set attribute" error on user registration #123

balkantechnologies opened this issue Nov 10, 2015 · 9 comments

Comments

@balkantechnologies
Copy link

When trying to register a new user, the following error occurs:

Here is the log:

AttributeError at /api/auth/registration/
can't set attribute
Request Method:
POST
Request URL:
http://127.0.0.1:8000/api/auth/registration/
Django Version:
1.8.6
Exception Type:
AttributeError
Exception Value:
can't set attribute
Exception Location:
/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages/rest_auth/registration/views.py in post, line 54
Python Executable:
/Users/bt/Development/Python/env/vremind/bin/python
Python Version:
2.7.10
Python Path:
['/Users/bt/Development/Python/projects/vremind',
'/Users/bt/Development/Python/env/vremind/lib/python27.zip',
'/Users/bt/Development/Python/env/vremind/lib/python2.7',
'/Users/bt/Development/Python/env/vremind/lib/python2.7/plat-darwin',
'/Users/bt/Development/Python/env/vremind/lib/python2.7/plat-mac',
'/Users/bt/Development/Python/env/vremind/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/bt/Development/Python/env/vremind/Extras/lib/python',
'/Users/bt/Development/Python/env/vremind/lib/python2.7/lib-tk',
'/Users/bt/Development/Python/env/vremind/lib/python2.7/lib-old',
'/Users/bt/Development/Python/env/vremind/lib/python2.7/lib-dynload',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages']
Server time:
Tue, 10 Nov 2015 12:52:47 +0000
Traceback Switch to copy-and-paste view
/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages/django/core/handlers/base.py in get_response
125. response = middleware_method(request, callback, callback_args, callback_kwargs)
126. if response:
127. break
128.
129. if response is None:
130. wrapped_callback = self.make_view_atomic(callback)
131. try:
132. response = wrapped_callback(request, _callback_args, *_callback_kwargs) ...

133. except Exception as e:
134. # If the view raised an exception, run it through exception
135. # middleware, and if the exception middleware returns a
136. # response, use that. Otherwise, reraise the exception.
137. for middleware_method in self.exception_middleware:
138. response = middleware_method(request, e)

▶ Local vars
Variable
Value
e
AttributeError("can't set attribute",)

callback_args
()

resolver_match
ResolverMatch(func=rest_auth.registration.views.RegisterView, args=(), kwargs={}, url_name=rest_register, app_name=None, namespaces=[])

middleware_method
<bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x109380850>>

self
<django.core.handlers.wsgi.WSGIHandler object at 0x108f21810>

request
"<WSGIRequest\npath:/api/auth/registration/,\nGET:<QueryDict: {}>,\nPOST:,\nCOOKIES:{},\nMETA:{'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.iMKDGiE1AR/Render',\n 'CONTENT_LENGTH': '90',\n 'CONTENT_TYPE': 'application/json;charset=UTF-8',\n u'CSRF_COOKIE': u'fyGGuiDUy1ZLZLu3epk9owOTiqxe0UHb',\n 'DJANGO_SETTINGS_MODULE': 'vremind.settings',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HOME': '/Users/bt',\n 'HTTP_ACCEPT': 'application/json, text/plain, /',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_HOST': '127.0.0.1:8000',\n 'HTTP_ORIGIN': 'http://127.0.0.1:9000',\n 'HTTP_REFERER': 'http://127.0.0.1:9000/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',\n 'LC_CTYPE': 'UTF-8',\n 'LOGNAME': 'bt',\n 'NVM_IOJS_ORG_MIRROR': 'https://iojs.org/dist',\n 'NVM_NODEJS_ORG_MIRROR': 'https://nodejs.org/dist',\n 'NVM_RC_VERSION': '',\n 'OLDPWD': '/Users/bt/Development/Python/projects',\n 'PATH': '/Users/bt/Development/Python/env/vremind/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',\n 'PATH_INFO': u'/api/auth/registration/',\n 'PS1': '(vremind)\h:\W \u\$ ',\n 'PWD': '/Users/bt/Development/Python/projects/vremind',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '127.0.0.1',\n 'REMOTE_HOST': '',\n 'REQUEST_METHOD': 'POST',\n 'RUN_MAIN': 'true',\n 'SCRIPT_NAME': u'',\n 'SECURITYSESSIONID': '186ef',\n 'SERVER_NAME': 'arjans-macbook-pro.local',\n 'SERVER_PORT': '8000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.10',\n 'SHELL': '/bin/bash',\n 'SHLVL': '1',\n 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.i6vX1PgOaQ/Listeners',\n 'TERM': 'xterm-256color',\n 'TERM_PROGRAM': 'Apple_Terminal',\n 'TERM_PROGRAM_VERSION': '361',\n 'TERM_SESSION_ID': '5A515916-B6DD-444F-BC1E-2437D91FAA6A',\n 'TMPDIR': '/var/folders/mj/wn1t2_0d6kx8vyvm_5175_l00000gp/T/',\n 'TZ': 'UTC',\n 'USER': 'bt',\n 'VERSIONER_PYTHON_PREFER_32_BIT': 'no',\n 'VERSIONER_PYTHON_VERSION': '2.7',\n 'VIRTUAL_ENV': '/Users/bt/Development/Python/env/vremind',\n 'XPC_FLAGS': '0x0',\n 'XPC_SERVICE_NAME': '0',\n '
': './manage.py',\n '__CF_USER_TEXT_ENCODING': '0x1F6:0x0:0x0',\n 'wsgi.errors': <open file '', mode 'w' at 0x10821b1e0>,\n 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1091edbb0>,\n 'wsgi.input': <socket._fileobject object at 0x109336e50>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>"

callback
<function RegisterView at 0x10aaf7050>

wrapped_callback
<function RegisterView at 0x10aaf7050>

resolver
<RegexURLResolver 'vremind.urls' (None:None) ^/>

callback_kwargs
{}

response
None

urlconf
'vremind.urls'

/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages/django/views/decorators/csrf.py in wrapped_view
51. """
52. Marks a view function as being exempt from the CSRF view protection.
53. """
54. # We could just do view_func.csrf_exempt = True, but decorators
55. # are nicer if they don't have side-effects, so we return a new
56. # function.
57. def wrapped_view(_args, *_kwargs):
58. return view_func(_args, *_kwargs) ...

59. wrapped_view.csrf_exempt = True
60. return wraps(view_func, assigned=available_attrs(view_func))(wrapped_view)

▶ Local vars
Variable
Value
args
(<WSGIRequest: POST '/api/auth/registration/'>,)

view_func
<function RegisterView at 0x10a6c9938>

kwargs
{}

/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages/django/views/generic/base.py in view
64. def view(request, _args, _kwargs):
65. self = cls(
_initkwargs)
66. if hasattr(self, 'get') and not hasattr(self, 'head'):
67. self.head = self.get
68. self.request = request
69. self.args = args
70. self.kwargs = kwargs
71. return self.dispatch(request, *args, *kwargs) ...

72.
73. # take name and docstring from class
74. update_wrapper(view, cls, updated=())
75.
76. # and possible attributes set by decorators
77. # like csrf_exempt from dispatch

▶ Local vars
Variable
Value
initkwargs
{}

self
<rest_auth.registration.views.RegisterView object at 0x10ab2b2d0>

args
()

request
"<WSGIRequest\npath:/api/auth/registration/,\nGET:<QueryDict: {}>,\nPOST:,\nCOOKIES:{},\nMETA:{'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.iMKDGiE1AR/Render',\n 'CONTENT_LENGTH': '90',\n 'CONTENT_TYPE': 'application/json;charset=UTF-8',\n u'CSRF_COOKIE': u'fyGGuiDUy1ZLZLu3epk9owOTiqxe0UHb',\n 'DJANGO_SETTINGS_MODULE': 'vremind.settings',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HOME': '/Users/bt',\n 'HTTP_ACCEPT': 'application/json, text/plain, /',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_HOST': '127.0.0.1:8000',\n 'HTTP_ORIGIN': 'http://127.0.0.1:9000',\n 'HTTP_REFERER': 'http://127.0.0.1:9000/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',\n 'LC_CTYPE': 'UTF-8',\n 'LOGNAME': 'bt',\n 'NVM_IOJS_ORG_MIRROR': 'https://iojs.org/dist',\n 'NVM_NODEJS_ORG_MIRROR': 'https://nodejs.org/dist',\n 'NVM_RC_VERSION': '',\n 'OLDPWD': '/Users/bt/Development/Python/projects',\n 'PATH': '/Users/bt/Development/Python/env/vremind/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',\n 'PATH_INFO': u'/api/auth/registration/',\n 'PS1': '(vremind)\h:\W \u\$ ',\n 'PWD': '/Users/bt/Development/Python/projects/vremind',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '127.0.0.1',\n 'REMOTE_HOST': '',\n 'REQUEST_METHOD': 'POST',\n 'RUN_MAIN': 'true',\n 'SCRIPT_NAME': u'',\n 'SECURITYSESSIONID': '186ef',\n 'SERVER_NAME': 'arjans-macbook-pro.local',\n 'SERVER_PORT': '8000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.10',\n 'SHELL': '/bin/bash',\n 'SHLVL': '1',\n 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.i6vX1PgOaQ/Listeners',\n 'TERM': 'xterm-256color',\n 'TERM_PROGRAM': 'Apple_Terminal',\n 'TERM_PROGRAM_VERSION': '361',\n 'TERM_SESSION_ID': '5A515916-B6DD-444F-BC1E-2437D91FAA6A',\n 'TMPDIR': '/var/folders/mj/wn1t2_0d6kx8vyvm_5175_l00000gp/T/',\n 'TZ': 'UTC',\n 'USER': 'bt',\n 'VERSIONER_PYTHON_PREFER_32_BIT': 'no',\n 'VERSIONER_PYTHON_VERSION': '2.7',\n 'VIRTUAL_ENV': '/Users/bt/Development/Python/env/vremind',\n 'XPC_FLAGS': '0x0',\n 'XPC_SERVICE_NAME': '0',\n '
': './manage.py',\n '__CF_USER_TEXT_ENCODING': '0x1F6:0x0:0x0',\n 'wsgi.errors': <open file '', mode 'w' at 0x10821b1e0>,\n 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1091edbb0>,\n 'wsgi.input': <socket._fileobject object at 0x109336e50>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>"

kwargs
{}

cls
<class 'rest_auth.registration.views.RegisterView'>

/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages/rest_framework/views.py in dispatch
459. self.http_method_not_allowed)
460. else:
461. handler = self.http_method_not_allowed
462.
463. response = handler(request, _args, *_kwargs)
464.
465. except Exception as exc:
466. response = self.handle_exception(exc) ...

467.
468. self.response = self.finalize_response(request, response, _args, *_kwargs)
469. return self.response
470.
471. def options(self, request, _args, *_kwargs):
472. """

▶ Local vars
Variable
Value
exc
AttributeError("can't set attribute",)

self
<rest_auth.registration.views.RegisterView object at 0x10ab2b2d0>

args
()

request
<rest_framework.request.Request object at 0x10ab2b4d0>

handler
<bound method RegisterView.post of <rest_auth.registration.views.RegisterView object at 0x10ab2b2d0>>

kwargs
{}

/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages/rest_framework/views.py in dispatch
456. # Get the appropriate handler method
457. if request.method.lower() in self.http_method_names:
458. handler = getattr(self, request.method.lower(),
459. self.http_method_not_allowed)
460. else:
461. handler = self.http_method_not_allowed
462.
463. response = handler(request, _args, *_kwargs) ...

464.
465. except Exception as exc:
466. response = self.handle_exception(exc)
467.
468. self.response = self.finalize_response(request, response, _args, *_kwargs)
469. return self.response

▶ Local vars
Variable
Value
exc
AttributeError("can't set attribute",)

self
<rest_auth.registration.views.RegisterView object at 0x10ab2b2d0>

args
()

request
<rest_framework.request.Request object at 0x10ab2b4d0>

handler
<bound method RegisterView.post of <rest_auth.registration.views.RegisterView object at 0x10ab2b2d0>>

kwargs
{}

/Users/bt/Development/Python/env/vremind/lib/python2.7/site-packages/rest_auth/registration/views.py in post
47. request = self.request._request
48. return complete_signup(request, self.user,
49. app_settings.EMAIL_VERIFICATION,
50. self.get_success_url())
51.
52. def post(self, request, _args, *_kwargs):
53. self.initial = {}
54. self.request.POST = self.request.data.copy() ...

55. form_class = self.get_form_class()
56. self.form = self.get_form(form_class)
57. if self.form.is_valid():
58. self.form_valid(self.form)
59. return self.get_response()
60. else:

▶ Local vars
Variable
Value
self
<rest_auth.registration.views.RegisterView object at 0x10ab2b2d0>

args
()

request
<rest_framework.request.Request object at 0x10ab2b4d0>

kwargs
{}


Request information
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
No cookie data
META
Variable
Value
wsgi.version
(1, 0)
wsgi.multiprocess
False
RUN_MAIN
'true'
HTTP_REFERER
'http://127.0.0.1:9000/'
VERSIONER_PYTHON_PREFER_32_BIT
'no'
SERVER_SOFTWARE
'WSGIServer/0.1 Python/2.7.10'
LC_CTYPE
'UTF-8'
TERM_PROGRAM_VERSION
'361'
REQUEST_METHOD
'POST'
LOGNAME
'bt'
USER
'bt'
HTTP_ORIGIN
'http://127.0.0.1:9000'
PATH
'/Users/bt/Development/Python/env/vremind/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'
QUERY_STRING
''
HOME
'/Users/bt'
PS1
'(vremind)\h:\W \u$ '
wsgi.errors
<open file '', mode 'w' at 0x10821b1e0>
TERM_PROGRAM
'Apple_Terminal'
CONTENT_LENGTH
'90'
TERM
'xterm-256color'
SHELL
'/bin/bash'
TZ
'UTC'
SERVER_NAME
'arjans-macbook-pro.local'
VERSIONER_PYTHON_VERSION
'2.7'
SHLVL
'1'
SECURITYSESSIONID
'186ef'
XPC_FLAGS
'0x0'
wsgi.url_scheme
'http'
_
'./manage.py'
SERVER_PORT
'8000'
PATH_INFO
u'/api/auth/registration/'
TERM_SESSION_ID
'5A515916-B6DD-444F-BC1E-2437D91FAA6A'
SSH_AUTH_SOCK
'/private/tmp/com.apple.launchd.i6vX1PgOaQ/Listeners'
XPC_SERVICE_NAME
'0'
VIRTUAL_ENV
'/Users/bt/Development/Python/env/vremind'
wsgi.input
<socket.fileobject object at 0x109336e50>
Apple_PubSub_Socket_Render
'/private/tmp/com.apple.launchd.iMKDGiE1AR/Render'
HTTP_HOST
'127.0.0.1:8000'
SCRIPT_NAME
u''
wsgi.multithread
True
HTTP_CONNECTION
'keep-alive'
TMPDIR
'/var/folders/mj/wn1t2_0d6kx8vyvm_5175_l00000gp/T/'
HTTP_ACCEPT
'application/json, text/plain, /'
NVM_IOJS_ORG_MIRROR
'https://iojs.org/dist'
HTTP_USER_AGENT
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36'
GATEWAY_INTERFACE
'CGI/1.1'
wsgi.run_once
False
CSRF_COOKIE
u'fyGGuiDUy1ZLZLu3epk9owOTiqxe0UHb'
OLDPWD
'/Users/bt/Development/Python/projects'
REMOTE_ADDR
'127.0.0.1'
HTTP_ACCEPT_LANGUAGE
'en-US,en;q=0.8'
__CF_USER_TEXT_ENCODING
'0x1F6:0x0:0x0'
PWD
'/Users/bt/Development/Python/projects/vremind'
SERVER_PROTOCOL
'HTTP/1.1'
DJANGO_SETTINGS_MODULE
'vremind.settings'
CONTENT_TYPE
'application/json;charset=UTF-8'
wsgi.file_wrapper
''
REMOTE_HOST
''
HTTP_ACCEPT_ENCODING
'gzip, deflate'
NVM_RC_VERSION
''
NVM_NODEJS_ORG_MIRROR
'https://nodejs.org/dist'
Settings
Using settings module vremind.settings
Setting
Value
SECURE_BROWSER_XSS_FILTER
False
USE_THOUSAND_SEPARATOR
False
ACCOUNT_AUTHENTICATION_METHOD
'email'
CSRF_COOKIE_SECURE
False
LANGUAGE_CODE
'en-us'
ROOT_URLCONF
'vremind.urls'
MANAGERS
()
BASE_DIR
'/Users/bt/Development/Python/projects/vremind'
SILENCED_SYSTEM_CHECKS
[]
DEFAULT_CHARSET
'utf-8'
SESSION_SERIALIZER
'django.contrib.sessions.serializers.JSONSerializer'
ACCOUNT_EMAIL_REQUIRED
True
ALLOWED_HOSTS
[]
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
EMAIL_SUBJECT_PREFIX
'[Django] '
SERVER_EMAIL
'root@localhost'
SECURE_HSTS_SECONDS
0
STATICFILES_FINDERS
('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder')
SESSION_CACHE_ALIAS
'default'
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_NAME
'sessionid'
TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')
SECURE_REDIRECT_EXEMPT
[]
DATABASES
{'default': {'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.sqlite3',
'HOST': '',
'NAME': '/Users/bt/Development/Python/projects/vremind/db.sqlite3',
'OPTIONS': {},
'PASSWORD': u'*******************
',
'PORT': '',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': 'UTC',
'USER': ''}}
EMAIL_SSL_KEYFILE
u'****************'
FILE_UPLOAD_DIRECTORY_PERMISSIONS
None
FILE_UPLOAD_PERMISSIONS
None
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler')
TEMPLATE_CONTEXT_PROCESSORS
('django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages')
DEFAULT_CONTENT_TYPE
'text/html'
ACCOUNT_EMAIL_VERIFICATION
'mandatory'
APPEND_SLASH
True
LOCALE_PATHS
()
DATABASE_ROUTERS
[]
DEFAULT_TABLESPACE
''
YEAR_MONTH_FORMAT
'F Y'
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
CACHES
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
SESSION_COOKIE_PATH
'/'
SECURE_CONTENT_TYPE_NOSNIFF
False
MIDDLEWARE_CLASSES
('corsheaders.middleware.CorsMiddleware',
'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')
USE_I18N
True
THOUSAND_SEPARATOR
','
SECRET_KEY
u'
****************'
LANGUAGE_COOKIE_NAME
'django_language'
DEFAULT_INDEX_TABLESPACE
''
LOGGING_CONFIG
'logging.config.dictConfig'
TEMPLATE_LOADERS
('django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader')
FIRST_DAY_OF_WEEK
0
WSGI_APPLICATION
'vremind.wsgi.application'
TEMPLATE_DEBUG
False
X_FRAME_OPTIONS
'SAMEORIGIN'
CSRF_COOKIE_NAME
'csrftoken'
FORCE_SCRIPT_NAME
None
USE_X_FORWARDED_HOST
False
EMAIL_TIMEOUT
None
SECURE_SSL_HOST
None
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
SESSION_COOKIE_SECURE
False
CSRF_COOKIE_DOMAIN
None
FILE_CHARSET
'utf-8'
DEBUG
True
LANGUAGE_COOKIE_DOMAIN
None
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
INSTALLED_APPS
('modeltranslation',
'django.contrib.sites',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'rest_framework.authtoken',
'rest_auth',
'allauth',
'allauth.account',
'rest_auth.registration',
'corsheaders',
'companies')
LANGUAGES
(('en', 'English'), ('nl', 'Dutch'))
USE_L10N
True
STATIC_ROOT
None
SECURE_HSTS_INCLUDE_SUBDOMAINS
False
STATICFILES_DIRS
()
PREPEND_WWW
False
SECURE_PROXY_SSL_HEADER
None
LANGUAGE_COOKIE_AGE
None
SESSION_COOKIE_HTTPONLY
True
DEBUG_PROPAGATE_EXCEPTIONS
False
CSRF_COOKIE_AGE
31449600
MONTH_DAY_FORMAT
'F j'
LOGIN_URL
'/accounts/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
TIME_FORMAT
'P'
AUTH_USER_MODEL
'auth.User'
DATE_INPUT_FORMATS
('%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y')
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend')
EMAIL_HOST_PASSWORD
u'****************'
PASSWORD_RESET_TIMEOUT_DAYS
u'
****************'
SESSION_FILE_PATH
None
CACHE_MIDDLEWARE_ALIAS
'default'
SESSION_SAVE_EVERY_REQUEST
False
NUMBER_GROUPING
0
SESSION_ENGINE
'django.contrib.sessions.backends.db'
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
CSRF_COOKIE_PATH
'/'
LOGIN_REDIRECT_URL
'/accounts/profile/'
DECIMAL_SEPARATOR
'.'
IGNORABLE_404_URLS
()
MIGRATION_MODULES
{}
PASSWORD_HASHERS
u'****************'
TEMPLATE_STRING_IF_INVALID
''
LOGOUT_URL
'/accounts/logout/'
EMAIL_USE_TLS
True
FIXTURE_DIRS
()
EMAIL_HOST
'mail.vertinum.eu'
DATE_FORMAT
'N j, Y'
MEDIA_ROOT
''
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
ADMINS
()
FORMAT_MODULE_PATH
None
DEFAULT_FROM_EMAIL
'[email protected]'
REST_FRAMEWORK
{'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication'),
'DEFAULT_PERMISSION_CLASSES': ['rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly']}
MEDIA_URL
''
DATETIME_FORMAT
'N j, Y, P'
TEMPLATE_DIRS
()
SITE_ID
1
DISALLOWED_USER_AGENTS
()
ALLOWED_INCLUDE_ROOTS
()
LOGGING
{}
SHORT_DATE_FORMAT
'm/d/Y'
TEMPLATES
[{'APP_DIRS': True,
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages']}}]
TEST_RUNNER
'django.test.runner.DiscoverRunner'
CACHE_MIDDLEWARE_KEY_PREFIX
u'
_*****************'
SECURE_SSL_REDIRECT
False
TIME_ZONE
'UTC'
CORS_ORIGIN_ALLOW_ALL
True
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
EMAIL_BACKEND
'django.core.mail.backends.console.EmailBackend'
EMAIL_USE_SSL
False
CRISPY_TEMPLATE_PACK
'bootstrap3'
REST_AUTH_SERIALIZERS
{'USER_DETAILS_SERIALIZER': 'companies.serializers.UserSerializer'}
SESSION_COOKIE_AGE
1209600
SETTINGS_MODULE
'vremind.settings'
USE_ETAGS
False
LANGUAGES_BIDI
('he', 'ar', 'fa', 'ur')
FILE_UPLOAD_TEMP_DIR
None
INTERNAL_IPS
()
STATIC_URL
'/static/'
EMAIL_PORT
587
USE_TZ
True
SHORT_DATETIME_FORMAT
'm/d/Y P'
TEST_NON_SERIALIZED_APPS
[]
MODELTRANSLATION_DEFAULT_LANGUAGE
'en'
ABSOLUTE_URL_OVERRIDES
{}
LANGUAGE_COOKIE_PATH
'/'
CACHE_MIDDLEWARE_SECONDS
600
EMAIL_SSL_CERTFILE
None
CSRF_COOKIE_HTTPONLY
False
DATETIME_INPUT_FORMATS
('%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%Y-%m-%d',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M:%S.%f',
'%m/%d/%Y %H:%M',
'%m/%d/%Y',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f',
'%m/%d/%y %H:%M',
'%m/%d/%y')
EMAIL_HOST_USER
'vreminders'
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.

@mateusz-sikora
Copy link
Contributor

@balkantechnologies this should be already fixed on master branch

@javebratt
Copy link

EDIT: I downgraded the packages ans registrations is working smoothly.

@mateusz-sikora I'm getting the same problem, can't register users, it was working fine but I upgraded my pip packages, specifically:
Django==1.8.6 (from 1.8.5)
django-allauth==0.24.1 (from 0.23.0)
djangorestframework==3.3.1 (from 3.2.4)
python3-openid==3.0.9 (from 3.0.7)

Can't really tell what broke it, I just get a:

[17/Nov/2015 11:13:35] ERROR [django.request:256] Internal Server Error: /rest-auth/registration/
Traceback (most recent call last):
File "/home/javebratt/Development/MLMEvents/venv/lib/python3.4/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/home/javebratt/Development/MLMEvents/venv/lib/python3.4/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(_args, *_kwargs)
File "/home/javebratt/Development/MLMEvents/venv/lib/python3.4/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, _args, *_kwargs)
File "/home/javebratt/Development/MLMEvents/venv/lib/python3.4/site-packages/rest_framework/views.py", line 466, in dispatch
response = self.handle_exception(exc)
File "/home/javebratt/Development/MLMEvents/venv/lib/python3.4/site-packages/rest_framework/views.py", line 463, in dispatch
response = handler(request, _args, *_kwargs)
File "/home/javebratt/Development/MLMEvents/venv/lib/python3.4/site-packages/rest_auth/registration/views.py", line 54, in post
self.request.POST = self.request.data.copy()
AttributeError: can't set attribute

@ZachLiuGIS
Copy link

I got the same error if I use pip install django-rest-auth.

@javebratt, clone the master and install locally did fix the issue.

@javebratt
Copy link

@ZachLiuGIS Actually for me it wasn't that, django-rest-auth is working, the problem was my version of django-allauth, version 0.24.1 didn't work, but with 0.23.0 it works

@Aknilam
Copy link

Aknilam commented Nov 21, 2015

+1

@babinos87
Copy link

Today I upgraded to DRF 3.3.1 (from 3.2.3, that the registration was working fine) and got same issue as @balkantechnologies mentions it. Tried to locate where it breaks and the line that fails is this (in rest_auth/registration/views.py Line 54):

self.request.POST = self.request.data.copy()

If you take a look into the Release Notes for DRF here:
http://www.django-rest-framework.org/topics/release-notes/#33x-series

There was a change regarding accessing .POST method in DRF 3.3.1

So I am wondering if this issue has occurred because of this change in 3.3.1 DRF (this specific change was related to this bug so I made my question there as well):

encode/django-rest-framework#3592

@babinos87
Copy link

ok missed the comment from @mateusz-sikora
removed rest-auth with pip uninstall and cloned the updated source

now it works smoothly :)

One question only, will there be this fix to default rest-auth package as installed with pip? Current rest-auth 0.5.0 is the buggy version..

Thanks anyway :)

@andretietz
Copy link

+1
Please update the version I am installing via pip

@mariodev
Copy link
Contributor

0.6.0 has been released. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants