Model for favorite system

This commit is contained in:
reverend 2020-12-24 14:48:11 +01:00
parent 4bacd1a28d
commit abca946883

View File

@ -14,6 +14,7 @@ from django.db.models.signals import post_save
from django.dispatch import receiver
from lostplaces.models.abstract_models import Expireable
from lostplaces.models.place import Place
class Explorer(models.Model):
"""
@ -27,6 +28,8 @@ class Explorer(models.Model):
related_name='explorer'
)
favorite_places = models.ManyToManyField(Place, related_name='favorite_places', verbose_name='Explorers favorite places')
def __str__(self):
return self.user.username