From 1cb2561b4c9a74b1163eef9217fe78d38be716df Mon Sep 17 00:00:00 2001 From: nanoy Date: Mon, 10 Dec 2018 00:24:40 +0100 Subject: [PATCH] Add minors features --- coopeV3/templatetags/vip.py | 5 +++-- templates/footer.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/coopeV3/templatetags/vip.py b/coopeV3/templatetags/vip.py index f8be55c..3d49afa 100644 --- a/coopeV3/templatetags/vip.py +++ b/coopeV3/templatetags/vip.py @@ -1,5 +1,5 @@ from django import template - +import random from preferences.models import GeneralPreferences register = template.Library() @@ -37,4 +37,5 @@ def grocer(): @register.simple_tag def global_message(): gp,_ = GeneralPreferences.objects.get_or_create(pk=1) - return gp.global_message + messages = gp.global_message.split("\n") + return random.choice(messages) diff --git a/templates/footer.html b/templates/footer.html index 64d1593..176019f 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -39,5 +39,5 @@
  • Facebook
  • - +