diff --git a/daycare/models.py b/daycare/models.py index 2678d71..d21a44e 100644 --- a/daycare/models.py +++ b/daycare/models.py @@ -50,6 +50,11 @@ def create(email, username, password, name, description, price_per_day, capacity return new_daycare + def get_daycare_primary_image(self): + if Image.get_images_by_daycare_id(self.id).exists(): + return Image.get_images_by_daycare_id(self.id).first().url + return None + class Image(models.Model): url = models.CharField(max_length=1000) diff --git a/dogowner/templates/dogowner/dog_owner_homepage.html b/dogowner/templates/dogowner/dog_owner_homepage.html new file mode 100644 index 0000000..162f837 --- /dev/null +++ b/dogowner/templates/dogowner/dog_owner_homepage.html @@ -0,0 +1,26 @@ +{% extends "main/base_template.html" %} +{% load static %} + +{% block stylesheets %} + +{% endblock %} + +{% block content %} +