From 1bdce4737551163b2e545e9b3d9a3a4397425070 Mon Sep 17 00:00:00 2001 From: Xeniac Date: Sat, 29 Dec 2018 18:11:11 +0100 Subject: [PATCH] Default to new and empty Page Elements instead of None. Fixes an issue when we try to acces Page.title in the template. --- src/content/context_processors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/context_processors.py b/src/content/context_processors.py index b1b93bf..3826ba0 100644 --- a/src/content/context_processors.py +++ b/src/content/context_processors.py @@ -18,8 +18,8 @@ def content_menus(request): :param request: a Django request object :return: a dict with the template variables mentioned above """ - current_page = None - current_top_page = None + current_page = models.Page() + current_top_page = models.Page() current_path = request.path_info[1:request.path_info.rfind('.')] # erzeuge das Top-Level MenĂ¼