initial movies app

This commit is contained in:
2026-02-28 13:04:19 -05:00
parent b1c9b88de1
commit fc715c3ced
15 changed files with 197 additions and 1 deletions

21
apps/movies/models.py Normal file
View File

@@ -0,0 +1,21 @@
from django.db import models
from django.utils import timezone
# Create your models here.
class MediaFormat(models.Model):
name = models.CharField(max_length=50)
def __str__(self):
return self.name
class Movie(models.Model):
title = models.CharField(max_length=200)
release_date = models.DateField()
media_formats = models.ManyToManyField(MediaFormat)
added_date = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.title