File tree Expand file tree Collapse file tree 3 files changed +1
-22
lines changed Expand file tree Collapse file tree 3 files changed +1
-22
lines changed Original file line number Diff line number Diff line change 55
55
r'upload' ,
56
56
views .fileupload ,
57
57
name = 'upload' ),
58
- path (
59
- r'refresh' ,
60
- views .refresh_memcache ,
61
- name = 'refresh' )]
58
+ ]
Original file line number Diff line number Diff line change 6
6
7
7
from django import forms
8
8
from django .conf import settings
9
- from django .contrib .auth .decorators import login_required
10
9
from django .http import HttpResponse , HttpResponseForbidden
11
10
from django .shortcuts import get_object_or_404
12
11
from django .shortcuts import render
@@ -313,22 +312,6 @@ def fileupload(request):
313
312
return HttpResponse ("only for post" )
314
313
315
314
316
- @login_required
317
- def refresh_memcache (request ):
318
- try :
319
-
320
- if request .user .is_superuser :
321
- from djangoblog .utils import cache
322
- if cache and cache is not None :
323
- cache .clear ()
324
- return HttpResponse ("ok" )
325
- else :
326
- return HttpResponseForbidden ()
327
- except Exception as e :
328
- logger .error (e )
329
- return HttpResponse ("error" )
330
-
331
-
332
315
def page_not_found_view (
333
316
request ,
334
317
exception ,
Original file line number Diff line number Diff line change 126
126
< li > < a href ="{% url "account:login " %}" rel="nofollow "> 登录</ a > </ li >
127
127
{% endif %}
128
128
{% if user.is_superuser %}
129
- < li > < a href ="{% url "blog:refresh " %}" target="_blank "> 刷新缓存</ a > </ li >
130
129
< li > < a href ="{% url 'owntracks:show_dates' %} " target ="_blank "> 运动轨迹记录</ a > </ li >
131
130
{% endif %}
132
131
< li > < a href ="http://gitbook.lylinux.net " target ="_blank " rel ="nofollow "> GitBook</ a > </ li >
You can’t perform that action at this time.
0 commit comments