Hi, everyone!
On my local machine evrething is fine, but when i trying to deploy my code to pythonanywhere, i got such problem during user registration.
Any ideas how to fix it?
> Environment:
Request Method: POST
Request URL: http://scorpionby.pythonanywhere.com/adminauth/user/add/
Django Version: 1.8
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',
'article',
'loginsys')
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 "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/handlers/base.py" in get_response
132. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/admin/options.py" in wrapper
616. return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in _wrapped_view
110. response = view_func(request, *args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/admin/sites.py" in inner
233. return view(request, *args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in _wrapper
34. return bound_func(*args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
76. return view(request, *args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in bound_func
30. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in _wrapper
34. return bound_func(*args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in _wrapped_view
110. response = view_func(request, *args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in bound_func
30. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in inner
145. return func(*args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/auth/admin.py" in add_view
121. extra_context)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/admin/options.py" in add_view
1516. return self.changeform_view(request, None, form_url, extra_context)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in _wrapper
34. return bound_func(*args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in _wrapped_view
110. response = view_func(request, *args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in bound_func
30. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/utils/decorators.py" in inner
145. return func(*args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/admin/options.py" in changeform_view
1467. self.save_model(request, new_object, form, not add)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/contrib/admin/options.py" in save_model
1078. obj.save()
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/models/base.py" in save
710. force_update=force_update, update_fields=update_fields)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/models/base.py" in save_base
738. updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/models/base.py" in _save_table
822. result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/models/base.py" in _do_insert
861. using=using, raw=raw)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/models/manager.py" in manager_method
127. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/models/query.py" in _insert
920. return query.get_compiler(using=using).execute_sql(return_id)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/models/sql/compiler.py" in execute_sql
963. cursor.execute(sql, params)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/backends/utils.py" in execute
79. return super(CursorDebugWrapper, self).execute(sql, params)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/utils.py" in __exit__
97. six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/backends/utils.py" in execute
64. return self.cursor.execute(sql, params)
File "/home/scorpionby/.virtualenvs/djangoenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/db/backends/sqlite3/base.py" in execute
318. return Database.Cursor.execute(self, query, params)
Exception Type: IntegrityError at /adminauth/user/add/
Exception Value: NOT NULL constraint failed: auth_user.last_login
[ edited by admin: formatting ]