-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the logout to use a POST (introduced with Django 4.1)
Also add an handy command to clear Django cache
- Loading branch information
Showing
3 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from ram.utils import git_suffix | ||
|
||
__version__ = "0.13.3" | ||
__version__ = "0.13.4" | ||
__version__ += git_suffix(__file__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |