No project description provided
Project description
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".
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-urlman-0.2.0.tar.gz
(2.6 kB
view details)
File details
Details for the file django-urlman-0.2.0.tar.gz
.
File metadata
- Download URL: django-urlman-0.2.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab304957512eadae91ab3d05c18e4bddd44637b5cb2c1849b1ae4ea9835f3d25 |
|
MD5 | a8a22136e000da68f4c89bc4839e55e1 |
|
BLAKE2b-256 | 827c436b95c3309182d7827d0b61ca671ea72ceb953a3d08d703b26c9ba0bcb9 |