From 28e6999e7d813d3e7633083e976cab953882fc79 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 25 Jun 2015 04:30:10 -0500 Subject: [PATCH] fixed issue #980, Admin application: can't access directories with space in directory name, thanks mmihaltz --- applications/admin/views/default/design.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/applications/admin/views/default/design.html b/applications/admin/views/default/design.html index b7fc4991..2d918b83 100644 --- a/applications/admin/views/default/design.html +++ b/applications/admin/views/default/design.html @@ -1,5 +1,7 @@ {{extend 'layout.html'}} {{ +import re +regex_space = re.compile('\s+') def all(items): return reduce(lambda a,b:a and b,items,True) def peekfile(path,file,vars={},title=None): @@ -304,7 +306,7 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi while path!=file_path: if len(file_path)>=len(path) and all([v==file_path[k] for k,v in enumerate(path)]): path.append(file_path[len(path)]) - thispath='static__'+'__'.join(path) + thispath = regex_space.sub('-', 'static__'+'__'.join(path)) }}
  •   {{=path[-1]}}/