Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

createsuperuser returns errors #5

Open
0x0c72 opened this issue Apr 22, 2015 · 1 comment
Open

createsuperuser returns errors #5

0x0c72 opened this issue Apr 22, 2015 · 1 comment

Comments

@0x0c72
Copy link

0x0c72 commented Apr 22, 2015

Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\core
\management__init__.py", line 338, in execute_from_command_line
utility.execute()
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\core
\management__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\core
\management\base.py", line 390, in run_from_argv
self.execute(_args, *_cmd_options)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\cont
rib\auth\management\commands\createsuperuser.py", line 50, in execute
return super(Command, self).execute(_args, *_options)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\core
\management\base.py", line 441, in execute
output = self.handle(_args, _options)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\cont
rib\auth\management\commands\createsuperuser.py", line 149, in handle
self.UserModel._default_manager.db_manager(database).create_superuser(
_user_data)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\cont
rib\auth\models.py", line 191, in create_superuser
*_extra_fields)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\cont
rib\auth\models.py", line 182, in _create_user
user.save(using=self._db)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\m
odels\base.py", line 710, in save
force_update=force_update, update_fields=update_fields)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\m
odels\base.py", line 738, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\m
odels\base.py", line 822, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\m
odels\base.py", line 861, in _do_insert
using=using, raw=raw)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\m
odels\manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(_args, *_kwargs)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\m
odels\query.py", line 920, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\m
odels\sql\compiler.py", line 963, in execute_sql
cursor.execute(sql, params)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\b
ackends\utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\b
ackends\utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\u
tils.py", line 97, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\b
ackends\utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "C:\Users\shenk\Documents\Programming\django_projects\envs\drf\lib\site-packages\django-1.8-py2.7.egg\django\db\b
ackends\sqlite3\base.py", line 318, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: auth_user.last_login may not be NULL

Where is user.last_login set? How can it be given a default value or set to be able to be NULL?

@pepe5
Copy link

pepe5 commented Apr 22, 2016

i have the same error:

**c:\django-poll-app-master> python manage.py createsup**
...
    return Database.Cursor.execute(self, query, params)
django.db.utils.IntegrityError: auth_user.last_login may not be NULL

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

No branches or pull requests

2 participants