Have you tried to run makemigrations before migrate ?

On 12 Feb 2017 7:33 p.m., "Adam" <adam.smith0...@gmail.com> wrote:

> Hi Antonis, this is the full message including the command:
>
> :~/udemystuff/test_project# python manage.py createsuperuser
> /root/udemystuff/test_project/trydjango19/local/lib/python2.
> 7/site-packages/django/template/utils.py:37: RemovedInDjango110Warning:
> You haven't defined a TEMPLATES setting. You must do so before upgrading to
> Django 1.10. Otherwise Django will be unable to load templates.
>   "unable to load templates.", RemovedInDjango110Warning)
>
> /root/udemystuff/test_project/test_project/urls.py:11:
> RemovedInDjango110Warning: django.conf.urls.patterns() is deprecated and
> will be removed in Django 1.10. Update your urlpatterns to be a list of
> django.conf.urls.url() instances instead.
>   url(r'^admin/', include(admin.site.urls)),
>
> Username (leave blank to use 'root'): adams
> Email address:
> Password:
> Password (again):
> Traceback (most recent call last):
>   File "manage.py", line 10, in <module>
>     execute_from_command_line(sys.argv)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/core/management/__init__.py", line 350, in
> execute_from_command_line
>     utility.execute()
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/core/management/__init__.py", line 342, in
> execute
>     self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/core/management/base.py", line 348, in
> run_from_argv
>     self.execute(*args, **cmd_options)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
> line 52, in execute
>     return super(Command, self).execute(*args, **options)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/core/management/base.py", line 399, in
> execute
>     output = self.handle(*args, **options)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
> line 173, in handle
>     self.UserModel._default_manager.db_manager(database).
> create_superuser(**user_data)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/contrib/auth/models.py", line 165, in
> create_superuser
>     return self._create_user(username, email, password, **extra_fields)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/contrib/auth/models.py", line 148, in
> _create_user
>     user.save(using=self._db)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/contrib/auth/base_user.py", line 74, in
> save
>     super(AbstractBaseUser, self).save(*args, **kwargs)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/models/base.py", line 700, in save
>     force_update=force_update, update_fields=update_fields)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/models/base.py", line 728, in save_base
>     updated = self._save_table(raw, cls, force_insert, force_update,
> using, update_fields)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/models/base.py", line 812, in
> _save_table
>     result = self._do_insert(cls._base_manager, using, fields, update_pk,
> raw)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/models/base.py", line 851, in _do_insert
>     using=using, raw=raw)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/models/manager.py", line 122, in
> manager_method
>     return getattr(self.get_queryset(), name)(*args, **kwargs)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/models/query.py", line 1039, in _insert
>     return query.get_compiler(using=using).execute_sql(return_id)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/models/sql/compiler.py", line 1064, in
> execute_sql
>     cursor.execute(sql, params)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
>     return super(CursorDebugWrapper, self).execute(sql, params)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
>     return self.cursor.execute(sql, params)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/utils.py", line 95, in __exit__
>     six.reraise(dj_exc_type, dj_exc_value, traceback)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
>     return self.cursor.execute(sql, params)
>   File "/root/udemystuff/test_project/trydjango19/local/lib/
> python2.7/site-packages/django/db/backends/sqlite3/base.py", line 323, in
> execute
>     return Database.Cursor.execute(self, query, params)
> django.db.utils.IntegrityError: NOT NULL constraint failed:
> auth_user.last_login
>
>
>
>
>
> On Sunday, February 12, 2017 at 4:19:16 AM UTC-8, Antonis Christofides
> wrote:
>>
>> Hello, please show the full traceback.
>>
>> Antonis Christofideshttp://djangodeployment.com
>>
>> On 02/12/2017 06:58 AM, Adam wrote:
>>
>> Hi everyone,
>>
>> I'm super new to django, I tried to add a superuser and this is the error
>> I got:
>>
>>
>> File "/root/udemystuff/test_project/trydjango19/local/lib/python2
>> .7/site-packages/django/db/backends/sqlite3/base.py", line 323, in
>> execute
>>     return Database.Cursor.execute(self, query, params)
>> django.db.utils.IntegrityError: NOT NULL constraint failed:
>> auth_user.last_login
>>
>>
>> I tried to run migrate and did also migrate --fake but it did not resolve
>> the issue, any clues what could be my issue ?
>>
>> Cheers everyone,
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/96c76c04-6277-446e-8488-90ba22fa548a%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/96c76c04-6277-446e-8488-90ba22fa548a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/191e3115-6808-48e5-b652-6e0421e61b71%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/191e3115-6808-48e5-b652-6e0421e61b71%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTbzvFzimHSptH3HLc6FeF5s9gyvyADERY-u2XmeGmOwXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to