Changeset f0e64eb in OpenWorkouts-current for ow/templates/profile.pt


Ignore:
Timestamp:
Feb 15, 2019, 11:00:35 AM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
0fa21cd
Parents:
eb20dc8
Message:

(#51) Fixed profile images were too big:

  • Added new dependency (Pillow)
  • Modified the user profile picture view. Now it accepts a GET parameter (size) telling the size of the image we want. Only one value is needed, the code will scale the image appropiately.
  • Modified the dashboard, profile and edit_profile templates to ask for a smaller version (200px) of the user profile picture.

IMPORTANT: Ensure you install Pillow in any existing environments after pulling:

pip install Pillow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/templates/profile.pt

    reb20dc8 rf0e64eb  
    1818        <div>
    1919          <tal:c tal:condition="getattr(user, 'picture', None)">
    20             <img tal:attributes="src request.resource_path(user, 'picture')"
     20            <img tal:attributes="src request.resource_path(user, 'picture', query={'size': 200})"
    2121                 width="450" />
    2222          </tal:c>
Note: See TracChangeset for help on using the changeset viewer.