<s> import os <EOL> import sys <EOL> from django . conf import settings <EOL> from django . core . exceptions import ImproperlyConfigured <EOL> from django . core . files . storage import FileSystemStorage <EOL> from django . utils . importlib import import_module <EOL> from django . utils . _os import safe_join <EOL> from django . contrib . staticfiles import utils <EOL> from ionyweb import get_ionyweb_path <EOL> class LayoutStorage ( FileSystemStorage ) : <EOL> """<STR_LIT>""" <EOL> prefix = '<STR_LIT>' <EOL> def __init__ ( self , location = None , * args , ** kwargs ) : <EOL> if location is None : <EOL> sys . stderr . write ( '<STR_LIT>' + str ( location ) + '<STR_LIT>' ) <EOL> location = os . path . join ( get_ionyweb_path ( ) , '<STR_LIT>' , '<STR_LIT>' ) <EOL> super ( LayoutStorage , self ) . __init__ ( location , * args , ** kwargs ) <EOL> def listdir ( self , path ) : <EOL> path = self . path ( path ) <EOL> directories , files = [ ] , [ ] <EOL> for entry in os . listdir ( path ) : <EOL> if entry != '<STR_LIT>' : <EOL> if os . path . isdir ( os . path . join ( path , entry ) ) : <EOL> directories . append ( entry ) <EOL> else : <EOL> files . append ( entry ) <EOL> return directories , files <EOL> class ThemeStorage ( FileSystemStorage ) : <EOL> """<STR_LIT>""" <EOL> prefix = '<STR_LIT>' <EOL> def __init__ ( self , location = None , * args , ** kwargs ) : <EOL> if location is None : <EOL> sys . stderr . write ( '<STR_LIT>' + str ( location ) + '<STR_LIT>' ) <EOL> location = os . path . join ( get_ionyweb_path ( ) , '<STR_LIT>' , '<STR_LIT>' ) <EOL> super ( ThemeStorage , self ) . __init__ ( location , * args , ** kwargs ) <EOL> def listdir ( self , path ) : <EOL> path = self . path ( path ) <EOL> directories , files = [ ] , [ ] <EOL> for entry in os . listdir ( path ) : <EOL> if entry != '<STR_LIT>' : <EOL> if os . path . isdir ( os . path . join ( path , entry ) ) : <EOL> directories . append ( entry ) <EOL> else : <EOL> files . append ( entry ) <EOL> return directories , files </s>
