keymedia/managemedia/models/movies.py

21 lines
1002 B
Python

from django.db import models
from django.core import validators
from .common import VideoFields,MediaTypes
class Movies(VideoFields):
original_title = models.CharField('Original Title', max_length=256, blank=True)
tagline = models.CharField('Tagline', blank=True, max_length=256)
runtime = models.PositiveIntegerField('Total Runtime', blank=True)
rt_rating = models.PositiveIntegerField('Rotten Tomatoes Rating', blank=True)
am_rating = models.DecimalField('AllMovie Rating', max_digits=3, decimal_places=1, blank=True)
class MovieAltTitles(models.Model):
film = models.ForeignKey('Movies', on_delete=models.CASCADE)
title = models.CharField('Title', max_length=256)
country = models.CharField('Country', max_length=256)
title_type = models.CharField('Type', blank=True, max_length=256)
class MovieGenres(models.Model):
movie = models.ForeignKey('Movies', on_delete=models.CASCADE)
genre = models.ForeignKey('Genres', on_delete=models.CASCADE)