Commit 4cb7a43f authored by Janez K's avatar Janez K

Merge branch 'dev' into streams

parents 962be4d8 0c7d85bd
......@@ -131,7 +131,7 @@
"short_name": "odt",
"uid": "41e34489-1835-4d16-88cf-fdfc355839de",
"default": "",
"required": false,
"required": true,
"multi": false,
"parameter_type": null,
"variable": "data",
......
......@@ -5,12 +5,13 @@ Decision support interaction views.
'''
from django.shortcuts import render
def decision_support_wsm(request, input_dict, output_dict, widget):
from wsm import WeightedSumModel
data = input_dict['data']
model = WeightedSumModel(data)
attributes = sorted(model.ranges.items())
unusable = sorted(model.unusable)
return render(request, 'interactions/wsm.html',
{'widget' : widget, 'attributes' : attributes,
'unusable_attributes' : unusable})
return render(request, 'interactions/wsm.html',
{'widget': widget, 'attributes': attributes,
'unusable_attributes': unusable})
......@@ -239,6 +239,7 @@ class AbstractWidget(models.Model):
description = models.TextField(blank=True,help_text='Description is used for a human readable description of what a widget does. A user will see this when he right clicks the widget and clicks help.')
category = models.ForeignKey(Category,related_name="widgets",help_text='Category determines to which category this widget belongs. Categories can be nested.')
visualization_view = models.CharField(max_length=200,blank=True,default='',help_text='Visualization view is (like the action) a python function that is a view that will render a template.')
streaming_visualization_view = models.CharField(max_length=200,blank=True,default='',help_text='Visualization view is (like the action) a python function that is a view that will render a template.')
user = models.ForeignKey(User,blank=True,null=True,related_name="widgets",help_text='If the User field is blank, everyone will see the widget, otherwise just this user. This is mainly used for Web Service imports as they are only visible to users that imported them.')
interactive = models.BooleanField(default=False,help_text='The widget can be interactive. This means that when a user executes the widget, the action will perform, then the interaction view will be executed and finally the Post interact action will be executed.')
interaction_view = models.CharField(max_length=200,blank=True,default='')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment