diff options
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/views.py | 6 | ||||
-rw-r--r-- | archaeological_operations/wizards.py | 5 |
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): |