remind user to restart c3nav if no external cache is configured

This commit is contained in:
Laura Klünder 2017-11-10 18:36:16 +01:00
parent aa7ffab45c
commit 5976a18946
3 changed files with 13 additions and 0 deletions

View file

@ -1,4 +1,6 @@
from django.conf import settings
from django.core.management.base import BaseCommand
from django.utils.translation import ugettext_lazy as _
class Command(BaseCommand):
@ -7,3 +9,6 @@ class Command(BaseCommand):
def handle(self, *args, **options):
from c3nav.mapdata.models import MapUpdate
MapUpdate.objects.create(type='management')
if not settings.HAS_REAL_CACHE:
print(_('You have no external cache configured, so don\'t forget to restart your c3nav instance!'))