mirror of https://github.com/snachodog/mybuddy.git
Add cache table creation to reset command
This commit is contained in:
parent
a6c1e2cb38
commit
6392ffb37b
|
@ -4,6 +4,7 @@ from os import path
|
|||
from django.apps import apps
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.core.cache import cache
|
||||
from django.core.management import call_command
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.core.management.commands.flush import Command as Flush
|
||||
|
||||
|
@ -56,6 +57,11 @@ class Command(BaseCommand):
|
|||
options["migration_name"] = None
|
||||
migrate.handle(*args, **options)
|
||||
|
||||
# Create cache table.
|
||||
call_command("createcachetable")
|
||||
if verbosity > 0:
|
||||
self.stdout.write(self.style.SUCCESS("Cache table created."))
|
||||
|
||||
# Clear cache.
|
||||
cache.clear()
|
||||
if verbosity > 0:
|
||||
|
|
Loading…
Reference in New Issue