Tablas hechas
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user