Conoce a nuestras adorables mascotas
- Cada día es una oportunidad para conocer a nuestras adorables mascotas. Cada una de ellas tiene una historia
- única y está esperando a alguien especial como tú. Nuestras mascotas son cariñosas, juguetonas y están listas
- para ser parte de tu familia. ¡Ven y descubre el amor incondicional que una mascota puede ofrecer! Recuerda,
- adoptar una mascota no solo cambia la vida de la mascota, sino también la tuya.
+ Cada día es una oportunidad para conocer a nuestras adorables mascotas. Son cariñosas, juguetonas y están listas para ser parte de tu familia. Ven y descubre el amor incondicional que una mascota puede ofrecer. Recuerda, adoptar una mascota no solo cambia la vida de la mascota, sino también la tuya. 🐾❤️
Descubre más sobre nuestras mascotas
diff --git a/pet/templates/pet/secondary_carousel.html b/pet/templates/pet/secondary_carousel.html
index 660dd76..13b5dc8 100644
--- a/pet/templates/pet/secondary_carousel.html
+++ b/pet/templates/pet/secondary_carousel.html
@@ -1,17 +1,19 @@
-
-
-
- {% for pet in pets %}
- -
-
-
-
- {{ pet.name }}
- {{ pet.age }}
-
- {% endfor %}
-
-
-
-
\ No newline at end of file
+ {% if pets %}
+
+
+
+ {% for pet in pets %}
+ -
+
+
+
+ {{ pet.name }}
+ {{ pet.age }}
+
+ {% endfor %}
+
+
+
+ {% endif %}
+
diff --git a/pet/tests.py b/pet/tests.py
index 69a89d9..be557b0 100644
--- a/pet/tests.py
+++ b/pet/tests.py
@@ -24,25 +24,25 @@ def setUp(self):
)
def test_main_page_status_code(self):
- response = self.client.get(reverse("main_page"))
+ response = self.client.get(reverse("pet:main_page"))
self.assertEqual(response.status_code, 200)
def test_main_page_template_used(self):
- response = self.client.get(reverse("main_page"))
+ response = self.client.get(reverse("pet:main_page"))
self.assertTemplateUsed(response, "pet/main_page.html")
def test_main_page_contains_correct_html(self):
- response = self.client.get(reverse("main_page"))
+ response = self.client.get(reverse("pet:main_page"))
self.assertContains(response, "¡Haz un cambio hoy!")
self.assertContains(response, "Pet1")
self.assertContains(response, "Pet2")
def test_main_page_does_not_contain_incorrect_html(self):
- response = self.client.get(reverse("main_page"))
+ response = self.client.get(reverse("pet:main_page"))
self.assertNotContains(response, "Hello, world!")
def test_main_page_context(self):
- response = self.client.get(reverse("main_page"))
+ response = self.client.get(reverse("pet:main_page"))
self.assertTrue("pets" in response.context)
self.assertTrue("headlines" in response.context)
self.assertEqual(len(response.context["pets"]), 2)
diff --git a/pet/urls.py b/pet/urls.py
index ca572c0..cbd96a3 100644
--- a/pet/urls.py
+++ b/pet/urls.py
@@ -2,6 +2,7 @@
from pet.views import main_page
+app_name = 'pet'
urlpatterns = [
path("index/", main_page, name="main_page"),
]
diff --git a/poetry.lock b/poetry.lock
index b758a2b..30e59b7 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -62,6 +62,7 @@ wrapt = [
[package.source]
type = "url"
url = "https://gitlab.com/square-wheel-team/envsqare/-/archive/prerelease-0.0.4/envsqare-prerelease-0.0.4.tar.gz"
+
[[package]]
name = "filelock"
version = "3.13.1"
@@ -234,6 +235,17 @@ platformdirs = ">=3.9.1,<5"
docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"]
test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"]
+[[package]]
+name = "whitenoise"
+version = "6.6.0"
+description = "Radically simplified static file serving for WSGI applications"
+category = "main"
+optional = false
+python-versions = ">=3.8"
+
+[package.extras]
+brotli = ["Brotli"]
+
[[package]]
name = "wrapt"
version = "1.16.0"
@@ -245,7 +257,7 @@ python-versions = ">=3.6"
[metadata]
lock-version = "1.1"
python-versions = "^3.10"
-content-hash = "0ec68b8551d12a06ac65673e6d6740163e706df3488acce30955a8481dbc2b44"
+content-hash = "7f6f1a9bb4de654aa66f51aeb64421c7658a4d26c9feb17167264a32879314be"
[metadata.files]
asgiref = [
@@ -429,6 +441,10 @@ virtualenv = [
{file = "virtualenv-20.25.0-py3-none-any.whl", hash = "sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3"},
{file = "virtualenv-20.25.0.tar.gz", hash = "sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b"},
]
+whitenoise = [
+ {file = "whitenoise-6.6.0-py3-none-any.whl", hash = "sha256:b1f9db9bf67dc183484d760b99f4080185633136a273a03f6436034a41064146"},
+ {file = "whitenoise-6.6.0.tar.gz", hash = "sha256:8998f7370973447fac1e8ef6e8ded2c5209a7b1f67c1012866dbcd09681c3251"},
+]
wrapt = [
{file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"},
{file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"},
diff --git a/pyproject.toml b/pyproject.toml
index 1eac036..7ef914d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -14,6 +14,7 @@ pytz = "^2024.1"
envsqare = {url = "https://gitlab.com/square-wheel-team/envsqare/-/archive/prerelease-0.0.4/envsqare-prerelease-0.0.4.tar.gz"}
python-dateutil = "^2.8.2"
pre-commit = "^3.6.0"
+whitenoise = "^6.6.0"
[build-system]