Django

Code

Changeset 7200

Show
Ignore:
Timestamp:
03/07/08 21:06:30 (6 months ago)
Author:
gwilson
Message:

Fixed #5595 -- Made ModPythonRequest.__repr__ return a string instead of a unicode object. Fixes the printout of the request object in those server error e-mails I never get :)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/handlers/modpython.py

    r6826 r7200  
    77from django.dispatch import dispatcher 
    88from django.utils import datastructures 
    9 from django.utils.encoding import force_unicode 
     9from django.utils.encoding import force_unicode, smart_str 
    1010 
    1111# NOTE: do *not* import settings (or any module which eventually imports 
     
    3737        except: 
    3838            meta = '<could not parse>' 
    39         return '<ModPythonRequest\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' % \ 
    40             (self.path, get, post, cookies, meta) 
     39        return smart_str(u'<ModPythonRequest\npath:%s,\nGET:%s,\nPOST:%s,\nCOOKIES:%s,\nMETA:%s>' % 
     40                         (self.path, unicode(get), unicode(post), 
     41                          unicode(cookies), unicode(meta))) 
    4142 
    4243    def get_full_path(self):