continuing to fix things up

master
Daniel Martinez 2020-06-12 11:17:30 -04:00
parent 5a98c4dd9a
commit 4bf62d4645
7 changed files with 15 additions and 14 deletions

View File

@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
'managemedia.apps.AppConfig',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',

Binary file not shown.

View File

@ -1,16 +1,16 @@
from django.db import models from django.db import models
from .common import CommonMediaFields
class Book(CommonMediaFields) class Book(CommonMediaFields):
author = models.ForeignKey('Author') author = models.ForeignKey('Author')
series = models.ForeignKey('Series', blank=True) series = models.ForeignKey('Series', blank=True)
series_entry = models.BooleanField('Series Entry', blank=True) series_entry = models.BooleanField('Series Entry', blank=True)
is_comic = models.BooleanField('Comic') is_comic = models.BooleanField('Comic')
is_manga = models.BooleanField('Manga') is_manga = models.BooleanField('Manga')
class Author(models.Model) class Author(models.Model):
name = models.CharFields('Author', unique=True) name = models.CharFields('Author', unique=True)
sort_name = models.CharFields('Author sort name', blank=True) sort_name = models.CharFields('Author sort name', blank=True)
class Series(models.Model) class Series(models.Model):
name = models.CharFields('Series', unique=True) name = models.CharFields('Series', unique=True)
total_entries = models.PositiveIntegerField('Total Entries', blank=True) total_entries = models.PositiveIntegerField('Total Entries', blank=True)

View File

@ -26,7 +26,7 @@ class CommonMediaFields(models.Model):
abstract = True abstract = True
### VideoFields is for movies and tv shows ### VideoFields is for movies and tv shows
class VideoFields(CommonFields): class VideoFields(CommonMediaFields):
tmdb_id = models.PositiveIntegerField('TheMovieDB ID', blank=True) tmdb_id = models.PositiveIntegerField('TheMovieDB ID', blank=True)
imdb_id = models.PositiveIntegerField('IMDB ID', blank=True) imdb_id = models.PositiveIntegerField('IMDB ID', blank=True)
tmdb_rating = models.PositiveIntegerField('TheMovieDB rating', max_value=100, blank=True) tmdb_rating = models.PositiveIntegerField('TheMovieDB rating', max_value=100, blank=True)

View File

@ -1,6 +1,6 @@
from django.db import models from django.db import models
class Television(VideoFields) class Television(VideoFields):
episodes = models.PositiveIntegerField('Number of Episodes', min_value=1, blank=True) episodes = models.PositiveIntegerField('Number of Episodes', min_value=1, blank=True)
seasons = models.PositiveIntegerField('Number of Seasons', 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) first_aired = models.DateField('First Aired Date', blank=True)
@ -8,9 +8,9 @@ class Television(VideoFields)
networks = models.ForeignKey('Networks', blank=True) networks = models.ForeignKey('Networks', blank=True)
status = models.CharField('Status', blank=True) status = models.CharField('Status', blank=True)
class Networks(models.Model) class Networks(models.Model):
name = models.CharField('Network') name = models.CharField('Network')
class ShowtoNetworks(models.Model) class ShowtoNetworks(models.Model):
show = models.ForeignKey('Television') show = models.ForeignKey('Television')
network = models.ForeignKey('Networks') network = models.ForeignKey('Networks')

View File

@ -1,6 +1,6 @@
from django.db import models from django.db import models
class VGames(CommonMediaFields) class VGames(CommonMediaFields):
tgdb_id = models.PositiveIntegerField('TheGamesDB ID') tgdb_id = models.PositiveIntegerField('TheGamesDB ID')
platform = models.ForeignKey('Platform') platform = models.ForeignKey('Platform')
cover = models.ImageField('Cover Image', blank=True) cover = models.ImageField('Cover Image', blank=True)
@ -8,19 +8,19 @@ class VGames(CommonMediaFields)
coop = models.BooleanField('Co-Op', blank=True) coop = models.BooleanField('Co-Op', blank=True)
mc_rating = models.PositiveIntegerFrield('MetaCritic Rating', max_value=100, 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') name = models.CharField('Publisher Name')
class Developers(models.Model) class Developers(models.Model):
name = models.CharField('Developer Name') name = models.CharField('Developer Name')
class Platforms(models.Model) class Platforms(models.Model):
name = models.CharField('Game System') name = models.CharField('Game System')
class PublisherMap(models.Model) class PublisherMap(models.Model):
publisher = models.ForeignKey('Publishers') publisher = models.ForeignKey('Publishers')
game = models.ForeignKey('VGames') game = models.ForeignKey('VGames')
class DeveloperMap(models.Model) class DeveloperMap(models.Model):
developer = models.ForeignKey('Developers') developer = models.ForeignKey('Developers')
game = models.ForeignKey('VGames') game = models.ForeignKey('VGames')