File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1414)
1515
1616
17- class WebpackLoader ( object ) :
17+ class WebpackLoader :
1818 _assets = {}
1919
2020 def __init__ (self , name , config ):
Original file line number Diff line number Diff line change @@ -105,9 +105,8 @@ def get_static(asset_name, config='DEFAULT'):
105105 :param config: (optional) the name of the configuration
106106 :return: path to webpack asset as a string
107107 '''
108- return "{0}{1}" .format (
109- get_loader (config ).get_assets ().get (
110- 'publicPath' , getattr (settings , 'STATIC_URL' )
111- ),
112- asset_name
113- )
108+ public_path = get_loader (config ).get_assets ().get ('publicPath' )
109+ if not public_path or public_path == 'auto' :
110+ public_path = getattr (settings , 'STATIC_URL' )
111+
112+ return '{0}{1}' .format (public_path , asset_name )
You can’t perform that action at this time.
0 commit comments