Merge pull request #562 from timnyborg/patch-2
Enable map_hyphen to work for application names
This commit is contained in:
@@ -878,6 +878,7 @@ class MapUrlIn(object):
|
||||
self.domain_application = None
|
||||
self.domain_controller = None
|
||||
self.domain_function = None
|
||||
self.map_hyphen = base.map_hyphen
|
||||
arg0 = self.harg0
|
||||
if not base.exclusive_domain and base.applications and arg0 in base.applications:
|
||||
self.application = arg0
|
||||
@@ -1256,9 +1257,9 @@ class MapUrlOut(object):
|
||||
"Builds a/c/f from components"
|
||||
acf = ''
|
||||
if self.map_hyphen:
|
||||
self.application = self.application.replace('_', '-')
|
||||
self.controller = self.controller.replace('_', '-')
|
||||
if self.controller != 'static' and not self.controller.startswith('static/'):
|
||||
self.application = self.application.replace('_', '-')
|
||||
self.function = self.function.replace('_', '-')
|
||||
if not self.omit_application:
|
||||
acf += '/' + self.application
|
||||
|
||||
Reference in New Issue
Block a user