Hi all,

I am using django-warrant(https://github.com/MetaMetricsInc/django-warrant) 
as my Authentication backend and using the django_warrant.UserObj as the 
User Model.When i try to run "python manage.py makemigrations" . I got this 
"django.core.exceptions.ImproperlyConfigured" error.
I have created a new project and startapp django_warrant and copied the 
code to the directory.I am looking use this UserObj as a reference in 
another app.

Any hacks or idea.?Is there any alternative.?

Thanks
Aayush Aggarwal
Here is Traceback:

(warrant3.6) ~/Desktop/workspace4/project$ python manage.py makemigrations 
django_warrant
Traceback (most recent call last):
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/config.py",
 
line 165, in get_model
    return self.models[model_name.lower()]
KeyError: 'userobj'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/__init__.py",
 
line 193, in get_user_model
    return django_apps.get_model(settings.AUTH_USER_MODEL, 
require_ready=False)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/registry.py",
 
line 202, in get_model
    return app_config.get_model(model_name, require_ready=require_ready)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/config.py",
 
line 168, in get_model
    "App '%s' doesn't have a '%s' model." % (self.label, model_name))
LookupError: App 'django_warrant' doesn't have a 'UserObj' model.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 371, in execute_from_command_line
    utility.execute()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 347, in execute
    django.setup()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/__init__.py",
 
line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/apps/registry.py",
 
line 120, in populate
    app_config.ready()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/admin/apps.py",
 
line 23, in ready
    self.module.autodiscover()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
 
line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/utils/module_loading.py",
 
line 47, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/importlib/__init__.py", 
line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in 
_call_with_frames_removed
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/admin.py",
 
line 6, in <module>
    from django.contrib.auth.forms import (
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/forms.py",
 
line 20, in <module>
    UserModel = get_user_model()
  File 
"/home/aayush/.virtualenvs/warrant3.6/lib/python3.6/site-packages/django/contrib/auth/__init__.py",
 
line 198, in get_user_model
    "AUTH_USER_MODEL refers to model '%s' that has not been installed" % 
settings.AUTH_USER_MODEL
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to 
model 'django_warrant.UserObj' that has not been installed

-- 
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/f7bb2291-5311-41fe-bef5-f4521f8ec9f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to