Mercurial > public > sg101
comparison gpp/core/middleware.py @ 229:08b30ac04580
Who's online middleware wasn't returning a proper response in the is_ajax case.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 13 Jul 2010 01:25:48 +0000 |
parents | 423c39ee44e0 |
children | a2d388ed106e |
comparison
equal
deleted
inserted
replaced
228:d77e0dc772ad | 229:08b30ac04580 |
---|---|
37 def process_response(self, request, response): | 37 def process_response(self, request, response): |
38 """ | 38 """ |
39 Keep track of who is online. | 39 Keep track of who is online. |
40 """ | 40 """ |
41 if request.is_ajax(): | 41 if request.is_ajax(): |
42 return | 42 return response |
43 | 43 |
44 if request.user.is_authenticated(): | 44 if request.user.is_authenticated(): |
45 if request.COOKIES.get(ONLINE_COOKIE) is None: | 45 if request.COOKIES.get(ONLINE_COOKIE) is None: |
46 # update the last seen timestamp | 46 # update the last seen timestamp |
47 try: | 47 try: |