fix 'static_url_path' defaulting for empty paths
-prefix a path delimiter iff there's a path to delimit -ensures a valid default static route rule is created on application intialisation for the case 'static_folder=""' and implicit 'static_url_path'
This commit is contained in:
parent
b83760675d
commit
a12bf290da
2 changed files with 16 additions and 1 deletions
|
|
@ -970,7 +970,8 @@ class _PackageBoundObject(object):
|
|||
return self._static_url_path
|
||||
|
||||
if self.static_folder is not None:
|
||||
return "/" + os.path.basename(self.static_folder)
|
||||
basename = os.path.basename(self.static_folder)
|
||||
return "/" + basename if basename else ""
|
||||
|
||||
def _set_static_url_path(self, value):
|
||||
self._static_url_path = value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue