add clearcache command

This commit is contained in:
Laura Klünder 2017-07-05 22:42:50 +02:00
parent 86c476a586
commit 6406950263
2 changed files with 9 additions and 14 deletions

View file

@ -0,0 +1,9 @@
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = 'clear the mapdata cache'
def handle(self, *args, **options):
from c3nav.mapdata.models import MapUpdate
MapUpdate.objects.create(type='management')

View file

@ -1,14 +0,0 @@
from django.core.management.base import BaseCommand
from c3nav.mapdata.render import render_all_levels
class Command(BaseCommand):
help = 'render the map'
def add_arguments(self, parser):
parser.add_argument('--show-accessibles', action='store_const', const=True, default=False,
help='highlight graph building areas (for debugging, but it looks nice, too)')
def handle(self, *args, **options):
render_all_levels(show_accessibles=options['show_accessibles'])