<s> from django . conf import settings <EOL> from django . template import Library <EOL> register = Library ( ) <EOL> def _determine_base_path ( ) : <EOL> client = getattr ( settings , '<STR_LIT>' , '<STR_LIT>' ) <EOL> secure = getattr ( settings , '<STR_LIT>' , False ) <EOL> proto = '<STR_LIT:http>' <EOL> if secure : <EOL> proto = '<STR_LIT>' <EOL> return '<STR_LIT>' % ( proto , client ) <EOL> @ register . simple_tag <EOL> def ishout_socketio_path ( ) : <EOL> return '<STR_LIT>' % ( _determine_base_path ( ) , '<STR_LIT>' ) <EOL> @ register . simple_tag <EOL> def ishout_js_path ( ) : <EOL> return '<STR_LIT>' % ( _determine_base_path ( ) , '<STR_LIT>' ) <EOL> @ register . simple_tag <EOL> def ishout_js ( ) : <EOL> """<STR_LIT>""" <EOL> path = _determine_base_path ( ) <EOL> return """<STR_LIT>""" % ( path , path ) </s>
