django-my-urls 0.1beta1 documentation

Middleware

Django-my-urls can use Django’s fallback middleware to redirect short URLS. The primary advantage of this is that it allows MyUrls to work with other redirect apps and handle all URLS that are not part of your site’s URLs as defined in urls.py.

class myurls.middleware.MyUrlsFallbackMiddleware

Checks for short URL and redirects on 404s.

Django uses FallbackMiddleware when a URL isn’t found. You can control what order fallbacks occur by changing the order of FallBackMiddlewares in your app’s settings.py.

process_response(request, response)

Accepts a Django request and redirects to a matching myurl