Skip to content

Single Sign-On: Validators depend on Application model  #62

@bryanveloso

Description

@bryanveloso

I've been attempting to get the awesome stuff in #54 to work and I ran into the following:

Traceback:
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/django/views/generic/base.py" in view
  68.             return self.dispatch(request, *args, **kwargs)
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  86.         return handler(request, *args, **kwargs)
File "/Users/Bryan/Code/Revyver/hello-base/base/components/accounts/views.py" in get
  68.         user = authenticate(request=request)
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in authenticate
  58.     for backend in get_backends():
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in get_backends
  33.         backends.append(load_backend(backend_path))
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in load_backend
  17.         mod = import_module(module)
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/oauth2_provider/backends.py" in <module>
  2. from .oauth2_backends import get_oauthlib_core
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/oauth2_provider/oauth2_backends.py" in <module>
  5. from .oauth2_validators import OAuth2Validator
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/oauth2_provider/oauth2_validators.py" in <module>
  14. Application = get_application_model()
File "/Users/Bryan/.virtualenvs/hello-base/lib/python2.7/site-packages/oauth2_provider/models.py" in get_application_model
  239.         raise ImproperlyConfigured(e.format(oauth2_settings.APPLICATION_MODEL))

Exception Type: ImproperlyConfigured at /accounts/authenticated/
Exception Value: APPLICATION_MODEL refers to model oauth2_provider.Application that has not been installed

It seems that the validators depend on APPLICATION_MODEL existing, but I'm trying to SSO from a separate client, so I shouldn't have to have another instance of Application on my client.

/cc @masci

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions