saschagottfried / todopyramid

My refactored version of ToDo Pyramid
1 stars 0 forks source link

refactor timezone utility functions into SQLAlchemy TodoUser model #6

Closed saschagottfried closed 10 years ago

saschagottfried commented 10 years ago

Currently this is done in view code, means a developer always has to care about it. If we move it into model, timezone conversions are transparent to any developer. We could control this behaviour in pyramid application settings.

saschagottfried commented 10 years ago

If you do not care about while editing existing Todos - SQLAlchemy raises

TypeError: can't compare offset-naive and offset-aware datetimes
saschagottfried commented 10 years ago

Done. Now I need to populate the model instances of TodoItems with localized datetime. Reconsider again if this refactoring was useful.