Added encapsulate factory function to get around Django bug #15791
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user