Ticket #689: modpython.patch

File modpython.patch, 1.0 KB (added by ian@…, 18 years ago)

Patch to existing mod_python handler

Line 
1102,103c102
2< #user_id = self.session[users.SESSION_KEY]
3< user_id = self._req.user
4---
5> user_id = self.session[users.SESSION_KEY]
6106,117c105,106
7< try:
8< self._user = users.get_object(username__exact=user_id)
9< except (users.UserDoesNotExist):
10< from django.models.auth import User
11< import md5
12< import datetime
13< password_md5 = md5.new('fake').hexdigest()
14< now = datetime.datetime.now()
15< self._user = User(None, user_id,'','', user_id+'@cnet.com',password_md5,False,True,False,now,now)
16< self._user.save()
17< #except (AttributeError, KeyError, ValueError, users.UserDoesNotExist):
18< except (AttributeError, KeyError, ValueError):
19---
20> self._user = users.get_object(pk=user_id)
21> except (AttributeError, KeyError, ValueError, users.UserDoesNotExist):
22120d108
23<
Back to Top