From: Guillaume Pellerin Date: Mon, 29 Aug 2016 15:39:57 +0000 (+0200) Subject: Add home url X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=758911ec4d07afba6892fa2959e7852787ace7d6;p=mezzo.git Add home url --- diff --git a/app/organization/pages/models.py b/app/organization/pages/models.py index e409b913..411e4ec6 100644 --- a/app/organization/pages/models.py +++ b/app/organization/pages/models.py @@ -52,3 +52,6 @@ class Home(Displayable): class Meta: verbose_name = _('home') verbose_name_plural = _("homes") + + def get_absolute_url(self): + return reverse("organization-home", kwargs={"slug": self.slug}) diff --git a/app/organization/pages/urls.py b/app/organization/pages/urls.py index 01dc2bdd..79a5ca73 100644 --- a/app/organization/pages/urls.py +++ b/app/organization/pages/urls.py @@ -14,5 +14,6 @@ urlpatterns = [ url("^$", HomeView.as_view(), name="home"), url("^dynamic-content-home-slider/$", DynamicContentHomeSliderView.as_view(), name='dynamic-content-home-slider'), url("^dynamic-content-home-body/$", DynamicContentHomeBodyView.as_view(), name='dynamic-content-home-body'), + url("^home/$", HomeView.as_view(), name='organization-home'), ] 'dynamic-content-home-body'