e676433ece6bc034beb9eedaeb19fc5b786dc565,server/website/website/views.py,,edit_knobs,#Any#Any#Any#,329

Before Change


            knob_values = model_to_dict(knob)
            if SessionKnob.objects.filter(session=session, knob=knob).exists():
                new_knob = SessionKnob.objects.filter(session=session, knob=knob)[0]
                knob_values["minval"] = new_knob.minval
                knob_values["maxval"] = new_knob.maxval
                knob_values["tunable"] = new_knob.tunable
            forms.append(SessionKnobForm(initial=knob_values))

After Change


        instance.save()
        return HttpResponse(status=204)
    else:
        knobs = SessionKnob.objects.filter(session=session).order_by("-tunable", "knob__name")
        forms = []
        for knob in knobs:
            knob_values = model_to_dict(knob)
            knob_values["session"] = session
            knob_values["name"] = KnobCatalog.objects.get(pk=knob.knob.pk).name
            forms.append(SessionKnobForm(initial=knob_values))
        context = {
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: cmu-db/ottertune
Commit Name: e676433ece6bc034beb9eedaeb19fc5b786dc565
Time: 2019-10-03
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/views.py
Class Name:
Method Name: edit_knobs


Project Name: comic/grand-challenge.org
Commit Name: 6c898957598010efa06f5ac006a78f852a37e56b
Time: 2018-10-24
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/core/templatetags/grandchallenge_tags.py
Class Name: ProjectStatisticsNode
Method Name: _get_map


Project Name: MTG/freesound
Commit Name: ad58b661aaee955bf8dc8086d805d56485f8c53a
Time: 2019-07-24
Author: alastair.porter@upf.edu
File Name: sounds/views.py
Class Name:
Method Name: sounds