skip to navigation
skip to content

Not Logged In

django-rewrite-external-links 0.4.3

Rewrite all external (off-site) links to go via a message page, using a middleware class.

Rewrite all external (off-site) links to go via a message page, using a middleware class.

Installing / usage

Add to your settings.py:

MIDDLEWARE_CLASSES = (
    '...',
    'rewrite_external_links.middleware.RewriteExternalLinksMiddleware',
    '...',
)

If you want to use the provided templates also add rewrite_external_links to INSTALLED_APPS.

Add to your urls.py:

urlpatterns = patterns('',
    '...',
    url(r'', include('rewrite_external_links.urls')),
    '...',
)

If you want to load the external links message using Javascript Ajax then add something like the following to your template (requires jQuery and Fancybox):

<script>$(document).ready(function () { $('a[href^={% url external_link '' %}]').fancybox({type: 'ajax'}); });</script>
 
File Type Py Version Uploaded on Size
django-rewrite-external-links-0.4.3.tar.gz (md5) Source 2014-09-03 2KB
  • Downloads (All Versions):
  • 0 downloads in the last day
  • 121 downloads in the last week
  • 848 downloads in the last month