Ticket #289 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Add datetime.date to protocol's simplejson encoder in order to be able to use dates in SQLAlchemy

Reported by: yves Owned by: fredj
Priority: blocker Milestone: 1.1 Release
Component: General.server Version: SVN
Keywords: Cc:
State: Commit

Description

There is a special encoder in Protocol called MapFishJSONEncoder. This patch adds code to deal with dates.

Attachments

patch_protocol1_20081107.txt (1.2 kB) - added by yves 5 years ago.

Change History

Changed 5 years ago by yves

Changed 5 years ago by elemoine

  • state changed from Review to Commit

Yves, it may be that isinstance accepts a tuple as the 2nd arg:

if isinstance(obj, (decimal.Decimal, datetime.date, datetime.datetime)):

Could you check before commit please?

Changed 5 years ago by yves

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

(In [1295]) Added date/datetime capabilities to simplejson encoder Added hooks before_create/before_update closes #289 closes #290

Note: See TracTickets for help on using tickets.