diff --git a/bds/templates/bds/home.html b/bds/templates/bds/home.html
index 9ccaa364..f689d2b5 100644
--- a/bds/templates/bds/home.html
+++ b/bds/templates/bds/home.html
@@ -34,7 +34,7 @@
- Télécharger la liste des membres (CSV)
+ Télécharger la liste des membres (CSV)
diff --git a/bds/tests/test_views.py b/bds/tests/test_views.py
index 20ce02a3..a40d3d85 100644
--- a/bds/tests/test_views.py
+++ b/bds/tests/test_views.py
@@ -22,6 +22,16 @@ def login_url(next=None):
return "{}?next={}".format(login_url, next)
+class TestHomeView(TestCase):
+ @mock.patch("gestioncof.signals.messages")
+ def test_get(self, mock_messages):
+ user = User.objects.create_user(username="random_user")
+ give_bds_buro_permissions(user)
+ self.client.force_login(user)
+ resp = self.client.get(reverse("bds:home"))
+ self.assertEquals(resp.status_code, 200)
+
+
class TestRegistrationView(TestCase):
@mock.patch("gestioncof.signals.messages")
def test_get_autocomplete(self, mock_messages):
diff --git a/gestioasso/urls.py b/gestioasso/urls.py
index 1de437ed..0fa72c58 100644
--- a/gestioasso/urls.py
+++ b/gestioasso/urls.py
@@ -8,20 +8,22 @@ from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import RedirectView
+bds_is_alone = (
+ "bds" in settings.INSTALLED_APPS and "gestioncof" not in settings.INSTALLED_APPS
+)
+
admin.autodiscover()
urlpatterns = [
- # Redirection / → /gestion, only useful for developpers.
- path("", RedirectView.as_view(url="gestion/")),
# Website administration (independent from installed apps)
path("admin/doc/", include("django.contrib.admindocs.urls")),
path("admin/", admin.site.urls),
]
-# App-specific urls
+if not bds_is_alone:
+ # Redirection / → /gestion, only useful for developpers.
+ urlpatterns.append(path("", RedirectView.as_view(url="gestion/")))
-bds_is_alone = (
- "bds" in settings.INSTALLED_APPS and "gestioncof" not in settings.INSTALLED_APPS
-)
+# App-specific urls
app_dict = {
"bds": "" if bds_is_alone else "bds/",