feat: added gonk and qol
This commit is contained in:
+19
-11
@@ -1,5 +1,7 @@
|
||||
from django.urls import path
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.utils.text import gettext_lazy as _
|
||||
from web.views.components import (
|
||||
cart,
|
||||
cart_dropdown,
|
||||
@@ -24,19 +26,22 @@ from web.views.web import (
|
||||
|
||||
app_name = "web"
|
||||
|
||||
urlpatterns = [
|
||||
i18n_resolvers = i18n_patterns(
|
||||
path("", index, name="index"),
|
||||
path("wishlist", login_required(wishlist, login_url="/login/"), name="wishlist"),
|
||||
path("categories/<str:slug>/", category_view, name="category_view"),
|
||||
path("products/<int:pk>/<str:slug>/", product_detail, name="product_detail"),
|
||||
path("cart/", cart_detail, name="cart_detail"),
|
||||
path("order/<str:uuid>/", order_detail, name="order"),
|
||||
path(_("wishlist"), login_required(wishlist, login_url="/login/"), name="wishlist"),
|
||||
path(_("categories/<str:slug>/"), category_view, name="category_view"),
|
||||
path(_("products/<int:pk>/<str:slug>/"), product_detail, name="product_detail"),
|
||||
path(_("cart/"), cart_detail, name="cart_detail"),
|
||||
path(_("order/<str:uuid>/"), order_detail, name="order"),
|
||||
# users
|
||||
path("login/", login, name="login"),
|
||||
path("logout/", logout, name="logout"),
|
||||
path("register/", register, name="register"),
|
||||
path("reset-password/", reset_password, name="reset-password"),
|
||||
path("my-account/", my_account, name="my_account"),
|
||||
path(_("login/"), login, name="login"),
|
||||
path(_("logout/"), logout, name="logout"),
|
||||
path(_("register/"), register, name="register"),
|
||||
path(_("reset-password/"), reset_password, name="reset-password"),
|
||||
path(_("my-account/"), my_account, name="my_account"),
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
# components
|
||||
path("web/components/products/", list_products, name="list_products"),
|
||||
path(
|
||||
@@ -63,3 +68,6 @@ urlpatterns = [
|
||||
# manifest
|
||||
path("manifest.json", manifest, name="manifest_json"),
|
||||
]
|
||||
|
||||
for resolver in i18n_resolvers:
|
||||
urlpatterns += resolver.url_patterns
|
||||
|
||||
Reference in New Issue
Block a user