summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-11-16 18:05:49 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:19 +0100
commit2e15f5fd3525120d22336faf10e960050aaefb67 (patch)
tree11cf75140bc4296fc5c936d4f7b6a3a640d4dbce /archaeological_operations
parentb46aa637fa1018a151f623138c94e145efa8288c (diff)
downloadIshtar-2e15f5fd3525120d22336faf10e960050aaefb67.tar.bz2
Ishtar-2e15f5fd3525120d22336faf10e960050aaefb67.zip
Remove deadcode (old dashboards) - clean css
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/ishtar_menu.py17
-rw-r--r--archaeological_operations/models.py531
-rw-r--r--archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html721
-rw-r--r--archaeological_operations/tests.py18
-rw-r--r--archaeological_operations/urls.py3
-rw-r--r--archaeological_operations/views.py8
6 files changed, 0 insertions, 1298 deletions
diff --git a/archaeological_operations/ishtar_menu.py b/archaeological_operations/ishtar_menu.py
index 2ad6dc259..b58fb5078 100644
--- a/archaeological_operations/ishtar_menu.py
+++ b/archaeological_operations/ishtar_menu.py
@@ -164,20 +164,3 @@ MENU_SECTIONS = [
),
),
]
-"""
- (
- 102, SectionItem(
- 'dashboard', _("Dashboard"),
- css='menu-operation',
- childs=[
- MenuItem(
- 'dashboard_main', _("General informations"),
- model=models.Operation,
- access_controls=['change_operation']),
- MenuItem(
- 'dashboard_operation', _("Operations"),
- model=models.Operation,
- access_controls=['change_operation']),
- ]),
- ),
-"""
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 9e038adeb..57f538383 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -3299,537 +3299,6 @@ class ParcelOwner(LightHistorizedItem):
return self.parcel.associated_file
-class OperationDashboard:
- def __init__(self):
- main_dashboard = Dashboard(Operation)
-
- self.total_number = main_dashboard.total_number
-
- self.filters_keys = [
- "recorded",
- "effective",
- "active",
- "field",
- "documented",
- "closed",
- "documented_closed",
- ]
- filters = {
- "recorded": {},
- "effective": {"scientist__isnull": False},
- "active": {"scientist__isnull": False, "end_date__isnull": True},
- "field": {"excavation_end_date__isnull": True},
- "documented": {"documents__isnull": False},
- "documented_closed": {
- "documents__isnull": False,
- "end_date__isnull": False,
- },
- "closed": {"end_date__isnull": False},
- }
- filters_label = {
- "recorded": _("Recorded"),
- "effective": _("Effective"),
- "active": _("Active"),
- "field": _("Field completed"),
- "documented": _("Associated report"),
- "closed": _("Closed"),
- "documented_closed": _("Documented and closed"),
- }
- self.filters_label = [filters_label[k] for k in self.filters_keys]
- self.total = []
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- nb = Operation.objects.filter(**fltr).count()
- self.total.append((lbl, nb))
-
- self.surface_by_type = (
- Operation.objects.values("operation_type__label")
- .annotate(number=Sum("surface"))
- .order_by("-number", "operation_type__label")
- )
-
- self.by_type = []
- self.types = OperationType.objects.filter(available=True).all()
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- type_res = (
- Operation.objects.filter(**fltr)
- .values("operation_type", "operation_type__label")
- .annotate(number=Count("pk"))
- .order_by("operation_type")
- )
- types_dct = {}
- for typ in type_res.all():
- types_dct[typ["operation_type"]] = typ["number"]
- types = []
- for typ in self.types:
- if typ.pk in types_dct:
- types.append(types_dct[typ.pk])
- else:
- types.append(0)
- self.by_type.append((lbl, types))
-
- self.by_year = []
- self.years = [
- res["year"]
- for res in Operation.objects.values("year").order_by("-year").distinct()
- ]
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- year_res = (
- Operation.objects.filter(**fltr)
- .values("year")
- .annotate(number=Count("pk"))
- .order_by("year")
- )
- years_dct = {}
- for yr in year_res.all():
- years_dct[yr["year"]] = yr["number"]
- years = []
- for yr in self.years:
- if yr in years_dct:
- years.append(years_dct[yr])
- else:
- years.append(0)
- self.by_year.append((lbl, years))
-
- self.by_realisation_year = []
- self.realisation_years = [
- res["date"]
- for res in Operation.objects.extra(
- {"date": "date_trunc('year', start_date)"}
- )
- .values("date")
- .filter(start_date__isnull=False)
- .order_by("-date")
- .distinct()
- ]
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- year_res = (
- Operation.objects.filter(**fltr)
- .extra({"date": "date_trunc('year', start_date)"})
- .values("date")
- .values("date")
- .filter(start_date__isnull=False)
- .annotate(number=Count("pk"))
- .order_by("-date")
- )
- years_dct = {}
- for yr in year_res.all():
- years_dct[yr["date"]] = yr["number"]
- years = []
- for yr in self.realisation_years:
- if yr in years_dct:
- years.append(years_dct[yr])
- else:
- years.append(0)
- self.by_realisation_year.append((lbl, years))
-
- self.effective = []
- for typ in self.types:
- year_res = (
- Operation.objects.filter(
- **{"scientist__isnull": False, "operation_type": typ}
- )
- .values("year")
- .annotate(number=Count("pk"))
- .order_by("-year")
- .distinct()
- )
- years_dct = {}
- for yr in year_res.all():
- years_dct[yr["year"]] = yr["number"]
- years = []
- for yr in self.years:
- if yr in years_dct:
- years.append(years_dct[yr])
- else:
- years.append(0)
- self.effective.append((typ, years))
-
- # TODO: by date
- now = datetime.date.today()
- limit = datetime.date(now.year, now.month, 1) - datetime.timedelta(365)
- by_realisation_month = Operation.objects.filter(
- start_date__gt=limit, start_date__isnull=False
- ).extra({"date": "date_trunc('month', start_date)"})
- self.last_months = []
- date = datetime.datetime(now.year, now.month, 1)
- for mt_idx in range(12):
- self.last_months.append(date)
- if date.month > 1:
- date = datetime.datetime(date.year, date.month - 1, 1)
- else:
- date = datetime.datetime(date.year - 1, 12, 1)
- self.by_realisation_month = []
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- month_res = (
- by_realisation_month.filter(**fltr)
- .annotate(number=Count("pk"))
- .order_by("-date")
- )
- month_dct = {}
- for mt in month_res.all():
- month_dct[mt.date] = mt.number
- date = datetime.date(now.year, now.month, 1)
- months = []
- for date in self.last_months:
- if date in month_dct:
- months.append(month_dct[date])
- else:
- months.append(0)
- self.by_realisation_month.append((lbl, months))
-
- # survey and excavations
- self.survey, self.excavation = {}, {}
- for dct_res, ope_types in (
- (self.survey, ("arch_diagnostic",)),
- (self.excavation, ("prev_excavation", "prog_excavation")),
- ):
- dct_res["total"] = []
- operation_type = {"operation_type__txt_idx__in": ope_types}
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- fltr.update(operation_type)
- nb = Operation.objects.filter(**fltr).count()
- dct_res["total"].append((lbl, nb))
-
- dct_res["by_year"] = []
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- fltr.update(operation_type)
- year_res = (
- Operation.objects.filter(**fltr)
- .values("year")
- .annotate(number=Count("pk"))
- .order_by("year")
- )
- years_dct = {}
- for yr in year_res.all():
- years_dct[yr["year"]] = yr["number"]
- years = []
- for yr in self.years:
- if yr in years_dct:
- years.append(years_dct[yr])
- else:
- years.append(0)
- dct_res["by_year"].append((lbl, years))
-
- dct_res["by_realisation_year"] = []
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- fltr.update(operation_type)
- year_res = (
- Operation.objects.filter(**fltr)
- .extra({"date": "date_trunc('year', start_date)"})
- .values("date")
- .filter(start_date__isnull=False)
- .annotate(number=Count("pk"))
- .order_by("-date")
- )
- years_dct = {}
- for yr in year_res.all():
- years_dct[yr["date"]] = yr["number"]
- years = []
- for yr in self.realisation_years:
- if yr in years_dct:
- years.append(years_dct[yr])
- else:
- years.append(0)
- dct_res["by_realisation_year"].append((lbl, years))
-
- current_year_ope = Operation.objects.filter(**operation_type).filter(
- year=datetime.date.today().year
- )
- current_realisation_year_ope = Operation.objects.filter(
- **operation_type
- ).filter(start_date__year=datetime.date.today().year)
- res_keys = [("area_realised", current_realisation_year_ope)]
- if dct_res == self.survey:
- res_keys.append(("area", current_year_ope))
- for res_key, base_ope in res_keys:
- dct_res[res_key] = []
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- area_res = (
- base_ope.filter(**fltr).annotate(number=Sum("surface")).all()
- )
- val = 0
- if area_res:
- val = (area_res[0].number or 0) / 10000.0
- dct_res[res_key].append(val)
- # TODO...
- res_keys = [("manday_realised", current_realisation_year_ope)]
- if dct_res == self.survey:
- res_keys.append(("manday", current_year_ope))
- for res_key, base_ope in res_keys:
- dct_res[res_key] = []
- for fltr_key in self.filters_keys:
- dct_res[res_key].append("-")
- # TODO...
- res_keys = [("mandayhect_realised", current_realisation_year_ope)]
- if dct_res == self.survey:
- res_keys.append(("mandayhect", current_year_ope))
- for res_key, base_ope in res_keys:
- dct_res[res_key] = []
- for fltr_key in self.filters_keys:
- dct_res[res_key].append("-")
- # TODO...
- dct_res["mandayhect_real_effective"] = "-"
- if dct_res == self.survey:
- dct_res["mandayhect_effective"] = "-"
-
- res_keys = [("org_realised", current_realisation_year_ope)]
- if dct_res == self.survey:
- res_keys.append(("org", current_year_ope))
- for res_key, base_ope in res_keys:
- org_res = (
- base_ope.filter(scientist__attached_to__isnull=False)
- .values("scientist__attached_to", "scientist__attached_to__name")
- .annotate(area=Sum("surface"))
- .order_by("scientist__attached_to__name")
- .all()
- )
- # TODO: man-days, man-days/hectare
-
- dct_res[res_key] = []
- for vals in org_res:
- vals["area"] = (vals["area"] or 0) / 10000.0
- dct_res[res_key].append(vals)
-
- year_ope = Operation.objects.filter(**operation_type)
- res_keys = ["org_by_year"]
- if dct_res == self.survey:
- res_keys.append("org_by_year_realised")
- q = (
- year_ope.values(
- "scientist__attached_to", "scientist__attached_to__name"
- )
- .filter(scientist__attached_to__isnull=False)
- .order_by("scientist__attached_to__name")
- .distinct()
- )
- org_list = [
- (org["scientist__attached_to"], org["scientist__attached_to__name"])
- for org in q
- ]
- # org_list_dct = dict(org_list)
- for res_key in res_keys:
- dct_res[res_key] = []
- years = self.years
- if res_key == "org_by_year_realised":
- years = self.realisation_years
- for org_id, org_label in org_list:
- org_res = year_ope.filter(scientist__attached_to__pk=org_id)
- key_date = ""
- if res_key == "org_by_year":
- org_res = org_res.values("year")
- key_date = "year"
- else:
- org_res = (
- org_res.extra({"date": "date_trunc('year', start_date)"})
- .values("date")
- .filter(start_date__isnull=False)
- )
- key_date = "date"
- org_res = org_res.annotate(area=Sum("surface"), cost=Sum("cost"))
- years_dct = {}
- for yr in org_res.all():
- area = (yr["area"] if yr["area"] else 0) / 10000.0
- cost = yr["cost"] if yr["cost"] else 0
- years_dct[yr[key_date]] = (area, cost)
- r_years = []
- for yr in years:
- if yr in years_dct:
- r_years.append(years_dct[yr])
- else:
- r_years.append((0, 0))
- dct_res[res_key].append((org_label, r_years))
- area_means, area_sums = [], []
- cost_means, cost_sums = [], []
- for idx, year in enumerate(years):
- vals = [r_yars[idx] for lb, r_yars in dct_res[res_key]]
- if not vals:
- continue
- sum_area = sum([a for a, c in vals])
- sum_cost = sum([c for a, c in vals])
- area_means.append(sum_area / len(vals))
- area_sums.append(sum_area)
- cost_means.append(sum_cost / len(vals))
- cost_sums.append(sum_cost)
- dct_res[res_key + "_area_mean"] = area_means
- dct_res[res_key + "_area_sum"] = area_sums
- dct_res[res_key + "_cost_mean"] = cost_means
- dct_res[res_key + "_cost_mean"] = cost_sums
-
- if dct_res == self.survey:
- self.survey["effective"] = []
- for yr in self.years:
- year_res = Operation.objects.filter(
- scientist__isnull=False,
- year=yr,
- operation_type__txt_idx__in=ope_types,
- ).annotate(number=Sum("surface"), mean=Avg("surface"))
- nb = year_res[0].number if year_res.count() else 0
- nb = nb if nb else 0
- mean = year_res[0].mean if year_res.count() else 0
- mean = mean if mean else 0
- self.survey["effective"].append((nb, mean))
-
- # TODO:Man-Days/hectare by Year
-
- # CHECK: month of realisation or month?
- dct_res["by_month"] = []
- for fltr_key in self.filters_keys:
- fltr, lbl = filters[fltr_key], filters_label[fltr_key]
- fltr.update(operation_type)
- month_res = (
- by_realisation_month.filter(**fltr)
- .annotate(number=Count("pk"))
- .order_by("-date")
- )
- month_dct = {}
- for mt in month_res.all():
- month_dct[mt.date] = mt.number
- date = datetime.date(now.year, now.month, 1)
- months = []
- for date in self.last_months:
- if date in month_dct:
- months.append(month_dct[date])
- else:
- months.append(0)
- dct_res["by_month"].append((lbl, months))
-
- operation_type = {"operation_type__txt_idx__in": ope_types}
- self.departments = [
- (fd["department__pk"], fd["department__label"])
- for fd in OperationByDepartment.objects.filter(department__isnull=False)
- .values("department__label", "department__pk")
- .order_by("department__label")
- .distinct()
- ]
- dct_res["by_dpt"] = []
- for dpt_id, dpt_label in self.departments:
- vals = (
- OperationByDepartment.objects.filter(
- department__pk=dpt_id,
- operation__operation_type__txt_idx__in=ope_types,
- )
- .values("department__pk", "operation__year")
- .annotate(number=Count("operation"))
- .order_by("operation__year")
- )
- dct_years = {}
- for v in vals:
- dct_years[v["operation__year"]] = v["number"]
- years = []
- for y in self.years:
- if y in dct_years:
- years.append(dct_years[y])
- else:
- years.append(0)
- years.append(sum(years))
- dct_res["by_dpt"].append((dpt_label, years))
- dct_res["effective_by_dpt"] = []
- for dpt_id, dpt_label in self.departments:
- vals = (
- OperationByDepartment.objects.filter(
- department__pk=dpt_id,
- operation__scientist__isnull=False,
- operation__operation_type__txt_idx__in=ope_types,
- )
- .values("department__pk", "operation__year")
- .annotate(
- number=Count("operation"),
- area=Sum("operation__surface"),
- fnap=Sum("operation__fnap_cost"),
- cost=Sum("operation__cost"),
- )
- .order_by("operation__year")
- )
- dct_years = {}
- for v in vals:
- values = []
- for k in ("number", "area", "cost", "fnap"):
- value = v[k] or 0
- if k == "area":
- value /= 10000.0
- values.append(value)
-
- dct_years[v["operation__year"]] = values
- years = []
- for y in self.years:
- if y in dct_years:
- years.append(dct_years[y])
- else:
- years.append((0, 0, 0, 0))
- nbs, areas, costs, fnaps = zip(*years)
- years.append((sum(nbs), sum(areas), sum(costs), sum(fnaps)))
- dct_res["effective_by_dpt"].append((dpt_label, years))
-
- OperationTown = Operation.towns.through
- query = (
- OperationTown.objects.filter(
- operation__scientist__isnull=False,
- operation__operation_type__txt_idx__in=ope_types,
- )
- .values("town__name", "town__departement__number")
- .annotate(nb=Count("operation"))
- .order_by("-nb", "town__name")[:10]
- )
- dct_res["towns"] = []
- for r in query:
- dct_res["towns"].append(
- (
- "%s (%s)" % (r["town__name"], r["town__departement__number"]),
- r["nb"],
- )
- )
-
- if dct_res == self.survey:
- query = (
- OperationTown.objects.filter(
- operation__scientist__isnull=False,
- operation__operation_type__txt_idx__in=ope_types,
- operation__surface__isnull=False,
- )
- .values("town__name", "town__departement__number")
- .annotate(nb=Sum("operation__surface"))
- .order_by("-nb", "town__name")[:10]
- )
- dct_res["towns_surface"] = []
- for r in query:
- dct_res["towns_surface"].append(
- (
- "%s (%s)"
- % (r["town__name"], r["town__departement__number"]),
- r["nb"],
- )
- )
- else:
- query = (
- OperationTown.objects.filter(
- operation__scientist__isnull=False,
- operation__operation_type__txt_idx__in=ope_types,
- operation__cost__isnull=False,
- )
- .values("town__name", "town__departement__number")
- .annotate(nb=Sum("operation__cost"))
- .order_by("-nb", "town__name")[:10]
- )
- dct_res["towns_cost"] = []
- for r in query:
- dct_res["towns_cost"].append(
- (
- "%s (%s)"
- % (r["town__name"], r["town__departement__number"]),
- r["nb"],
- )
- )
-
-
class OperationTypeOld(GeneralType):
order = models.IntegerField(_("Order"), default=1)
preventive = models.BooleanField(_("Is preventive"), default=True)
diff --git a/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html b/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html
deleted file mode 100644
index 19302cd05..000000000
--- a/archaeological_operations/templates/ishtar/dashboards/dashboard_operation.html
+++ /dev/null
@@ -1,721 +0,0 @@
-{% extends "base.html" %}
-{% load i18n range units humanize %}
-{% block extra_head %}
-{{form.media}}
-{% endblock %}
-{% block content %}
-
-<h2>{% trans "Operations" %}</h2>
-
-<div class='dashboard' id='dashboard-operations'>
- <h3>{% trans "Global informations" %}</h3>
- <div>
- <div class='clean-table'>
- <h4>{% trans "total" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
- </tr>
- {% for lbl, nb in dashboard.total %}
- <tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "area by type of operation" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Status" %}</th><th>{% trans "Area (ha)" %}</th>
- </tr>
- {% for surface in dashboard.surface_by_type %}
- <tr>
- <th class='sub'>{{surface.operation_type__label}}</th><td>{{surface.number|m2_to_ha|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by types" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for typ in dashboard.types %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>
- {% endif %}
- <th>{{typ.label}}</th>
- {% endfor %}
- </tr>
- {% for lbl, types in dashboard.by_type %}
- <tr>
- {%for nb in types %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>
- {% endif %}
- <th>{{yr|default_if_none:''}}</th>{% endfor %}
- </tr>
- {% for lbl, years in dashboard.by_year %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>
- {% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by realisation year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {%for yr in dashboard.realisation_years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>
- {% endif %}
- <th>{{yr.year|default_if_none:''}}</th>{% endfor %}
- </tr>
- {% for lbl, years in dashboard.by_realisation_year %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>
- {% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "effective operation by type and year" %}</h4>
- <div class='clean-table-wrap'>
- <table class='mini-table table table-striped'>
- {% for lbl, years in dashboard.effective %}
-
- {% if forloop.counter0|divisibleby:6 %}
- <tr>
- {%for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th></th>
- {% endif %}
- <th>{{yr|default_if_none:''}}</th>{% endfor %}
- </tr>
- {% endif %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>
- {% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by realisation month" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {%for mt in dashboard.last_months %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>
- {% endif %}
- <th>{{mt.date|date:"N Y"|capfirst}}</th>{% endfor %}
- </tr>
- {% for lbl, months in dashboard.by_realisation_month %}
- <tr>
- {%for nb in months %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>
- {% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- </div>
-
- <h3>{% trans "Survey informations" %}</h3>
- <div>
-
- <div class='clean-table'>
- <h4>{% trans "total" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
- </tr>
- {% for lbl, nb in dashboard.survey.total %}
- <tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {%for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>
- {% endif %}
- <th>{{yr|default_if_none:''}}</th>{% endfor %}
- </tr>
- {% for lbl, years in dashboard.survey.by_year %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>
- {% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by realisation year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {%for yr in dashboard.realisation_years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>
- {% endif %}
- <th>{{yr.year|default_if_none:''}}</th>{% endfor %}
- </tr>
- {% for lbl, years in dashboard.survey.by_realisation_year %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>
- {% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "current year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th></th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.survey.area %}<td>{{nb|intcomma}}</td>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.survey.manday %}<td>{{nb|intcomma}}</td>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.survey.mandayhect %}<td>{{nb|intcomma}}</td>{%endfor%}
- </tr>
- </table></div></div>
- <p><strong>{% trans "Man-day/hectare for effective operations (current year):" %}</strong> {{dashboard.survey.mandayhect_effective}}</p>
- <div class='clean-table'>
- <h4>{% trans "organizations (current year)" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
- </tr>
- {% for org in dashboard.survey.org %}
- <tr>
- <th class='sub'>{{org.scientist__attached_to__name}}</th><td>{{org.area|intcomma}}</td><td>{{org.manday|intcomma}}</td><td>{{org.mandayhect|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "current realisation year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Status" %}</th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.survey.area_realised %}<td>{{nb|intcomma}}</td>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.survey.manday_realised %}<td>{{nb|intcomma}}</td>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.survey.mandayhect_realised %}<td>{{nb|intcomma}}</td>{%endfor%}
- </tr>
- </table></div></div>
-
- <p><strong>{% trans "Man-day/hectare for effective operations (current realisation year):" %}</strong> {{dashboard.survey.mandayhect_real_effective}}</p>
-
- <div class='clean-table'>
- <h4>{% trans "organizations (current realisation year)" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
- </tr>
- {% for org in dashboard.survey.org_realised %}
- <tr>
- <th class='sub'>{{org.scientist__attached_to__name}}</th><td>{{org.area|intcomma}}</td><td>{{org.manday|intcomma}}</td><td>{{org.mandayhect|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
- <div class='clean-table'>
- <h4>{% trans "area by organization by year" %}</h4>
- <div class='clean-table-wrap'>
- <table class='mini-table table table-striped'>
- <tr>
- </tr>
- {% for org, vals in dashboard.survey.org_by_year %}
- {% if forloop.counter0|divisibleby:4 %}
- {% for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "Organization" %}</th>
- {% endif %}
- <th>{{yr|default_if_none:''}}</th>
- {% endfor %}
- {% endif %}
-
- <tr>
- {% for area, cost in vals %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{org}}</th>
- {% endif %}
- <td>{{area|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- <tr>
- {% for area in dashboard.survey.org_by_year_area_mean %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Mean" %}</th>{% endif%}
- <td>{{area|intcomma}}</td>{% endfor %}
- </tr>
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "effective operations areas (ha)" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {%for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th></th>
- {% endif %}
- <th>{{yr|default_if_none:''}}</th>{% endfor %}
- </tr>
- <tr>
- {% for nb, mean in dashboard.survey.effective %}
- {% if forloop.counter0|divisibleby:5 %}<th>{% trans "Sum" %}</th>{%endif%}
- <td>{{nb|m2_to_ha|intcomma}}</td>{% endfor %}
- </tr>
- <tr>
- {% for nb, avg in dashboard.survey.effective %}
- {% if forloop.counter0|divisibleby:5 %}<th>{% trans "Average" %}</th>{%endif%}
- <td>{{avg|m2_to_ha|intcomma}}</td>{% endfor %}
- </tr>
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "man-days/hectare by year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {%for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th></th>
- {% endif %}
- <th>{{yr|default_if_none:''}}</th>{% endfor %}
- </tr>
- <tr>
- {% for nb, mean in dashboard.survey.mandayshect %}
- {% if forloop.counter0|divisibleby:5 %}<th>{% trans "Man-Days/hectare" %}</th>{%endif%}
- <td>{{nb|intcomma}}</td>{% endfor %}
- </tr>
- <tr>
- {% for nb, avg in dashboard.survey.mandayshect %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Average" %}</th>
- {%endif%}
- <td>{{avg|intcomma}}</td>{% endfor %}
- </tr>
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by month" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for mt in dashboard.last_months %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>{% endif %}
- <th>{{mt.date|date:"N Y"|capfirst}}</th>{% endfor %}
- </tr>
- {% for lbl, months in dashboard.survey.by_month %}
- <tr>
- {%for nb in months %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>
- {% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by department" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "Department" %}</th>
- {% endif %}
- <th>{{yr|default_if_none:''}}</th>{% endfor %}<th>{% trans "Sum" %}</th>
- </tr>
- {% for lbl, years in dashboard.survey.by_dpt %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td{%if forloop.last%} class='sub'{%endif%}>{{nb|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "effective operation by department" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:4 %}
- <th rowspan='2'>{% trans "Department" %}</th>{% endif %}
- <th class='sub' colspan='2'>{{yr|default_if_none:''}}</th>{% endfor %}<th colspan='2'>{% trans "Sum" %}</th>
- </tr>
- <tr>
- {%for yr in dashboard.years %}<th>{%trans "Nb."%}</th><th>{%trans "Area"%}</th>{% endfor %}<th>{%trans "Nb."%}</th><th>{%trans "Area"%}</th>
- </tr>
- {% for lbl, years in dashboard.survey.effective_by_dpt %}
- <tr>
- {%for nb, area, cost, fnap in years %}
- {% if forloop.counter0|divisibleby:4 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td{%if forloop.last%} class='sub'{%endif%}>{{nb|intcomma}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{area|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "main towns by number" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Town" %}</th><th>{% trans "Number" %}</th>
- </tr>
- {% for lbl, nb in dashboard.survey.towns %}
- <tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "main towns by surface" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Town" %}</th><th>{% trans "Total surface (ha)" %}</th>
- </tr>
- {% for lbl, nb in dashboard.survey.towns_surface %}
- <tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|m2_to_ha|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
- </div>
-
- <h3>{% trans "Excavation informations" %}</h3>
- <div>
- <div class='clean-table'>
- <h4>{% trans "total" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Status" %}</th><th>{% trans "Number" %}</th>
- </tr>
- {% for lbl, nb in dashboard.excavation.total %}
- <tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {%for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "State" %}</th>{% endif %}
- <th>{{yr|default_if_none:''}}</th>{% endfor %}
- </tr>
- {% for lbl, years in dashboard.excavation.by_year %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by realisation year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for yr in dashboard.realisation_years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "State" %}</th>{% endif %}
- <th>{{yr.year}}</th>{% endfor %}
- </tr>
- {% for lbl, years in dashboard.excavation.by_realisation_year %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "current realisation year" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Status" %}</th>{% for lbl in dashboard.filters_label %}<th>{{lbl}}</th>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Area"%}</th>{% for nb in dashboard.excavation.area_realised %}<td>{{nb|default_if_none:'-'|intcomma}}</td>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Man-day"%}</th>{% for nb in dashboard.excavation.manday_realised %}<td>{{nb|default_if_none:'-'|intcomma}}</td>{%endfor%}
- </tr>
- <tr>
- <th class='sub'>{% trans "Man-day/hectare"%}</th>{% for nb in dashboard.excavation.mandayhect_realised %}<td>{{nb|default_if_none:'-'|intcomma}}</td>{%endfor%}
- </tr>
- </table></div></div>
-
- <p><strong>{% trans "Man-day/hectare for effective operations (current realisation year):" %}</strong> {{dashboard.excavation.mandayhect_real_effective}}</p>
-
- <div class='clean-table'>
- <h4>{% trans "organizations (current realisation year)" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>&nbsp;</th><th>{% trans "Area" %}</th><th>{% trans "Man-day" %}</th><th>{% trans "Man-day/hectare" %}</th>
- </tr>
- {% for org in dashboard.excavation.org_realised %}
- <tr>
- <th class='sub'>{{org.scientist__attached_to__name}}</th><td>{{org.area|default_if_none:'-'|intcomma}}</td><td>{{org.manday|default_if_none:'-'|intcomma}}</td><td>{{org.mandayhect|default_if_none:'-'|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "area by organization by year" %}</h4>
- <div class='clean-table-wrap'>
- <table class='mini-table table table-striped'>
- {% for org, vals in dashboard.excavation.org_by_year %}
- {% if forloop.counter0|divisibleby:5 %}
- <tr>
- {% for yr in dashboard.years%}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Organization" %}</th>{% endif %}
- <th>{{yr|default_if_none:'-'}}</th>{% endfor %}
- </tr>
- {% endif %}
- <tr>
- {% for area, cost in vals %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{org}}</th>{% endif %}
- <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- <tr>
- {% for area in dashboard.excavation.org_by_year_area_sum %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Sum" %}</th>{% endif %}
- <td>{{area|intcomma}}</td>{% endfor %}
- </tr>
- <tr>
- {% for area in dashboard.excavation.org_by_year_area_mean %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Mean" %}</th>{% endif %}
- <td>{{area|intcomma}}</td>{% endfor %}
- </tr>
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "area by organization by realisation year" %}</h4>
- <div class='clean-table-wrap'>
- <table class='mini-table table table-striped'>
- {% for org, vals in dashboard.excavation.org_by_year %}
-
- {% if forloop.counter0|divisibleby:5 %}
- <tr>
- {% for yr in dashboard.years%}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Organization" %}</th>{% endif %}
- <th>{{yr|default_if_none:'-'}}</th>{% endfor %}
- </tr>
- {% endif %}
-
- <tr>
- {% for area, cost in vals %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{org}}</th>{% endif %}
- <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- <tr>
- {% for area in dashboard.excavation.org_by_year_area_sum %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Sum" %}</th>{% endif %}
- <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
- </tr>
- <tr>
- {% for area in dashboard.excavation.org_by_year_area_mean %}
- {% if forloop.counter0|divisibleby:5 %}
- <th>{% trans "Mean" %}</th>{% endif %}
- <td>{{area|default_if_none:'-'|intcomma}}</td>{% endfor %}
- </tr>
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by month" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for mt in dashboard.last_months %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "State" %}</th>{% endif %}
- <th>{{mt.date|date:"N Y"|capfirst}}</th>{% endfor %}
- </tr>
- {% for lbl, months in dashboard.excavation.by_month %}
- <tr>
- {% for nb in months %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td>{{nb|default_if_none:'-'|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "by department" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{% trans "Department" %}</th>{% endif %}
- <th>{{yr|default_if_none:'-'}}</th>{% endfor %}
- <th>{% trans "Sum" %}</th>
- </tr>
- {% for lbl, years in dashboard.excavation.by_dpt %}
- <tr>
- {% for nb in years %}
- {% if forloop.counter0|divisibleby:5 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td{%if forloop.last%} class='sub'{%endif%}>{{nb|default_if_none:'-'|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "effective operation by department" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- {% for yr in dashboard.years %}
- {% if forloop.counter0|divisibleby:3 %}
- <th rowspan='2' class="sub">{% trans "Department" %}</th>{% endif %}
- <th colspan='3'>{{yr|default_if_none:'-'}}</th>{% endfor %}
- <th rowspan='2' class="sub">{% trans "Department" %}</th>
- <th colspan='3'>{% trans "Sum" %}</th>
- </tr>
- <tr>
- {% for yr in dashboard.years %}<th>{%trans "Nb."%}</th><th>{%trans "Cost"%}</th><th>{%trans "FNAP cost"%}</th>{% endfor %}<th>{%trans "Nb."%}</th><th>{%trans "Cost"%}</th><th>{%trans "FNAP cost"%}</th>
- </tr>
- {% for lbl, years in dashboard.excavation.effective_by_dpt %}
- <tr>
- {% for nb, area, cost, fnap in years %}
- {% if forloop.counter0|divisibleby:3 %}
- <th class='sub'>{{lbl}}</th>{% endif %}
- <td{%if forloop.last%} class='sub'{%endif%}>{{nb|intcomma}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{cost|intcomma}}</td><td{%if forloop.last%} class='sub'{%endif%}>{{fnap|intcomma}}</td>{% endfor %}
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "main towns by number" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Town" %}</th><th>{% trans "Number" %}</th>
- </tr>
- {% for lbl, nb in dashboard.excavation.towns %}
- <tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
- <div class='clean-table'>
- <h4>{% trans "main towns by cost" %}</h4>
- <div class='clean-table-wrap'>
- <table class="table table-striped">
- <tr>
- <th>{% trans "Town" %}</th><th>{% trans "Cost (euros)" %}</th>
- </tr>
- {% for lbl, nb in dashboard.excavation.towns_cost %}
- <tr>
- <th class='sub'>{{lbl}}</th><td>{{nb|intcomma}}</td>
- </tr>
- {% endfor %}
- </table></div></div>
-
-
- </div>
-</div>
-<script>
- $( function() {
- $( "#dashboard-operations" ).accordion({
- collapsible: true,
- heightStyle: "content"
- });
- } );
-</script>
-{% endblock %}
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 148ef3ed1..9a5f35d9b 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -3390,24 +3390,6 @@ class LabelTest(TestCase, OperationInitTest):
f.close()
-class DashboardTest(TestCase, OperationInitTest):
- fixtures = FILE_FIXTURES
-
- def setUp(self):
- IshtarSiteProfile.objects.get_or_create(slug="default", active=True)
- self.username, self.password, self.user = create_superuser()
- self.orgas = self.create_orgas(self.user)
- self.operations = self.create_operation(self.user, self.orgas[0])
-
- def test_dashboard(self):
- url = "dashboard-operation"
- c = Client()
- c.login(username=self.username, password=self.password)
-
- response = c.get(reverse(url))
- self.assertEqual(response.status_code, 200)
-
-
def create_administrativact(user, operation):
act_type, created = models.ActType.objects.get_or_create(
txt_idx="act_type_O", intented_to="O"
diff --git a/archaeological_operations/urls.py b/archaeological_operations/urls.py
index c6ecc3281..6c6a2e21c 100644
--- a/archaeological_operations/urls.py
+++ b/archaeological_operations/urls.py
@@ -217,9 +217,6 @@ urlpatterns = [
name="generatedoc-administrativeactop",
),
url(
- r"dashboard_operation/$", views.dashboard_operation, name="dashboard-operation"
- ),
- url(
r"autocomplete-administrativeact/$",
views.autocomplete_administrativeact,
name="autocomplete-administrativeact",
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py
index 7d83bb7e0..f15e24c43 100644
--- a/archaeological_operations/views.py
+++ b/archaeological_operations/views.py
@@ -191,14 +191,6 @@ get_administrativeact = get_item(
show_administrativeact = show_item(models.AdministrativeAct, "administrativeact")
-def dashboard_operation(request, *args, **kwargs):
- """
- Operation dashboard
- """
- dct = {"dashboard": models.OperationDashboard()}
- return render(request, "ishtar/dashboards/dashboard_operation.html", dct)
-
-
operation_search_wizard = wizards.OperationSearch.as_view(
[("general-operation_search", forms.OperationFormSelection)],
label=_("Operation search"),