summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-07-11 23:38:14 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-08-13 18:26:03 +0200
commita5593d66ea541dfbcd2597f81dcbc51965c51cfc (patch)
treee778fa93380d0244bfd8d115143996bad51612aa /archaeological_operations
parent05495e0b37da09deb7b7d2e5629112a046042836 (diff)
downloadIshtar-a5593d66ea541dfbcd2597f81dcbc51965c51cfc.tar.bz2
Ishtar-a5593d66ea541dfbcd2597f81dcbc51965c51cfc.zip
Manage alerts
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/views.py6
-rw-r--r--archaeological_operations/wizards.py5
2 files changed, 8 insertions, 3 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py
index 0721bb707..10e60c2bb 100644
--- a/archaeological_operations/views.py
+++ b/archaeological_operations/views.py
@@ -22,7 +22,7 @@ import json
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db.models import Q
-from django.http import HttpResponse, HttpResponseRedirect
+from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render, redirect
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
@@ -45,7 +45,7 @@ from archaeological_operations.wizards import has_associated_file, \
OperationClosingWizard, OperationDeletionWizard, SiteSearch, \
OperationAdministrativeActWizard, OperationEditAdministrativeActWizard, \
AdministrativeActDeletionWizard, SiteWizard, SiteModificationWizard, \
- SiteDeletionWizard
+ SiteDeletionWizard, OperationSearch
from ishtar_common.forms import ClosingDateFormSelection, FinalForm, \
FinalDeleteForm
from ishtar_common.models import get_current_profile, IshtarSiteProfile
@@ -175,7 +175,7 @@ def dashboard_operation(request, *args, **kwargs):
return render(request, 'ishtar/dashboards/dashboard_operation.html', dct)
-operation_search_wizard = SearchWizard.as_view(
+operation_search_wizard = OperationSearch.as_view(
[('general-operation_search', OperationFormSelection)],
label=_(u"Operation search"),
url_name='operation_search',)
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py
index a8f8ef80b..ba9709807 100644
--- a/archaeological_operations/wizards.py
+++ b/archaeological_operations/wizards.py
@@ -37,6 +37,10 @@ from ishtar_common.wizards import Wizard, ClosingWizard, DeletionWizard, \
logger = logging.getLogger(__name__)
+class OperationSearch(SearchWizard):
+ model = models.Operation
+
+
class OperationWizard(Wizard):
model = models.Operation
object_parcel_type = 'operation'
@@ -419,6 +423,7 @@ class SiteLabel(object):
class SiteSearch(SiteLabel, SearchWizard):
SITE_KEY = "search"
+ model = models.ArchaeologicalSite
class SiteWizard(SiteLabel, Wizard):