@@ -72,7 +72,11 | |||||
72 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" > |
|
72 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" > | |
73 | <td>{{ forloop.counter }}</td> |
|
73 | <td>{{ forloop.counter }}</td> | |
74 | {% for key in experiment_keys %} |
|
74 | {% for key in experiment_keys %} | |
|
75 | {% if 'status' in key %} | |||
|
76 | <td></td> | |||
|
77 | {% else %} | |||
75 | <td>{{ item|value:key }}</td> |
|
78 | <td>{{ item|value:key }}</td> | |
|
79 | {% endif %} | |||
76 | {% endfor %} |
|
80 | {% endfor %} | |
77 | </tr> |
|
81 | </tr> | |
78 | {% endif %} |
|
82 | {% endif %} |
@@ -401,6 +401,7 def experiment_new(request, id_camp=None): | |||||
401 |
|
401 | |||
402 | if form.is_valid(): |
|
402 | if form.is_valid(): | |
403 | experiment = form.save() |
|
403 | experiment = form.save() | |
|
404 | ##AGREGAR! | |||
404 | return redirect('url_experiment', id_exp=experiment.id) |
|
405 | return redirect('url_experiment', id_exp=experiment.id) | |
405 |
|
406 | |||
406 | kwargs = {} |
|
407 | kwargs = {} | |
@@ -810,15 +811,16 def operation(request, id_camp=None): | |||||
810 |
|
811 | |||
811 | if form.is_valid(): |
|
812 | if form.is_valid(): | |
812 | return redirect('url_operation', id_camp=campaign.id) |
|
813 | return redirect('url_operation', id_camp=campaign.id) | |
813 | locations = Location.objects.filter(experiment__campaign__pk = campaign.id).distinct() |
|
814 | #locations = Location.objects.filter(experiment__campaign__pk = campaign.id).distinct() | |
814 | experiments = Experiment.objects.filter(campaign__pk=campaign.id) |
|
815 | experiments = Experiment.objects.filter(campaign__pk=campaign.id) | |
|
816 | locations= Location.objects.filter(experiment=experiments).distinct() | |||
815 | #experiments = [Experiment.objects.filter(location__pk=location.id).filter(campaign__pk=campaign.id) for location in locations] |
|
817 | #experiments = [Experiment.objects.filter(location__pk=location.id).filter(campaign__pk=campaign.id) for location in locations] | |
816 | kwargs = {} |
|
818 | kwargs = {} | |
817 | #---Campaign |
|
819 | #---Campaign | |
818 | kwargs['campaign'] = campaign |
|
820 | kwargs['campaign'] = campaign | |
819 | kwargs['campaign_keys'] = ['name', 'start_date', 'end_date', 'tags', 'description'] |
|
821 | kwargs['campaign_keys'] = ['name', 'start_date', 'end_date', 'tags', 'description'] | |
820 | #---Experiment |
|
822 | #---Experiment | |
821 | keys = ['id', 'name', 'start_time', 'end_time'] |
|
823 | keys = ['id', 'name', 'start_time', 'end_time', 'status'] | |
822 | kwargs['experiment_keys'] = keys[1:] |
|
824 | kwargs['experiment_keys'] = keys[1:] | |
823 | kwargs['experiments'] = experiments |
|
825 | kwargs['experiments'] = experiments | |
824 | #---Radar |
|
826 | #---Radar | |
@@ -854,8 +856,10 def operation_search(request, id_camp=None, location_play = None): | |||||
854 |
|
856 | |||
855 | else: |
|
857 | else: | |
856 | campaign = get_object_or_404(Campaign, pk = id_camp) |
|
858 | campaign = get_object_or_404(Campaign, pk = id_camp) | |
857 | locations = Location.objects.filter(experiment__campaign__pk = campaign.id).distinct() |
|
859 | #locations = Location.objects.filter(experiment__campaign__pk = campaign.id).distinct() | |
|
860 | #experiments = Experiment.objects.filter(campaign__pk=campaign.id) | |||
858 | experiments = Experiment.objects.filter(campaign__pk=campaign.id) |
|
861 | experiments = Experiment.objects.filter(campaign__pk=campaign.id) | |
|
862 | locations= Location.objects.filter(experiment=experiments).distinct() | |||
859 | #experiments = [Experiment.objects.filter(location__pk=location.id).filter(campaign__pk=campaign.id) for location in locations] |
|
863 | #experiments = [Experiment.objects.filter(location__pk=location.id).filter(campaign__pk=campaign.id) for location in locations] | |
860 | form = OperationSearchForm(initial={'campaign': campaign.id}) |
|
864 | form = OperationSearchForm(initial={'campaign': campaign.id}) | |
861 |
|
865 |
General Comments 0
You need to be logged in to leave comments.
Login now