|
|
@ -52,37 +52,3 @@ class LoggedInHintCookieMiddleware(object): |
|
|
|
if self.cookie_name in request.COOKIES: |
|
|
|
response.delete_cookie(self.cookie_name) |
|
|
|
return response |
|
|
|
|
|
|
|
|
|
|
|
class vzhled: |
|
|
|
|
|
|
|
def process_request(self, request): |
|
|
|
return None |
|
|
|
|
|
|
|
def process_view(self, request, view_func, view_args, view_kwargs): |
|
|
|
#print "====== process_request ======" |
|
|
|
#print view_func |
|
|
|
#print view_args |
|
|
|
#print view_kwargs |
|
|
|
#print "=============================" |
|
|
|
return None |
|
|
|
|
|
|
|
def process_template_response(self, request, response): |
|
|
|
hodin = datetime.now().hour |
|
|
|
if (hodin <= 6) or (hodin >= 14): # TODO 20 |
|
|
|
response.context_data['noc'] = True |
|
|
|
else: |
|
|
|
response.context_data['noc'] = False |
|
|
|
return response |
|
|
|
|
|
|
|
def process_response(self, request, response): |
|
|
|
#hodin = datetime.now().hour |
|
|
|
#if (hodin <= 6) or (hodin >= 14): # TODO 20 |
|
|
|
#response.context_data['noc'] = True |
|
|
|
#else: |
|
|
|
#response.context_data['noc'] = False |
|
|
|
return response |
|
|
|
|
|
|
|
|
|
|
|
##def process_exception(request, exception): |
|
|
|
#pass |
|
|
|