fix: removed stale views

This commit is contained in:
2024-11-23 20:52:46 +01:00
parent 9608e283dd
commit 1f02858477
4 changed files with 95 additions and 64 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ from django.contrib import admin
from django.urls import include, path from django.urls import include, path
urlpatterns = [ urlpatterns = [
path("", include("web.urls", namespace='web')), path("", include("web.urls", namespace="web")),
path("admin/", admin.site.urls), path("admin/", admin.site.urls),
path("api/v1/", include("config.api.v1.urls")), path("api/v1/", include("config.api.v1.urls")),
path("watchman/", include("watchman.urls")), path("watchman/", include("watchman.urls")),
+93 -14
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -305,19 +305,6 @@ msgstr "teléfono de contacto"
msgid "pedidos" msgid "pedidos"
msgstr "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 #: tpv/forms.py:7
msgid "Introduce tu e-mail" msgid "Introduce tu e-mail"
msgstr "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 #: users/forms/login.py:18
msgid "Password" msgid "Password"
msgstr "Contraseña" 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"
-48
View File
@@ -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()
+1 -1
View File
@@ -1,6 +1,6 @@
from django.urls import path 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" app_name = "web"