Code

Opened 7 years ago

Closed 7 years ago

Last modified 7 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:

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 

Attachments (0)

Change History (6)

comment:1 Changed 7 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 7 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 7 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 7 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 7 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 7 years ago by mtredinnick

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.