How to add video in Course infor

21 views
Skip to first unread message

vantamtran

unread,
Apr 8, 2013, 2:35:20 AM4/8/13
to class2g...@googlegroups.com
hi all,

How to add video in Course info ?

When course is Preview I see a video introduction about course.

Sef Kloninger

unread,
Apr 8, 2013, 2:46:50 AM4/8/13
to vantamtran, class2g...@googlegroups.com
Put a video up on youtube and embed their player.  Try looking at the templates or view-source on the resulting pages for starters.

- Sef


--
You received this message because you are subscribed to the Google Groups "class2go users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to class2go-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

vantamtran

unread,
Apr 8, 2013, 2:52:40 AM4/8/13
to class2g...@googlegroups.com
Hi Sef,

This is code in templates to view video:

{% ifnotequal video None %}
    <iframe width="355" height="430" src="https://www.youtube.com/embed/{{video.url}}?rel=0" frameborder="0" allowfullscreen></iframe>
<br/>
{% endifnotequal %}

But How to upload video for every course ?

Sef Kloninger

unread,
Apr 8, 2013, 3:04:41 AM4/8/13
to vantamtran, class2g...@googlegroups.com
You just create a video with the slug="intro".  Give it the YouTube ID.

The relevant code for this is around main/courses/preview/views.py:46.  That's where the relevant "video" object is looked up and then passed into the template.

vantamtran

unread,
Apr 8, 2013, 3:30:23 AM4/8/13
to class2g...@googlegroups.com
Thanks Sef!
Reply all
Reply to author
Forward
0 new messages