Ticket #496 (closed defect: fixed)

Opened 12 months ago

Last modified 12 months ago

Support Django Internationalisation

Reported by: nick Owned by: nick
Priority: major Milestone: 0.4.2
Component: Remoting Version: 0.4.1
Keywords: django Cc:
Fixed in revision: Branch: pyamf/branches/django-i18n-496
Author: nick

Description

Change History

Changed 12 months ago by nick

  • status changed from new to accepted
  • branch set to pyamf/branches/django-i18n-496

Changed 12 months ago by nick

  • keywords djang review added
  • owner changed from nick to thijs
  • status changed from accepted to assigned
  • author set to nick

Support for any str or unicode based lazy function in r2253.

Changed 12 months ago by thijs

  • keywords django added; djang review removed
  • owner changed from thijs to nick

Upgraded to r10043 of Django trunk and the following test fails:

===============================================================================
[ERROR]: pyamf.tests.adapters.test_django.I18NTestCase.test_encode

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py", line 260, in run
    testMethod()
  File "/Users/thijstriemstra/Desktop/django-i18n-496/pyamf/tests/adapters/test_django.py", line 396, in test_encode
    self.assertEquals(pyamf.encode(ugettext_lazy('Hello')).getvalue(),
  File "/Users/thijstriemstra/Desktop/django-i18n-496/pyamf/__init__.py", line 1077, in encode
    encoder.writeElement(el)
  File "/Users/thijstriemstra/Desktop/django-i18n-496/pyamf/amf0.py", line 534, in writeElement
    func(data)
  File "/Users/thijstriemstra/Desktop/django-i18n-496/pyamf/amf0.py", line 760, in writeObject
    self.writeElement(value)
  File "/Users/thijstriemstra/Desktop/django-i18n-496/pyamf/amf0.py", line 534, in writeElement
    func(data)
  File "/Users/thijstriemstra/Desktop/django-i18n-496/pyamf/amf0.py", line 490, in writeFunc
    raise pyamf.EncodeError("Callables cannot be serialised")
pyamf.EncodeError: Callables cannot be serialised
-------------------------------------------------------------------------------

Changed 12 months ago by nick

  • keywords django, review added; django removed
  • owner changed from nick to thijs

Forgot a file in the commit :)

Changed 12 months ago by thijs

  • keywords django added; django, review removed
  • owner changed from thijs to nick

Tested with Django trunk and 1.0.2 final, all unit tests pass. Also tested with a local ByteArrayExample and things work fine, please merge.

Changed 12 months ago by thijs

  • status changed from assigned to closed
  • resolution set to fixed

fixed in r2260

Note: See TracTickets for help on using tickets.