Changeset d6f8304 in OpenWorkouts-current for ow/templates


Ignore:
Timestamp:
Feb 11, 2019, 6:55:55 PM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
02aee97
Parents:
93bbb89
Message:

(#52) - screenshots of the workouts maps were corrupted randomly.

Replaced our screenshot_map shell script that was calling chrome headless
directly with some python code running splinter + selenium webdriver.

Using chromedriver in such environment we can first visit the map site
for the given workout, then wait a bit for it to completely load, then
take the screenshot.

I've also removed all traces of screenshot_map from the code.

Location:
ow/templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ow/templates/dashboard.pt

    r93bbb89 rd6f8304  
    8080            <div class="workout-map" tal:condition="workout.has_gpx">
    8181                <a href="" tal:attributes="href request.resource_url(workout)">
    82                     <img src="" tal:attributes="src request.static_url(workout.map_screenshot);
     82                    <img src="" tal:attributes="src workout.map_screenshot(request);
    8383                              alt workout.title; title workout.title">
    8484                </a>
  • ow/templates/profile.pt

    r93bbb89 rd6f8304  
    144144              <div class="workout-map" tal:condition="workout.has_gpx">
    145145                <a href="" tal:attributes="href request.resource_url(workout)">
    146                   <img src="" tal:attributes="src request.static_url(workout.map_screenshot);
     146                  <img src="" tal:attributes="src workout.map_screenshot(request);
    147147                            alt workout.title; title workout.title">
    148148                </a>
Note: See TracChangeset for help on using the changeset viewer.