| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -25,15 +25,22 @@ def favicon():
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_app.route("/")
 | 
					 | 
					 | 
					 | 
					@_app.route("/")
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def _index ():
 | 
					 | 
					 | 
					 | 
					def _index ():
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    global _config
 | 
					 | 
					 | 
					 | 
					    global _config
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _args = {'system':_config['system']}
 | 
					 | 
					 | 
					 | 
					    _args = {}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _args['layout'] = _config['layout']
 | 
					 | 
					 | 
					 | 
					    try:
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # _args = dict(_args,**_config['layout'])
 | 
					 | 
					 | 
					 | 
					        _args = {'system':_config['system']}
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # _args = copy.copy(_config)
 | 
					 | 
					 | 
					 | 
					        _args['layout'] = _config['layout']
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    uri = os.sep.join([_config['layout']['root'], _config['layout']['index']])
 | 
					 | 
					 | 
					 | 
					        # _args = dict(_args,**_config['layout'])
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _html  = cms.components.html(uri,'index')
 | 
					 | 
					 | 
					 | 
					        # _args = copy.copy(_config)
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    e = Environment(loader=BaseLoader()).from_string(_html)     
 | 
					 | 
					 | 
					 | 
					        uri = os.sep.join([_config['layout']['root'], _config['layout']['index']])
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _args['index'] = e.render(**_args)
 | 
					 | 
					 | 
					 | 
					        _html  = cms.components.html(uri,'index')
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return render_template("index.html",**_args)
 | 
					 | 
					 | 
					 | 
					        e = Environment(loader=BaseLoader()).from_string(_html)     
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        _args['index'] = e.render(**_args)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        _index_page = "index.html"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    except Exception as e:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        _index_page = "404.html"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        pass
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    return render_template(_index_page,**_args)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_app.route('/id/<uid>') 
 | 
					 | 
					 | 
					 | 
					@_app.route('/id/<uid>') 
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def people(uid):
 | 
					 | 
					 | 
					 | 
					def people(uid):
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -43,7 +50,7 @@ def people(uid):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    global _config    
 | 
					 | 
					 | 
					 | 
					    global _config    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return "0",200
 | 
					 | 
					 | 
					 | 
					    return "0",200
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  
 | 
					 | 
					 | 
					 | 
					  
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_app.route('/cms/dialog')
 | 
					 | 
					 | 
					 | 
					@_app.route('/dialog')
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def _dialog ():
 | 
					 | 
					 | 
					 | 
					def _dialog ():
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    global _config 
 | 
					 | 
					 | 
					 | 
					    global _config 
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _uri = os.sep.join([_config['layout']['root'],request.headers['uri']])
 | 
					 | 
					 | 
					 | 
					    _uri = os.sep.join([_config['layout']['root'],request.headers['uri']])
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -63,7 +70,7 @@ def _dialog ():
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # _html = ( e.render(**_args))
 | 
					 | 
					 | 
					 | 
					    # _html = ( e.render(**_args))
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					@_app.route('/cms/page',methods=['POST'])
 | 
					 | 
					 | 
					 | 
					@_app.route('/page',methods=['POST'])
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def cms_page():
 | 
					 | 
					 | 
					 | 
					def cms_page():
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    """
 | 
					 | 
					 | 
					 | 
					    """
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return the content of a folder formatted for a menu
 | 
					 | 
					 | 
					 | 
					    return the content of a folder formatted for a menu
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -103,6 +110,7 @@ if len(sys.argv) > 1:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        i += 2
 | 
					 | 
					 | 
					 | 
					        i += 2
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					if __name__ == '__main__' :
 | 
					 | 
					 | 
					 | 
					if __name__ == '__main__' :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					   
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _path = SYS_ARGS['config'] if 'config' in SYS_ARGS else 'config.json'
 | 
					 | 
					 | 
					 | 
					    _path = SYS_ARGS['config'] if 'config' in SYS_ARGS else 'config.json'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if os.path.exists(_path):
 | 
					 | 
					 | 
					 | 
					    if os.path.exists(_path):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        _config = json.loads((open (_path)).read())
 | 
					 | 
					 | 
					 | 
					        _config = json.loads((open (_path)).read())
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |