add clearcache command
This commit is contained in:
parent
86c476a586
commit
6406950263
2 changed files with 9 additions and 14 deletions
9
src/c3nav/mapdata/management/commands/clearcache.py
Normal file
9
src/c3nav/mapdata/management/commands/clearcache.py
Normal 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')
|
|
@ -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'])
|
Loading…
Add table
Add a link
Reference in a new issue