From 6306d9800716d72f84d563f3874bdd5d1a686330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80?= Date: Tue, 16 Oct 2012 17:52:30 +0300 Subject: [PATCH] vsepr: geometries and molecules now are passed from xml as parameters --- common/lib/capa/capa/inputtypes.py | 5 +++++ common/lib/capa/capa/templates/vsepr_input.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/inputtypes.py b/common/lib/capa/capa/inputtypes.py index 16b36960c9..b8033d5859 100644 --- a/common/lib/capa/capa/inputtypes.py +++ b/common/lib/capa/capa/inputtypes.py @@ -726,6 +726,9 @@ def crystallography(element, value, status, render_template, msg=''): escapedict = {'"': '"'} value = saxutils.escape(value, escapedict) + molecules = element.get('molecules') + geometries = element.get('geometries') + context = {'id': eid, 'value': value, 'state': status, @@ -782,6 +785,8 @@ def vsepr_input(element, value, status, render_template, msg=''): 'width': width, 'height': height, 'display_file': display_file, + 'molecules': molecules, + 'geometries': geometries, } html = render_template("vsepr_input.html", context) diff --git a/common/lib/capa/capa/templates/vsepr_input.html b/common/lib/capa/capa/templates/vsepr_input.html index 1332b156a8..20e7e19dd3 100644 --- a/common/lib/capa/capa/templates/vsepr_input.html +++ b/common/lib/capa/capa/templates/vsepr_input.html @@ -2,7 +2,7 @@
-
+