<s> from __future__ import unicode_literals <EOL> import os <EOL> from django . conf import settings <EOL> from django . contrib . staticfiles . finders import ( FileSystemFinder as FileSystemFinderBase , <EOL> AppDirectoriesFinder as AppDirectoriesFinderBase ) <EOL> class FileSystemFinder ( FileSystemFinderBase ) : <EOL> """<STR_LIT>""" <EOL> locations = [ ] <EOL> serve_unminimized = getattr ( settings , '<STR_LIT>' , False ) <EOL> def find_location ( self , root , path , prefix = None ) : <EOL> if self . serve_unminimized : <EOL> base , ext = os . path . splitext ( path ) <EOL> base , minext = os . path . splitext ( base ) <EOL> if minext == '<STR_LIT>' : <EOL> unminimized_path = super ( FileSystemFinder , self ) . find_location ( root , base + ext , prefix ) <EOL> if unminimized_path : <EOL> return unminimized_path <EOL> path = super ( FileSystemFinder , self ) . find_location ( root , path , prefix ) <EOL> return path <EOL> class AppDirectoriesFinder ( AppDirectoriesFinderBase ) : <EOL> serve_unminimized = getattr ( settings , '<STR_LIT>' , False ) <EOL> def find_in_app ( self , app , path ) : <EOL> matched_path = super ( AppDirectoriesFinder , self ) . find_in_app ( app , path ) <EOL> if matched_path and self . serve_unminimized : <EOL> base , ext = os . path . splitext ( matched_path ) <EOL> base , minext = os . path . splitext ( base ) <EOL> if minext == '<STR_LIT>' : <EOL> storage = self . storages . get ( app , None ) <EOL> path = '<STR_LIT>' . format ( base , ext ) <EOL> if storage . exists ( path ) : <EOL> path = storage . path ( path ) <EOL> if path : <EOL> return path <EOL> return matched_path </s>
