Manage URL Patterns and Views via the Django admin.
- Django
1.4.x
.
-
Install django-urls.
pip install -e git+git://github.com/django-urls/django-urls.git#egg=django_urls
-
Add django_urls to
INSTALLED_APPS
insettings.py
.INSTALLED_APPS = ( # ... 'django_urls', # ... )
-
Add django_urls to
urls.py
.from django_urls import django_urls urlpatterns += django_urls()
make pip installablemake installation simple by adding app to INSTALLED_APPS, MIDDLEWARE_CLASSES, or similar- add "404 Not Found" destination
- add exact match to permanent redirect 301
- add exact match to temporary redirect 302
- add regex match to permanent redirect 301
- add regex match to temporary redirect 302
- add regex match to include (e.g. add the ability to use a destination like include('django.contrib.admindocs.urls'))
- add unit tests (relative redirect, absolute redirect, regex match, 404, etc.)
- add Url.order as "Django runs through each URL pattern, in order, and stops at the first one that matches the requested URL."