I'm currently working my way through a course on Lynda for learning Django. I set up just a basic project using django-admin startproject project_name
After that, I tried running the python manage.py
script to see a list of available commands. This is what I got back:
$ python manage.py
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 341, in execute
django.setup()
File "C:\Python27\lib\site-packages\django\__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 108, in populate
app_config.import_models(all_models)
File "C:\Python27\lib\site-packages\django\apps\config.py", line 199, in import_models
self.models_module = import_module(models_module_name)
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Python27\lib\site-packages\django\contrib\auth\models.py", line 300, in <module>
class AbstractUser(AbstractBaseUser, PermissionsMixin):
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 274, in __new__
new_class.add_to_class(field.name, new_field)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 316, in add_to_class
value.contribute_to_class(cls, name)
File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py", line 694, in contribute_to_class
cls._meta.add_field(self)
File "C:\Python27\lib\site-packages\django\db\models\options.py", line 277, in add_field
self.local_fields.insert(bisect(self.local_fields, field), field)
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
I haven't been able to find another question here on StackOverflow where someone has had this problem.
EDIT: In response to what Aditya said. When I run python manage.py runserver
I get a similar output:
$ python manage.py runserver
Unhandled exception in thread started by <function wrapper at 0x0000000003D19978>
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "C:\Python27\lib\site-packages\django\core\management\commands\runserver.py", line 113, in inner_run
autoreload.raise_last_exception()
File "C:\Python27\lib\site-packages\django\utils\autoreload.py", line 249, in raise_last_exception
six.reraise(*_exception)
File "C:\Python27\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "C:\Python27\lib\site-packages\django\__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Python27\lib\site-packages\django\apps\registry.py", line 108, in populate
app_config.import_models(all_models)
File "C:\Python27\lib\site-packages\django\apps\config.py", line 199, in import_models
self.models_module = import_module(models_module_name)
File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
__import__(name)
File "C:\Python27\lib\site-packages\django\contrib\auth\models.py", line 300, in <module>
class AbstractUser(AbstractBaseUser, PermissionsMixin):
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 274, in __new__
new_class.add_to_class(field.name, new_field)
File "C:\Python27\lib\site-packages\django\db\models\base.py", line 316, in add_to_class
value.contribute_to_class(cls, name)
File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py", line 694, in contribute_to_class
cls._meta.add_field(self)
File "C:\Python27\lib\site-packages\django\db\models\options.py", line 277, in add_field
self.local_fields.insert(bisect(self.local_fields, field), field)
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),
File "C:\Python27\lib\functools.py", line 56, in <lambda>
'__lt__': [('__gt__', lambda self, other: other < self),