summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_warehouse/tests.py1
-rw-r--r--example_project/settings.py2
-rw-r--r--requirements.txt2
3 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_warehouse/tests.py b/archaeological_warehouse/tests.py
index 91773b77b..c218b7d0e 100644
--- a/archaeological_warehouse/tests.py
+++ b/archaeological_warehouse/tests.py
@@ -813,6 +813,7 @@ class ContainerTest(FindInit, TestCase):
url = "/autocomplete-container/{}/".format(self.main_warehouse.pk)
response = client.get(url, {"term": "Test"})
self.assertEqual(response.status_code, 200)
+ self.assertTrue(response.content)
c = json.loads(response.content.decode())
self.assertEqual(len(c), 2)
response = client.get(url, {"term": "Test 35000"})
diff --git a/example_project/settings.py b/example_project/settings.py
index 663bb326c..a93a91e67 100644
--- a/example_project/settings.py
+++ b/example_project/settings.py
@@ -165,6 +165,7 @@ ROOT_URLCONF = "example_project.urls"
AUTHENTICATION_BACKENDS = (
"axes.backends.AxesBackend",
"ishtar_common.backend.ObjectPermBackend",
+ "guardian.backends.ObjectPermissionBackend",
)
INSTALLED_APPS = [
@@ -189,6 +190,7 @@ INSTALLED_APPS = [
"django.contrib.staticfiles",
"django.contrib.messages",
"django.contrib.humanize",
+ "guardian",
# 'debug_toolbar',
]
diff --git a/requirements.txt b/requirements.txt
index 22c9a4a2d..d0216e130 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -72,6 +72,6 @@ django-axes==5.4.3
num2words==0.5.9
feedparser==6.0.11
# debian bullseye is feedparser==5.2.1 but with python3.9 backport
-
+django-guardian==2.0.0
# TODO v5: python3-pathvalidate -> libreoffice.py