2017-11-10 18:36:16 +01:00
|
|
|
from django.conf import settings
|
2017-07-05 22:42:50 +02:00
|
|
|
from django.core.management.base import BaseCommand
|
2017-11-10 18:36:16 +01:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
2017-07-05 22:42:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Command(BaseCommand):
|
|
|
|
help = 'clear the mapdata cache'
|
|
|
|
|
|
|
|
def handle(self, *args, **options):
|
|
|
|
from c3nav.mapdata.models import MapUpdate
|
|
|
|
MapUpdate.objects.create(type='management')
|
2017-11-10 18:36:16 +01:00
|
|
|
|
|
|
|
if not settings.HAS_REAL_CACHE:
|
|
|
|
print(_('You have no external cache configured, so don\'t forget to restart your c3nav instance!'))
|