incuna/incuna-videos — pull request #16 by meshy (2014-05-29 11:36:14+00:00)
Title: Add video captions (sub-titles) extension

Add an extension.

```
class Extension(extensions.Extension):
def handle_model(self):
self.model.add_to_class(
'captions',
models.FileField(upload_to='videos/captions/', null=True, blank=True, help_text=_('Caption (sub title) file.')))

def handle_modeladmin(self, modeladmin):
modeladmin.add_extension_options('caption')
```

The captions would be rendered within the `` tag as a `` tag with a `src` attribute that points to the captions file: ``