Tablas hechas

This commit is contained in:
2023-02-20 05:10:30 +01:00
parent 5747cd9213
commit 0573c4e99c
15 changed files with 141 additions and 16 deletions

View File

@@ -1,3 +1,13 @@
from django.db import models
from django.contrib.auth import get_user_model
from lista.models import Lista
# Create your models here.
User = get_user_model()
class Comparte(models.Model):
usuario = models.ForeignKey(User, on_delete=models.CASCADE)
lista = models.ForeignKey(Lista, on_delete=models.CASCADE)
def __str__(self):
return f"{self.usuario} - {self.lista}"