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 14
14
)
15
15
16
16
17
- class WebpackLoader ( object ) :
17
+ class WebpackLoader :
18
18
_assets = {}
19
19
20
20
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'):
105
105
:param config: (optional) the name of the configuration
106
106
:return: path to webpack asset as a string
107
107
'''
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