Mercurial > public > sg101
comparison oembed/models.py @ 1154:4da4e32b314c
Do not restrict oEmbed support to just video.
This will allow us to embed stuff from SoundClound and ReverbNation.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 27 Dec 2016 10:21:37 -0600 |
parents | d3f6e9cb1f39 |
children |
comparison
equal
deleted
inserted
replaced
1153:be34f981596e | 1154:4da4e32b314c |
---|---|
35 (PHOTO, "photo"), | 35 (PHOTO, "photo"), |
36 (VIDEO, "video"), | 36 (VIDEO, "video"), |
37 (LINK, "link"), | 37 (LINK, "link"), |
38 (RICH, "rich"), | 38 (RICH, "rich"), |
39 ) | 39 ) |
40 ALLOWED_TYPES = set(choice[1] for choice in MEDIA_TYPE_CHOICES) | |
41 MEDIA_TYPE_REVERSE = {choice[1]: choice[0] for choice in MEDIA_TYPE_CHOICES} | |
40 | 42 |
41 url = models.URLField(max_length=255, db_index=True) | 43 url = models.URLField(max_length=255, db_index=True) |
42 type = models.IntegerField(choices=MEDIA_TYPE_CHOICES) | 44 type = models.IntegerField(choices=MEDIA_TYPE_CHOICES) |
43 title = models.CharField(max_length=255, blank=True, default='') | 45 title = models.CharField(max_length=255, blank=True, default='') |
44 width = models.IntegerField() | 46 width = models.IntegerField() |