Closed ManojDatt closed 4 years ago
There isn't a way at the moment to customise the Video
model.
I'm open to a merge request that would add functionality similar to images where you can specify a custom model via a setting.
You could also possibly use snippets or modeladmin in a reverse way to add extra properties to a video:
class VideoProperties(models.Model):
video = models.OneToOneField('wagtailvideos.Video', related_name='properties', on_delete=models.CASCADE)
category = models.ForeignKey("category.Category",blank=False,null=True, on_delete=models.CASCADE)
slug = models.SlugField(null=True)
access = models.CharField(verbose_name=('Access Type'), default="PUBLIC", choices=ACCESS, max_length=50, blank=True, null=True)
Then to access the properties in a template:
{{ video.properties.slug }}
Hi Thanks for your information. But I have made changes in package and make new repository on my GitHub account.
I was trying to use this package and here my requirement was to add new category field to video. But i don't find any way to add new field to model. Even i try by inheriting
AbstractVideo
model to new model but it created a separate model that has different UI.Is there any one who can help me in this ?