question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I need to include the URLs in an apps urls.py that are already included and namespaced in the root urls. Can we make the the oidc_provider url namespace a setting

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ben-prezolacommented, Sep 20, 2018

Sure.

An example of what I mean can be found here: https://github.com/RealmTeam/django-rest-framework-social-oauth2 with the DRFSO2_URL_NAMESPACE setting.

To explain, I have quite a large project but to keep it simple let’s say I have a a django project with 2 apps, auth and users. The urls are included and namespaced in the root url conf like so.

urlpatterns = i18n_patterns(
    path("", include("auth.urls", namespace="auth")),
    path("", include("users.urls", namespace="users")),

I want to include the oidc_provider urls inside the auth app urls but because that is already namespaced that is not possible. Therefore it would be useful to have a setting to specify the namespace manually.

Thanks

0reactions
ben-prezolacommented, Sep 21, 2018

that would be useful 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

URL dispatcher - Django documentation
URL namespaces allow you to uniquely reverse named URL patterns even if different applications use the same URL names. It's a good practice...
Read more >
URL namespaces | Mastering Django: Core - Packt Subscription
URL namespaces allow you to uniquely reverse named URL patterns even if different applications use the same URL names. It's a good practice...
Read more >
Django Url naming and namespaces - Web Forefront
Django Url naming and namespaces: urls with name, url with arguments that use name, reverse in views and template links, urls.py with namespace...
Read more >
A real example of URL Namespace - django - Stack Overflow
I am studying the Django documentation, but I encountered a part that I cannot understand: what is a real example of how use...
Read more >
URL namespaces - Mastering Django: Core [Book] - O'Reilly
URL namespaces allow you to uniquely reverse named URL patterns even if different applications use the same URL names. It's a good practice...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found