from django.apps import AppConfig

class UwSi2ExplorerConfig(AppConfig):
    name = 'mpcontribs.users.uw_si2.explorer'
    label = 'uwsi2_explorer'

class Mno2PhaseSelectionExplorerConfig(AppConfig):
    name = 'mpcontribs.users.MnO2_phase_selection.explorer'
    label = 'MnO2_phase_selection_explorer'

class SlacMose2ExplorerConfig(AppConfig):
    name = 'mpcontribs.users.slac_mose2.explorer'
    label = 'slac_mose2_explorer'

class DtuExplorerConfig(AppConfig):
    name = 'mpcontribs.users.dtu.explorer'
    label = 'dtu_explorer'

class TamPerovskitesExplorerConfig(AppConfig):
    name = 'mpcontribs.users.tam_perovskites.explorer'
    label = 'tam_perovskites_explorer'

class SwfExplorerConfig(AppConfig):
    name = 'mpcontribs.users.swf.explorer'
    label = 'swf_explorer'

class DibbsExplorerConfig(AppConfig):
    name = 'mpcontribs.users.dibbs.explorer'
    label = 'dibbs_explorer'

class MpWorkshop2017ExplorerConfig(AppConfig):
    name = 'mpcontribs.users.mp_workshop_2017.explorer'
    label = 'mp_workshop_2017_explorer'

from django.apps import AppConfig
#from mpcontribs.users_modules import get_user_modules, get_user_explorer_config
#import os
#
#def factory(AppConfig, mod_path):
#    class NewClass(AppConfig): pass
#    mod = os.path.basename(mod_path)
#    mod_path_split = os.path.normpath(mod_path).split(os.sep)[-3:]
#    NewClass.name = '.'.join(mod_path_split + ['explorer'])
#    NewClass.label = '_'.join([mod_path, 'explorer'])
#    NewClass.__name__ = get_user_explorer_config(mod)
#    return NewClass
#
#for mod_path in get_users_modules():
#    if os.path.exists(os.path.join(mod_path, 'explorer', 'urls.py')):
#        ... = factory(



class UwSi2ExplorerConfig(AppConfig):
    name = 'mpcontribs.users.uw_si2.explorer'
    label = 'uwsi2_explorer'

class Mno2PhaseSelectionExplorerConfig(AppConfig):
    name = 'mpcontribs.users.MnO2_phase_selection.explorer'
    label = 'MnO2_phase_selection_explorer'

class SlacMose2ExplorerConfig(AppConfig):
    name = 'mpcontribs.users.slac_mose2.explorer'
    label = 'slac_mose2_explorer'

class DtuExplorerConfig(AppConfig):
    name = 'mpcontribs.users.dtu.explorer'
    label = 'dtu_explorer'

class TamPerovskitesExplorerConfig(AppConfig):
    name = 'mpcontribs.users.tam_perovskites.explorer'
    label = 'tam_perovskites_explorer'

class SwfExplorerConfig(AppConfig):
    name = 'mpcontribs.users.swf.explorer'
    label = 'swf_explorer'

class DibbsExplorerConfig(AppConfig):
    name = 'mpcontribs.users.dibbs.explorer'
    label = 'dibbs_explorer'

class MpWorkshop2017ExplorerConfig(AppConfig):
    name = 'mpcontribs.users.mp_workshop_2017.explorer'
    label = 'mp_workshop_2017_explorer'

save progress on code to automate configs