Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing authent/applications/ gives me 'oauth2_provider' is not a registered namespace #127

Open
patata3000 opened this issue Jul 3, 2019 · 7 comments

Comments

@patata3000
Copy link

I'm running MDS_DEV_DEBUG=1 pypthon manage.py runserver and when I try to access
authent/applications, I get 'oauth2_provider' is not a registered namespace .
Am I doing something wrong?

@patata3000
Copy link
Author

patata3000 commented Jul 9, 2019

Ok so for this one, I see 2 possibilities:

  • we change app_name in mds/authent/urls.py from app_name = "authent" to app_name = "oauth2_provider",
  • we change mds/urls.py: path("authent/", include(mds.authent.urls, namespace="authent")), to path("authent/", include(mds.authent.urls, namespace="oauth2_provider")),

I'd say that first one is better but I'm far from being sure and I'd like your opinion. Maybe there is another possibility where we can override an app without redefining all its components (templates and views)..

Even after correcting that, I get null value in column "scopes" violates not-null constraint

You're probably not working on this part of the project. I wish to help. But I need enlightment :)

@patata3000
Copy link
Author

Ok so I may have gotten it. It's not supposed to be working with the oauth2 front end. It should use AppCreationView.

@patata3000
Copy link
Author

Praise the Lord if you tell me what are the steps to authenticate.
I've spent so much time on it and I'm dying of despair.

@HenriJ
Copy link
Contributor

HenriJ commented Jul 9, 2019

sry @patata3000 for our slow answer, a little bit overbooked right now.
If it helps you progress, you cna simply disable authentication and play with the APIs for now

@patata3000
Copy link
Author

How ?

@HenriJ
Copy link
Contributor

HenriJ commented Jul 9, 2019

Simply remove the permission_classes = ... from the viewsets you want to unprotect

@patata3000
Copy link
Author

Ok thanks. Whenever you have time, maybe you can give a small "how to" in the readme to explain how you use it all. :)

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

No branches or pull requests

2 participants