handle login path prefix (#9885)
This commit is contained in:
parent
b43fe3188d
commit
561d031ef5
4
README
4
README
|
@ -161,6 +161,10 @@ App Settings
|
|||
'products': '/products/id',
|
||||
}
|
||||
|
||||
# If you class inherits from another and
|
||||
# a SITE_LOGIN_PATH need to be set
|
||||
SITE_LOGIN_PATH_PREFIX = '/wonderland/'
|
||||
|
||||
|
||||
About Statics
|
||||
-------------
|
||||
|
|
|
@ -66,6 +66,9 @@ class AppSettingsMeta(type):
|
|||
if not dct.get('SITE_FORM_SUBMIT_ELEMENT', None):
|
||||
dct['SITE_FORM_SUBMIT_ELEMENT'] = 'input[type=submit], button'
|
||||
|
||||
if dct.get('SITE_LOGIN_PATH_PREFIX', None):
|
||||
parent = bases[0]
|
||||
dct['SITE_LOGIN_PATH'] = os.path.join(dct['SITE_LOGIN_PATH_PREFIX'], parent.SITE_LOGIN_PATH.strip('/'))
|
||||
return super(AppSettingsMeta, cls).__new__(cls, name, bases, dct)
|
||||
|
||||
|
||||
|
@ -255,12 +258,16 @@ class Imuse(AppSettings):
|
|||
SITE_FORM_SUBMIT_ELEMENT = '#INDEX_BT_LOGIN'
|
||||
|
||||
|
||||
class ImuseTeacherMontpellier(Imuse):
|
||||
SITE_LOGIN_PATH = '/montpellier/extranet/login/ens_index_enseignant.php'
|
||||
class ImuseTeacher(Imuse):
|
||||
SITE_LOGIN_PATH = '/extranet/login/ens_index_enseignant.php'
|
||||
|
||||
|
||||
class ImuseFamilyMontpellier(Imuse):
|
||||
SITE_LOGIN_PATH = '/montpellier/extranet/login/usa_index_famille.php'
|
||||
class ImuseFamily(Imuse):
|
||||
SITE_LOGIN_PATH = '/extranet/login/usa_index_famille.php'
|
||||
|
||||
SITE_LOGOUT_LOCATOR = '#MENU_FAMILLE_QUITTER'
|
||||
|
||||
class ImuseFamilyMontpellier(ImuseFamily):
|
||||
SITE_LOGIN_PATH_PREFIX = '/montpellier/'
|
||||
|
||||
|
||||
|
|
Reference in New Issue