Added encapsulate factory function to get around Django bug #15791

This commit is contained in:
Roberto Rosario
2011-08-05 09:30:26 -04:00
parent 7b0e177ba2
commit 1b7183be85
15 changed files with 57 additions and 37 deletions

View File

@@ -357,3 +357,15 @@ def validate_path(path):
return False
return True
#def encapsulate(function):
# def wrapper():
# return function
# return wrapper
def encapsulate(function):
# Workaround Django ticket 15791
# Changeset 16045
# http://stackoverflow.com/questions/6861601/cannot-resolve-callable-context-variable/6955045#6955045
return lambda: function