Comments (7)
Can you provide a code example? Because as I'm typing app_name="sth" in urls.py it doesn't work.
Let's say in your main urls.py
you want to include the urls of an app, called shop_app
, like this:
path("shop/", include("shop_app.urls", namespace='shop')),
Then, in your urls.py
file of your shop_app
located in shop_app/urls.py
, after the urlpatters add the app_name
like this:
urlpatterns = [
... some patterns
]
app_name = 'shop'
If you don't have access to the shop_app
urls, as in case you are using an included package, then you'll have to drop the namespace
from your main include and remove the namespace references from your url
tags, or from your reverse
functions.
from deux.
Or you can also use it this way:
path('mfa/', include(("deux.urls", 'app_name'), namespace="mfa")),
from deux.
Use app_name='nameapp'
in urls for applications, after urlpatterns
from deux.
as indicated by @DonExo
path('', include(('blog.urls', 'blog'), namespace='blog'))
from deux.
Excelent ¡¡¡
from deux.
with which value?
from deux.
Can you provide a code example? Because as I'm typing app_name="sth" in urls.py it doesn't work.
from deux.
Related Issues (12)
- How to Increase the expiry time for MFA Challenge
- No Support for Custom User Model HOT 1
- Phone validator does not allow a "+" prefix HOT 1
- All pull requests fail tests
- Update for Python 3.7 HOT 2
- Pip installation is incorrect
- Still Maintained? HOT 2
- Google Authenticator HOT 3
- Custom User model is not working
- New PyPI release HOT 2
- Update to use Twilio 6.x SDK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deux.