Closed Bug 1124441 Opened 11 years ago Closed 11 years ago

Make vidly_tokenize optional

Categories

(Webtools Graveyard :: Air Mozilla, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: peterbe)

References

Details

At the moment, in our Vid.ly video templates we do this:: {% set token=vidly_tokenize(tag, 90) %} <iframe src="....{% if token %}&token={{ token }}{% endif %}" ... For a public event, if you do `vidly_tokenize(tag, 90)` it'll come back as None so the iframe src URL doesn't have a token on it. However, this means we can't render the event page until we've made this query and it's a single point of failure before we can even render the rest of the HTML. Instead, we should interrogate our VidlySubmissions associated with the event (and it's template tag!) and if it says no token is on the VidlySubmission we don't bother with the vidly_tokenize() function. E.g.:: {% if event.is_public %} {% set token='' %} {% else %} {% set token=vidly_tokenize(tag, 90) %} {% endif %} <iframe ...as before...
Depends on: 1124444
Assignee: nobody → peterbe
Status: NEW → ASSIGNED
The only change we need to do is in the video template itself. No new code needed. I've updated the vidly templates on dev, stage and prod.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.