from django.db import models from gauth.models import Location class YelpLocation(models.Model): location = models.OneToOneField(Location, on_delete=models.CASCADE) url = models.URLField() def __str__(self): return self.location.care_name class YelpReview(models.Model): reviewer_name = models.CharField(max_length=255) profile = models.URLField() rating = models.IntegerField() date_posted = models.DateField() comment = models.TextField() location = models.ForeignKey(YelpLocation, on_delete=models.CASCADE) def __str__(self): return self.reviewer_name