feat: added user info form
This commit is contained in:
+13
-3
@@ -9,6 +9,7 @@ from web.views.components import (
|
||||
list_products,
|
||||
list_wishlisted_products,
|
||||
wishlist_button,
|
||||
user_info_component,
|
||||
)
|
||||
from web.views.users import (
|
||||
login,
|
||||
@@ -38,11 +39,11 @@ app_name = "web"
|
||||
|
||||
i18n_resolvers = i18n_patterns(
|
||||
path("", index, name="index"),
|
||||
path(_("wishlist"), login_required(wishlist, login_url="/login/"), name="wishlist"),
|
||||
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(_("orders/"), login_required(orders, login_url="/login/"), name="orders"),
|
||||
path(_("orders/"), login_required(orders, login_url=_("/login/")), name="orders"),
|
||||
path(_("order/<str:uuid>/"), order_detail, name="order"),
|
||||
# users
|
||||
path(_("login/"), login, name="login"),
|
||||
@@ -59,7 +60,11 @@ i18n_resolvers = i18n_patterns(
|
||||
reset_password_email_sent,
|
||||
name="reset_password_email_sent",
|
||||
),
|
||||
path(_("my-account/"), my_account, name="my_account"),
|
||||
path(
|
||||
_("my-account/"),
|
||||
login_required(my_account, login_url=_("/login/")),
|
||||
name="my_account",
|
||||
),
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
@@ -77,6 +82,11 @@ urlpatterns = [
|
||||
wishlist_button,
|
||||
name="wishlist_button",
|
||||
),
|
||||
path(
|
||||
"web/components/user-info/",
|
||||
login_required(user_info_component, login_url=_("/login/")),
|
||||
name="user_info_component",
|
||||
),
|
||||
# api
|
||||
path("web/add-cart-item/", add_cart_item, name="add_cart_item"),
|
||||
path("web/delete-cart-item/<int:pk>/", delete_cart_item, name="delete_cart_item"),
|
||||
|
||||
Reference in New Issue
Block a user