#NEWLINE# def get_core_apps( overrides = None ) : #NEWLINE# #INDENT# "\n    Return a list of oscar's apps amended with any passed overrides\n    " #NEWLINE# if ( not get_app_label ) : #NEWLINE# #INDENT# return OSCAR_CORE_APPS #NEWLINE# #UNINDENT# from django.utils import six #NEWLINE# if isinstance ( overrides , six . string_types ) : #NEWLINE# #INDENT# raise ValueError ( 'get_core_apps expects a list or tuple of apps to override' ) #NEWLINE# #UNINDENT# def get_app_label( app_label , overrides ) : #NEWLINE# #INDENT# pattern = app_label . replace ( 'oscar.apps.' , '' ) #NEWLINE# for override in overrides : #NEWLINE# #INDENT# if override . endswith ( pattern ) : #NEWLINE# #INDENT# if ( ( 'dashboard' in override ) and ( 'dashboard' not in pattern ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# return override #NEWLINE# #UNINDENT# #UNINDENT# return app_label #NEWLINE# #UNINDENT# apps = [ ] #NEWLINE# for app_label in OSCAR_CORE_APPS : #NEWLINE# #INDENT# apps . append ( get_app_label ( app_label , overrides ) ) #NEWLINE# #UNINDENT# return apps