django-urlman
URL manager for Django
Django is powerful, we want it to be as simple as possible without sacrificing flexibility.
Usage
Assume the django project is named 'mysite', in the project's url-config file (mysite/urls.py):
from django_urlman import mount
urlpatterns = [
# original django urls
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
# django-urlman aware apps
* mount('mysite', # main project name
{
'app1': 'app1/', # mount app1 at anchor 'app1/'
'app2': 'app2/', # mount app2 at anchor 'app2/'
}),
]
In app1 module:
from django_urlman import url
@url
def hi(_):
return HttpResponse('Hello World')
Then the api endpoint "app1/hi" should return "Hello World".
Metadata
Release files for django-urlman 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-urlman-0.2.0.tar.gz | 2.6 kB | Details |
Release files / django-urlman-0.2.0.tar.gz
| Download URL | django-urlman-0.2.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab304957512eadae91ab3d05c18e4bddd44637b5cb2c1849b1ae4ea9835f3d25
|
|
BLAKE2b-256 checksum How to use checksums |
827c436b95c3309182d7827d0b61ca671ea72ceb953a3d08d703b26c9ba0bcb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.2
|