From 4bf62d4645d85cab2c0f472e0bade761aceebc14 Mon Sep 17 00:00:00 2001 From: Danny Martinez Date: Fri, 12 Jun 2020 11:17:30 -0400 Subject: [PATCH] continuing to fix things up --- keymedia/__pycache__/settings.cpython-37.pyc | Bin 2317 -> 2349 bytes keymedia/settings.py | 1 + managemedia/models/.__init__.py.swp | Bin 0 -> 1024 bytes managemedia/models/books.py | 8 ++++---- managemedia/models/common.py | 2 +- managemedia/models/tv.py | 6 +++--- managemedia/models/vgames.py | 12 ++++++------ 7 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 managemedia/models/.__init__.py.swp diff --git a/keymedia/__pycache__/settings.cpython-37.pyc b/keymedia/__pycache__/settings.cpython-37.pyc index ab8611b85a673d0b65cf33021cb46a29c767387b..c644ff7d725f7ec278aae399d60ea99c307d049d 100644 GIT binary patch delta 227 zcmeAbS}Vls#LLUY00etyK91Wlkyn!O+C+8d`V{VT_9(6to)q2`z7+lxffT_MA)p9% zif|N9ibyJB7SjUWRJIh+g-q#;DJ&^sDdH&-DUvBt=`5LyDbjOT(ix-pQe>j|Q)E-* zQsjY9Aw@AoDMfh>TP9OG86R@3kr($919AZ^YhX&(>LcbIk7Ru NOy0mDIr%t;8vu(PJG}q^ delta 198 zcmW-XxedZV6b1cPD}%s`!3G<1-)9vZ9gzKi=%JMfXn_VGKuAOmpa3EopaLRtV!B|( z8_h)T?j1cfS1MzfJ;i5zIjM-=r{Q9+ZO$MI2MRg3$fKZBoQ1~@{0(izRc&k(Z$c9! zN(d05j7ZCvP)VdF&Y{XKYN(@OXrhHSI*A<<=g~#a{JQA>JNS1Pla^e-h&_xs^dY%u dEExk#ID}YPC#~^7Bhj1aWXOvorHjaw;=%NW+EW<1_OzOXB183M%1Z Oqm0oI7!84e3jqM-q76d; literal 0 HcmV?d00001 diff --git a/managemedia/models/books.py b/managemedia/models/books.py index 1a49a15..6a6fd3d 100644 --- a/managemedia/models/books.py +++ b/managemedia/models/books.py @@ -1,16 +1,16 @@ from django.db import models - -class Book(CommonMediaFields) +from .common import CommonMediaFields +class Book(CommonMediaFields): author = models.ForeignKey('Author') series = models.ForeignKey('Series', blank=True) series_entry = models.BooleanField('Series Entry', blank=True) is_comic = models.BooleanField('Comic') is_manga = models.BooleanField('Manga') -class Author(models.Model) +class Author(models.Model): name = models.CharFields('Author', unique=True) sort_name = models.CharFields('Author sort name', blank=True) -class Series(models.Model) +class Series(models.Model): name = models.CharFields('Series', unique=True) total_entries = models.PositiveIntegerField('Total Entries', blank=True) diff --git a/managemedia/models/common.py b/managemedia/models/common.py index 54300fe..de4e54b 100644 --- a/managemedia/models/common.py +++ b/managemedia/models/common.py @@ -26,7 +26,7 @@ class CommonMediaFields(models.Model): abstract = True ### VideoFields is for movies and tv shows -class VideoFields(CommonFields): +class VideoFields(CommonMediaFields): tmdb_id = models.PositiveIntegerField('TheMovieDB ID', blank=True) imdb_id = models.PositiveIntegerField('IMDB ID', blank=True) tmdb_rating = models.PositiveIntegerField('TheMovieDB rating', max_value=100, blank=True) diff --git a/managemedia/models/tv.py b/managemedia/models/tv.py index 77f629a..d66398b 100644 --- a/managemedia/models/tv.py +++ b/managemedia/models/tv.py @@ -1,6 +1,6 @@ from django.db import models -class Television(VideoFields) +class Television(VideoFields): episodes = models.PositiveIntegerField('Number of Episodes', min_value=1, blank=True) seasons = models.PositiveIntegerField('Number of Seasons', min_value=1, blank=True) first_aired = models.DateField('First Aired Date', blank=True) @@ -8,9 +8,9 @@ class Television(VideoFields) networks = models.ForeignKey('Networks', blank=True) status = models.CharField('Status', blank=True) -class Networks(models.Model) +class Networks(models.Model): name = models.CharField('Network') -class ShowtoNetworks(models.Model) +class ShowtoNetworks(models.Model): show = models.ForeignKey('Television') network = models.ForeignKey('Networks') diff --git a/managemedia/models/vgames.py b/managemedia/models/vgames.py index 0bd757f..9a134f1 100644 --- a/managemedia/models/vgames.py +++ b/managemedia/models/vgames.py @@ -1,6 +1,6 @@ from django.db import models -class VGames(CommonMediaFields) +class VGames(CommonMediaFields): tgdb_id = models.PositiveIntegerField('TheGamesDB ID') platform = models.ForeignKey('Platform') cover = models.ImageField('Cover Image', blank=True) @@ -8,19 +8,19 @@ class VGames(CommonMediaFields) coop = models.BooleanField('Co-Op', blank=True) mc_rating = models.PositiveIntegerFrield('MetaCritic Rating', max_value=100, blank=True) -class Publishers(models.Model) +class Publishers(models.Model): name = models.CharField('Publisher Name') -class Developers(models.Model) +class Developers(models.Model): name = models.CharField('Developer Name') -class Platforms(models.Model) +class Platforms(models.Model): name = models.CharField('Game System') -class PublisherMap(models.Model) +class PublisherMap(models.Model): publisher = models.ForeignKey('Publishers') game = models.ForeignKey('VGames') -class DeveloperMap(models.Model) +class DeveloperMap(models.Model): developer = models.ForeignKey('Developers') game = models.ForeignKey('VGames')