#coding=utf8
import uliweb

def after_init_settings(sender):
    from uliweb import orm, settings
    
    #if AUTO_SAE_ORM_PARA==True, then use sae to get mysql parameters
    if settings.ORM.AUTO_SAE_ORM_PARA:
        import sae.const as const
        CONNECTION = settings.ORM.CONNECTION.format(username=const.MYSQL_USER,
        password=const.MYSQL_PASS, host=const.MYSQL_HOST, port=const.MYSQL_PORT,
        database=const.MYSQL_DB)
        
        settings.ORM.CONNECTION = CONNECTION

@@ -100,121 +100,8 @@
    %0A
-    #if AUTO_SAE_ORM_PARA==True, then use sae to get mysql parameters%0A    if settings.ORM.AUTO_SAE_ORM_PARA:%0A    
     
@@ -126,20 +126,16 @@
 s const%0A
-    
     CONN
@@ -201,20 +201,16 @@
 L_USER,%0A
-    
     pass
@@ -278,20 +278,16 @@
 L_PORT,%0A
-    
     data
@@ -311,25 +311,17 @@
 DB)%0A    
-    %0A    
+%0A
     sett

fix sae