|
@@ -11,6 +11,14 @@ def get_response(tpl='empty.html', tpl_vars={}, mimetype='text/html', status_cod
|
11
|
11
|
response.status_code = status_code
|
12
|
12
|
return response
|
13
|
13
|
|
|
14
|
+## @brief gets the html template corresponding to a given component type
|
|
15
|
+# @param type str : name of the component type
|
|
16
|
+# @param params dict : extra parameters to customize the template
|
|
17
|
+def get_component_html(type='text', params={}):
|
|
18
|
+ params['type'] = type
|
|
19
|
+ template_loader = TemplateLoader()
|
|
20
|
+ return template_loader.render_to_html(template_file='components/components.html', template_vars=params)
|
|
21
|
+
|
14
|
22
|
def index(request):
|
15
|
23
|
return get_response('index/index.html')
|
16
|
24
|
|