I hereby claim:
- I am lorinkoz on github.
- I am lorinkoz (https://keybase.io/lorinkoz) on keybase.
- I have a public key ASCJFKWZvfxQ7xxA-b3aVJs6Pp7-2zX8T3mbsqnzAufggwo
To claim this, I am signing this object:
# | |
# Executes the code in the string into the module | |
# | |
def get_from_code(urlconf, dynamic_path): | |
from types import ModuleType | |
DYNAMIC_MODULE_CODE = """ | |
from {urlconf} import * | |
from {urlconf} import urlpatterns as original_urlpatterns | |
from django_pgschemas.urlresolvers import tenant_patterns |
I hereby claim:
To claim this, I am signing this object:
def inject_request(func): | |
def wrapper(*args, **kwargs): | |
request = None | |
frame = inspect.currentframe().f_back | |
while frame and not request: | |
for v_name, v_object in frame.f_locals.items(): | |
if isinstance(v_object, HttpRequest): | |
request = v_object | |
break | |
frame = frame.f_back |