summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/urls.py4
-rw-r--r--ishtar_common/wizards.py6
2 files changed, 9 insertions, 1 deletions
diff --git a/ishtar_common/urls.py b/ishtar_common/urls.py
index 534e618f7..0efd7e8d9 100644
--- a/ishtar_common/urls.py
+++ b/ishtar_common/urls.py
@@ -281,6 +281,10 @@ urlpatterns += [
check_rights(['view_document', 'view_own_document'])(
views.document_search_wizard),
name='search-document'),
+ url(r'document/search/(?P<step>.+)?$',
+ check_rights(['view_document', 'view_own_document'])(
+ views.document_search_wizard),
+ name='document_search'),
url(r'document/create/$',
check_rights(['add_document', 'add_own_document'])(
views.DocumentCreateView.as_view()),
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 1ad394f25..30aa014c4 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -1494,12 +1494,16 @@ class SearchWizard(IshtarWizard):
bookmark = self.request.GET.get('bookmark', None)
default_search_vector = None
if bookmark and self.model:
+ slug = self.model.SLUG
+ if slug == "site":
+ slug = "archaeologicalsite"
+ app_label = self.model.__module__.split('.')[0]
try:
app_label = self.model.__module__.split('.')[0]
sq = models.SearchQuery.objects.get(
pk=bookmark,
content_type__app_label=app_label,
- content_type__model=self.model.SLUG,
+ content_type__model=slug,
profile__person__ishtaruser__user_ptr=self.request.user
)
default_search_vector = sq.query.replace('"', "''")