Changeset 31adfa5 in OpenWorkouts-current for setup.py


Ignore:
Timestamp:
Dec 21, 2018, 11:00:25 AM (5 years ago)
Author:
borja <borja@…>
Branches:
current, feature/docs, master
Children:
fe6089a
Parents:
d507f75
Message:

(#14) Timezones support:

  • Added pytz as a new dependency, please install it in your existing envs:

pip install pytz

  • Added a timezone attribute to users, to store in which timezone they are, defaults to 'UTC'. Ensure any users you could have in your database have such attribute. You can add it in pshell:

for user in root.users:

user.timezone = 'UTC'

request.tm.commit()

  • Modified schemas/templates/views to let users choose their timezone based on a list of "common" timezones provided by pytz
  • Added two methods to the Workout model so we can get the start and end dates formatted in the appropiate timezone (all datetime objects are stored in UTC)
  • Modified the templates where we show workout dates and times so the new timezone-formatting methods are used.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    rd507f75 r31adfa5  
    2727    'unidecode',
    2828    'gpxpy',
    29     'lxml'
     29    'lxml',
     30    'pytz'
    3031]
    3132
Note: See TracChangeset for help on using the changeset viewer.