Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4493 closed (fixed)

[unicode] django.contrib.redirects doesn't work with unicode branch

Reported by: marchino <marco.giusti@…> Owned by: Malcolm Tredinnick
Component: Uncategorized Version: other branch
Severity: Keywords: unicode redirects
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

here is the traceback when i'm trying to add a redirect in admin interface:

Traceback (most recent call last):
File "/home/nohero/programs/python/lib/python2.4/site-packages/django/template/__init__.py" in render_node
  764. result = node.render(context)
File "/home/nohero/programs/python/lib/python2.4/site-packages/django/template/__init__.py" in render
  882. return func(*resolved_vars)
File "/home/nohero/programs/python/lib/python2.4/site-packages/django/contrib/admin/templatetags/admin_modify.py" in output_all
  179. return u''.join([force_unicode(f) for f in form_fields])
File "/home/nohero/programs/python/lib/python2.4/site-packages/django/utils/encoding.py" in force_unicode
  38. s = unicode(s)

  TypeError at /admin/redirects/redirect/add/
  coercing to Unicode: need string or buffer, instance found 

Change History (6)

comment:1 by Simon G. <dev@…>, 17 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Malcolm Tredinnick, 17 years ago

Owner: changed from Jacob to Malcolm Tredinnick

I don't understand what "trying to add a redirect" means. Can you give an example of how to replicate the problem?

comment:3 by marchino <marco.giusti@…>, 17 years ago

django.contrib.redirects is a package that let you add redirects from the admin interface. acceding http://localhost:8000/admin/redirects/redirect/add/ i the error above

comment:4 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(In [5447]) unicode: Fixed #4493 -- Fixed a problem where a unicode method was not
returning a unicode object.

comment:5 by Malcolm Tredinnick, 17 years ago

(In [6575]) Fixed #4493 -- Noted that the LocaleMiddleware's placement w.r.t
CacheMiddleware is important. Thanks, SmileyChris.

comment:6 by Malcolm Tredinnick, 17 years ago

Ignore previous commit comment -- typo on my part (should be #4943)

Note: See TracTickets for help on using tickets.
Back to Top