Mercurial > public > sg101
diff gpp/oembed/views.py @ 361:6d6fdc58487c
Changes to oembed to support vimeo.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 05 Mar 2011 03:23:29 +0000 |
parents | 47a7138fcccb |
children |
line wrap: on
line diff
--- a/gpp/oembed/views.py Sat Mar 05 02:30:53 2011 +0000 +++ b/gpp/oembed/views.py Sat Mar 05 03:23:29 2011 +0000 @@ -8,6 +8,7 @@ from django.http import HttpResponseBadRequest from django.http import HttpResponseForbidden import django.utils.simplejson as json +from django.conf import settings from oembed.models import Provider from oembed.models import Oembed @@ -41,7 +42,10 @@ for provider in providers: if re.match(provider.url_regex, url): try: - data = get_oembed(provider.api_endpoint, url) + data = get_oembed(provider.api_endpoint, + url, + maxwidth=settings.OEMBED_MAXWIDTH, + maxheight=settings.OEMBED_MAXHEIGHT) except IOError, e: return HttpResponseBadRequest( "Sorry, we could not retrieve your video (%s)" % e)