Skip to content

Instantly share code, notes, and snippets.

@Sepero
Sepero / slash_middleware.py
Created March 26, 2012 09:17 — forked from gregplaysguitar/slash_middleware.py
Remove slashs in django - like APPEND_SLASH but opposite.
""" Author contact: sepero 111 @ gmail . com """
from django import http
from django.utils.http import urlquote
from django.core import urlresolvers
class RemoveSlashMiddleware(object):
"""
This middleware works like django's built in APPEND_SLASH, but in reverse. Eg