Django

Code

Ticket #4493 (closed: fixed)

Opened 1 year ago

Last modified 11 months ago

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

Reported by: marchino <marco.giusti@gmail.com> Assigned to: mtredinnick
Milestone: Component: Uncategorized
Version: other branch Keywords: unicode redirects
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

06/06/07 16:54:32 changed by Simon G. <dev@simon.net.nz>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

06/07/07 18:50:26 changed 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?

06/07/07 20:01:57 changed by marchino <marco.giusti@gmail.com>

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

06/09/07 09:44:27 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

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

10/21/07 07:12:45 changed by mtredinnick

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

10/21/07 07:13:52 changed by mtredinnick

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


Add/Change #4493 ([unicode] django.contrib.redirects doesn't work with unicode branch)




Change Properties
Action