Skip to content

Instantly share code, notes, and snippets.

@Sepero
Sepero / a.py
Created Nov 18, 2013
Python circular import fail
View a.py
import b
def test():
pass
b.test()
@Sepero
Sepero / slash_middleware.py
Created Mar 26, 2012 — forked from gregplaysguitar/slash_middleware.py
Remove slashs in django - like APPEND_SLASH but opposite.
View slash_middleware.py
""" 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