mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
Fix the logout to use a POST (introduced with Django 4.1)
Also add an handy command to clear Django cache
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from ram.utils import git_suffix
|
||||
|
||||
__version__ = "0.13.3"
|
||||
__version__ = "0.13.4"
|
||||
__version__ += git_suffix(__file__)
|
||||
|
13
ram/ram/management/commands/purge_cache.py
Normal file
13
ram/ram/management/commands/purge_cache.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from django.core.cache import cache
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Clear the application cache"
|
||||
|
||||
def handle(self, *args, **options):
|
||||
try:
|
||||
cache.clear()
|
||||
self.stdout.write(self.style.SUCCESS("Cache cleared"))
|
||||
except Exception:
|
||||
raise CommandError("Cache is not active")
|
Reference in New Issue
Block a user