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