Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4493 closed (fixed)

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

Reported by: marchino <marco.giusti@…> Owned by: mtredinnick
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: UI/UX:


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/" in render_node
  764. result = node.render(context)
File "/home/nohero/programs/python/lib/python2.4/site-packages/django/template/" in render
  882. return func(*resolved_vars)
File "/home/nohero/programs/python/lib/python2.4/site-packages/django/contrib/admin/templatetags/" 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/" 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 Changed 8 years ago by Simon G. <dev@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 8 years ago by mtredinnick

  • Owner changed from jacob to mtredinnick

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

comment:3 Changed 8 years ago by marchino <marco.giusti@…>

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 Changed 8 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:5 Changed 8 years ago by mtredinnick

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

comment:6 Changed 8 years ago by mtredinnick

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

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