#NEWLINE# def ready( self ) : #NEWLINE# #INDENT# from django.conf import settings #NEWLINE# from django.template import defaulttags #NEWLINE# from leonardo.utils.urlresolvers import render #NEWLINE# defaulttags . URLNode . render = render #NEWLINE# from django.core import urlresolvers #NEWLINE# from leonardo.module.web.widget.application.reverse import reverse #NEWLINE# urlresolvers . reverse = reverse #NEWLINE# urlresolvers . reverse_lazy = lazy ( reverse , six . text_type ) #NEWLINE# from horizon.conf import HORIZON_CONFIG #NEWLINE# from horizon import conf as horizon_conf #NEWLINE# try : #NEWLINE# #INDENT# from constance import config #NEWLINE# for k in dir ( config ) : #NEWLINE# #INDENT# if ( k not in HORIZON_CONFIG ) : #NEWLINE# #INDENT# HORIZON_CONFIG [ k ] = getattr ( config , k ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# horizon_conf . HORIZON_CONFIG = HORIZON_CONFIG #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# from django.views import debug #NEWLINE# from leonardo.views.debug import technical_404_response #NEWLINE# debug . technical_404_response = technical_404_response #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# from django.apps import apps #NEWLINE# from importlib import import_module #NEWLINE# for ( model , method ) in six . iteritems ( settings . ABSOLUTE_URL_OVERRIDES ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# mod_name = model . split ( '.' ) [ 0 ] #NEWLINE# model_cls = apps . get_model ( mod_name , model . split ( '.' ) [ ( - 1 ) ] ) #NEWLINE# if callable ( method ) : #NEWLINE# #INDENT# _method = method #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# _mod = import_module ( '.' . join ( method . split ( '.' ) [ : ( - 1 ) ] ) ) #NEWLINE# _method = getattr ( _mod , method . split ( '.' ) [ ( - 1 ) ] ) #NEWLINE# #UNINDENT# setattr ( model_cls , 'get_absolute_url' , _method ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise e #NEWLINE# #UNINDENT# #UNINDENT# from leonardo.utils.compress_patch import compress_monkey_patch #NEWLINE# compress_monkey_patch ( ) #NEWLINE# from leonardo.utils.select2 import patch_select2 #NEWLINE# patch_select2 ( ) #NEWLINE# from leonardo.utils.shortcuts_patch import patch_shortcuts #NEWLINE# patch_shortcuts ( )