From 1f028584771299224034cdf7eecdb992bde09072 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Sat, 23 Nov 2024 20:52:46 +0100 Subject: [PATCH] fix: removed stale views --- config/urls.py | 2 +- locale/es_ES/LC_MESSAGES/django.po | 107 +++++++++++++++++++++++++---- shop/views.py | 48 ------------- web/urls.py | 2 +- 4 files changed, 95 insertions(+), 64 deletions(-) diff --git a/config/urls.py b/config/urls.py index f388713..540c741 100644 --- a/config/urls.py +++ b/config/urls.py @@ -5,7 +5,7 @@ from django.contrib import admin from django.urls import include, path urlpatterns = [ - path("", include("web.urls", namespace='web')), + path("", include("web.urls", namespace="web")), path("admin/", admin.site.urls), path("api/v1/", include("config.api.v1.urls")), path("watchman/", include("watchman.urls")), diff --git a/locale/es_ES/LC_MESSAGES/django.po b/locale/es_ES/LC_MESSAGES/django.po index cba2abf..796410d 100644 --- a/locale/es_ES/LC_MESSAGES/django.po +++ b/locale/es_ES/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-23 13:00+0100\n" +"POT-Creation-Date: 2024-11-23 20:47+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -305,19 +305,6 @@ msgstr "teléfono de contacto" msgid "pedidos" msgstr "pedidos" -#: shop/templates/components/product_card.html:85 -#: shop/templates/shop/product_detail.html:161 -msgid "Añadir al carrito" -msgstr "Añadir al carrito" - -#: shop/templates/shop/index.html:28 -msgid "Mostrar mas" -msgstr "Mostrar mas" - -#: shop/templates/shop/product_detail.html:134 -msgid "Añadir a lista de deseados" -msgstr "Añadir a lista de deseados" - #: tpv/forms.py:7 msgid "Introduce tu e-mail" msgstr "Introduce tu e-mail" @@ -542,3 +529,95 @@ msgstr "No se ha realizado el pago. Motivo: {reason}" #: users/forms/login.py:18 msgid "Password" msgstr "Contraseña" + +#: web/templates/components/cart/cart_dropdown.html:34 +#, fuzzy +#| msgid "Cantidad a pagar" +msgid "Ir a pagar" +msgstr "Cantidad a pagar" + +#: web/templates/components/generic/navbar.html:20 +#: web/templates/components/generic/navbar.html:122 +msgid "Inicio" +msgstr "Inicio" + +#: web/templates/components/generic/navbar.html:26 +#: web/templates/components/generic/navbar.html:125 +#, fuzzy +#| msgid "pedidos" +msgid "Más vendidos" +msgstr "Más vendidos" + +#: web/templates/components/generic/navbar.html:32 +#: web/templates/components/generic/navbar.html:128 +msgid "Ideas de regalo" +msgstr "Ideas de regalo" + +#: web/templates/components/generic/navbar.html:38 +#: web/templates/components/generic/navbar.html:137 +msgid "Ofertas del día" +msgstr "Ofertas del día" + +#: web/templates/components/generic/navbar.html:54 +#: web/templates/components/generic/navbar.html:61 +msgid "Carrito" +msgstr "Carrito" + +#: web/templates/components/generic/navbar.html:86 +#: web/templates/components/users/user_dropdown.html:6 +msgid "Mi cuenta" +msgstr "Mi cuenta" + +#: web/templates/components/generic/navbar.html:131 +msgid "Juegos" +msgstr "Juegos" + +#: web/templates/components/generic/navbar.html:134 +msgid "Electrónica" +msgstr "Electrónica" + +#: web/templates/components/product_card.html:65 +#: web/templates/web/product_detail.html:163 +msgid "Añadir al carrito" +msgstr "Añadir al carrito" + +#: web/templates/components/products/list_filters.html:14 +#: web/templates/components/products/list_filters.html:28 +msgid "Buscar" +msgstr "Buscar" + +#: web/templates/components/users/user_dropdown.html:12 +#, fuzzy +#| msgid "pedidos" +msgid "Mis pedidos" +msgstr "Mis pedidos" + +#: web/templates/components/users/user_dropdown.html:18 +msgid "Ajustes" +msgstr "Ajustes" + +#: web/templates/components/users/user_dropdown.html:24 +#, fuzzy +#| msgid "Añadir a lista de deseados" +msgid "Lista de deseados" +msgstr "Lista de deseados" + +#: web/templates/components/users/user_dropdown.html:30 +msgid "Direcciones de envío" +msgstr "Direcciones de envío" + +#: web/templates/components/users/user_dropdown.html:36 +msgid "Métodos de pago" +msgstr "Métodos de pago" + +#: web/templates/components/users/user_dropdown.html:44 +msgid "Cerrar sesión" +msgstr "Cerrar sesión" + +#: web/templates/web/index.html:29 +msgid "Mostrar mas" +msgstr "Mostrar mas" + +#: web/templates/web/product_detail.html:136 +msgid "Añadir a lista de deseados" +msgstr "Añadir a lista de deseados" diff --git a/shop/views.py b/shop/views.py index 344461b..e69de29 100644 --- a/shop/views.py +++ b/shop/views.py @@ -1,48 +0,0 @@ -from django.shortcuts import get_object_or_404 -from django.views.generic import TemplateView - -from shop.filters import ProductFilter -from shop.mixins import FilteredQuerysetMixin, PaginatedQuerysetMixin -from shop.models import Product - - -class IndexView(TemplateView): - template_name = "web/index.html" - - def get_context_data(self, **kwargs): - return { - "title": "Shoppy", - } - - -class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin): - template_name = "web/list_products.html" - queryset = Product.objects.all() - filter_class = ProductFilter - - def get_context_data(self, **kwargs): - qs = self.get_queryset() - products = self.get_paginated_queryset(qs) - - return { - "products": products, - } - - -class ProductDetail(TemplateView): - template_name = "web/product_detail.html" - - def get_context_data(self, pk, slug, **kwargs): - product = get_object_or_404(Product, pk=pk) - - return { - "product": product, - "title": product.name, - "description": product.description, - "image": product.images.first(), - } - - -index = IndexView.as_view() -list_products = ListProducts.as_view() -product_detail = ProductDetail.as_view() diff --git a/web/urls.py b/web/urls.py index d7610ae..3a6d49c 100644 --- a/web/urls.py +++ b/web/urls.py @@ -1,6 +1,6 @@ from django.urls import path -from shop.views import index, list_products, product_detail +from web.views import index, list_products, product_detail app_name = "web"