Created
May 23, 2016 13:36
-
-
Save zindel/657fbc805cdcc56444137ad4803ab206 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HandleTable(HandleLocation): | |
PREFIX = '/table/' | |
path = '%s**' % PREFIX | |
def __call__(self, req): | |
req.path_info_pop() | |
table = req.path_info_pop() | |
wizard = get_wizard(table) | |
if wizard is None: | |
raise HTTPNotFound("table '%s' not found" % table) | |
segment = req.path_info_peek() | |
if segment == '@@': | |
req.path_info_pop() | |
if req.path_info.startswith('/'): | |
req.path_info = req.path_info[1:] | |
print 'script name', req.script_name | |
print 'Path', req.path_info | |
return render_widget(wizard, req) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment