Blame view

common/context_processors.py 354 Bytes
Bartłomiej Nitoń authored
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- coding: utf-8 -*-

def error_proc(request):
  if request.session.get('error', ''):
    error = request.session.pop('error')
    return {'error': error}
  else:
    return {}

def message_proc(request):
  if request.session.get('message', ''):
    message = request.session.pop('message')
    return {'alert_message': message}
  else:
    return {}