keymedia/managemedia/models/movies.py

20 lines
856 B
Python

class Film(VideoFields):
original_title = models.CharField('Original Title', maxlength=256)
tagline = modelx.CharField('Tagline')
runtime = models.PositiveIntegerField('Total Runtime')
cover = models.ImageField('Cover Image')
backdrop = models.ImageField('Backdrop Image')
rt_rating = models.PositiveIntegerField('Rotten Tomatoes Rating', max_value=100)
am_rating = models.DecimalField('AllMovie Rating', max_digits=3, decimal_places=1)
class FilmAltTitles(models.Model):
film = models.ForeignKey('Film', on_delete=models.CASCADE)
title = models.CharField('Title')
country = models.CharField('Country')
type = models.CharField('Type')
class FilmGenres(models.Model):
film = models.ForeignKey('Film', on_delete=models.CASCADE)
genre = models.ForeignKey('Genres', on_delete=models.CASCADE)