<s> import json <EOL> import os <EOL> from django . utils . translation import ugettext_lazy as _t , ugettext as _ <EOL> from desktop . lib . conf import Config , coerce_bool , coerce_csv <EOL> BASEDIR = os . path . dirname ( os . path . abspath ( __file__ ) ) <EOL> def dict_list_map ( value ) : <EOL> if isinstance ( value , str ) : <EOL> d = { } <EOL> for k , v in json . loads ( value ) . iteritems ( ) : <EOL> d [ k ] = ( v , ) <EOL> return d <EOL> elif isinstance ( value , dict ) : <EOL> return value <EOL> return None <EOL> SERVER_ENDPOINT_URL = Config ( <EOL> key = "<STR_LIT>" , <EOL> default = "<STR_LIT>" , <EOL> type = str , <EOL> help = _t ( "<STR_LIT>" ) ) <EOL> IDENTITY_URL_PREFIX = Config ( <EOL> key = "<STR_LIT>" , <EOL> default = "<STR_LIT>" , <EOL> type = str , <EOL> help = _t ( "<STR_LIT>" ) ) <EOL> CREATE_USERS_ON_LOGIN = Config ( <EOL> key = "<STR_LIT>" , <EOL> default = True , <EOL> type = coerce_bool , <EOL> help = _t ( "<STR_LIT>" ) ) <EOL> USE_EMAIL_FOR_USERNAME = Config ( <EOL> key = "<STR_LIT>" , <EOL> default = True , <EOL> type = coerce_bool , <EOL> help = _t ( "<STR_LIT>" ) ) <EOL> def config_validator ( user ) : <EOL> res = [ ] <EOL> if not SERVER_ENDPOINT_URL . get ( ) : <EOL> res . append ( ( "<STR_LIT>" , _ ( "<STR_LIT>" ) ) ) <EOL> return res </s>
