comparison oembed/management/commands/oembed_refresh.py @ 912:602639621257

Tweak HTML for videos that are no longer found.
author Brian Neal <bgneal@gmail.com>
date Sat, 21 Mar 2015 09:56:40 -0500
parents d3f6e9cb1f39
children f2fbe2b0d25d
comparison
equal deleted inserted replaced
911:d3f6e9cb1f39 912:602639621257
34 34
35 def error_html(oembed): 35 def error_html(oembed):
36 """Returns a string of HTML to be used when we can't retrieve the oEmbed 36 """Returns a string of HTML to be used when we can't retrieve the oEmbed
37 data. 37 data.
38 """ 38 """
39 return u'<p><a href="{url}">{title}</a></p>'.format(url=oembed.url, title=oembed.title) 39 return u'<p>Video: <a href="{url}">{title}</a></p>'.format(
40 url=oembed.url, title=oembed.title)
40 41
41 42
42 def refresh_html(providers, oembed): 43 def refresh_html(providers, oembed):
43 """Refresh the oEmbed HTML for the given oembed object.""" 44 """Refresh the oEmbed HTML for the given oembed object."""
44 45