-
-
Notifications
You must be signed in to change notification settings - Fork 864
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:czlee/tabbycat into develop
- Loading branch information
Showing
10 changed files
with
79 additions
and
67 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
seq,name,abbv,stage,type,is_silent,feedback_weight,break_category | ||
1,Round 1,R1,P,R,0,0.7, | ||
2,Round 2,R2,P,P,0,0.7, | ||
3,Round 3,R3,P,P,0,0.7, | ||
4,Round 4,R4,P,P,0,0.7, | ||
5,Open Quarterfinal,OQF,E,F,1,0.7,open | ||
6,Open Semifinal,OSF,E,B,1,0.7,open | ||
7,Open Grand Final,OGF,E,B,1,0.7,open | ||
8,ESL Semifinal,SSF,E,F,1,0.7,esl | ||
9,ESL Grand Final,SGF,E,B,1,0.7,esl | ||
10,EFL Grand Final,FGF,E,F,1,0.7,efl | ||
11,Novice Semifinal,NSF,E,F,1,0.7,novice | ||
12,Novice Grand Final,NGF,E,B,1,0.7,novice |
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,27 +1,10 @@ | ||
from django.core.management.base import BaseCommand, CommandError | ||
from django.core.urlresolvers import reverse | ||
from django.utils.cache import get_cache_key | ||
from django.core.cache import cache | ||
from django.test import RequestFactory | ||
from django.contrib.auth.models import AnonymousUser | ||
|
||
class Command(BaseCommand): | ||
|
||
def add_arguments(self, parser): | ||
parser.add_argument("path") | ||
help = "Clears django's cache" | ||
|
||
def handle(self, *args, **options): | ||
path = options['path'] | ||
factory = RequestFactory() | ||
request = factory.get(path) | ||
request.user = AnonymousUser() | ||
key = get_cache_key(request, key_prefix=None) | ||
if not key: | ||
self.stdout.write("Could not find key for " + str(path) + "\n") | ||
return | ||
if not cache.get(key): | ||
self.stdout.write("Could not find key " + str(key) + "\n") | ||
return | ||
if key and cache.get(key): | ||
cache.delete(key) | ||
self.stdout.write("Deleted cache for key " + str(key) + "\n") | ||
cache.clear() | ||
self.stdout.write("Cache has been cleared") |
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
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
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