Compare commits
21 Commits
b154a578c3
...
27c06fe0b5
| Author | SHA1 | Date | |
|---|---|---|---|
| 27c06fe0b5 | |||
| 69da8d81e7 | |||
| 4011f96ca6 | |||
| f736597b8c | |||
| 58127de1a7 | |||
| 03399077d0 | |||
| 1b872f1905 | |||
| 769915b962 | |||
| a5562623c1 | |||
| 5da73a9408 | |||
| 3337503473 | |||
| cd40105bbb | |||
| ccd65d87a7 | |||
| 23abe3f832 | |||
| 362a636f5f | |||
| b0edc7a1f3 | |||
| 82376b0aed | |||
| 465e71e83d | |||
| 6b194623c8 | |||
| f4ec7aab13 | |||
| 44bf6df686 |
@@ -0,0 +1,49 @@
|
|||||||
|
name: Build Docker Image (No Push)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore:
|
||||||
|
- development
|
||||||
|
- latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout del código
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
- name: Configurar Python
|
||||||
|
uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: '3.14'
|
||||||
|
- name: Instalar dependencias
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r requirements.txt
|
||||||
|
- name: Ejecutar tests
|
||||||
|
env:
|
||||||
|
DJANGO_SETTINGS_MODULE: proyecto.settings
|
||||||
|
run: |
|
||||||
|
python manage.py test
|
||||||
|
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: test
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout del código
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Configurar Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
|
- name: Build (sin push)
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: false
|
||||||
@@ -3,7 +3,8 @@ name: Build and Push Docker Image
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '**' # Esto aplica para cualquier rama
|
- development
|
||||||
|
- latest
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
@@ -3,5 +3,7 @@ db.sqlite3
|
|||||||
.venv
|
.venv
|
||||||
.env
|
.env
|
||||||
logs/
|
logs/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
tienda/__pycache__/
|
tienda/__pycache__/
|
||||||
proyecto/__pycache__/
|
proyecto/__pycache__/
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2,8 +2,11 @@
|
|||||||
{% load vat_filters %}
|
{% load vat_filters %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row mt-2">
|
<div class="row mt-2">
|
||||||
<div class="col-md-2 d-none d-lg-block">
|
<div class="col-12 d-lg-none mb-3">
|
||||||
<h5 class="categorias-titulo">Categorias</h5>
|
<button class="btn btn-outline-secondary" type="button" data-bs-toggle="collapse" data-bs-target="#mobileCategoriasCollapse" aria-expanded="false" aria-controls="mobileCategoriasCollapse">
|
||||||
|
Categorías
|
||||||
|
</button>
|
||||||
|
<div class="collapse mt-2" id="mobileCategoriasCollapse">
|
||||||
<ul class="list-group categorias-lista">
|
<ul class="list-group categorias-lista">
|
||||||
{% if categories %}
|
{% if categories %}
|
||||||
{% for category in categories %}
|
{% for category in categories %}
|
||||||
@@ -14,7 +17,20 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-md-10 grid">
|
</div>
|
||||||
|
<div class="col-lg-2 d-none d-lg-block">
|
||||||
|
<h5 class="categorias-titulo">Categorías</h5>
|
||||||
|
<ul class="list-group categorias-lista">
|
||||||
|
{% if categories %}
|
||||||
|
{% for category in categories %}
|
||||||
|
<li class="list-group-item categoria-item">
|
||||||
|
<a href="{% url 'categoria' category.id %}">{{ category.name }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-lg-10 grid">
|
||||||
{% if products %}
|
{% if products %}
|
||||||
{% for producto in products %}
|
{% for producto in products %}
|
||||||
<div class="card card-producto mt-5" style="width: 18rem;">
|
<div class="card card-producto mt-5" style="width: 18rem;">
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1358,6 +1358,14 @@ class EndpointViewTests(TestCase):
|
|||||||
response = self.client.get(url)
|
response = self.client.get(url)
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
|
def test_index_shows_mobile_categories_toggle(self):
|
||||||
|
response = self.client.get(reverse("index"))
|
||||||
|
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertContains(response, 'data-bs-target="#mobileCategoriasCollapse"')
|
||||||
|
self.assertContains(response, 'id="mobileCategoriasCollapse"')
|
||||||
|
self.assertContains(response, "Categorías")
|
||||||
|
|
||||||
def test_home_header_renders_mobile_title_outside_collapsible_menu(self):
|
def test_home_header_renders_mobile_title_outside_collapsible_menu(self):
|
||||||
response = self.client.get(reverse("home"))
|
response = self.client.get(reverse("home"))
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|||||||
Reference in New Issue
Block a user