feat: ruff'ed
This commit is contained in:
+33
-67
@@ -38,86 +38,52 @@ from web.views.web import (
|
||||
wishlist,
|
||||
)
|
||||
|
||||
app_name = "web"
|
||||
app_name = 'web'
|
||||
|
||||
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(_("orders/"), login_required(orders, login_url=_("/login/")), name="orders"),
|
||||
path(_("order/<str:uuid>/"), order_detail, name="order"),
|
||||
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(_('orders/'), login_required(orders, login_url=_('/login/')), name='orders'),
|
||||
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(
|
||||
_("reset-password/<uidb64>/<token>/"),
|
||||
reset_password_confirm,
|
||||
name="reset_password_confirm",
|
||||
),
|
||||
path(
|
||||
_("reset-password/email-sent/"),
|
||||
reset_password_email_sent,
|
||||
name="reset_password_email_sent",
|
||||
),
|
||||
path(
|
||||
_("my-account/"),
|
||||
login_required(my_account, login_url=_("/login/")),
|
||||
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(_('reset-password/<uidb64>/<token>/'), reset_password_confirm, name='reset_password_confirm'),
|
||||
path(_('reset-password/email-sent/'), reset_password_email_sent, name='reset_password_email_sent'),
|
||||
path(_('my-account/'), login_required(my_account, login_url=_('/login/')), name='my_account'),
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
# components
|
||||
path("web/components/products/", list_products, name="list_products"),
|
||||
path('web/components/products/', list_products, name='list_products'),
|
||||
path('web/components/wishlist/', list_wishlisted_products, name='list_wishlisted_products'),
|
||||
path('web/components/cart-dropdown/', cart_dropdown, name='cart_dropdown'),
|
||||
path('web/components/cart/', cart, name='cart'),
|
||||
path('web/components/wishlist-button/<int:pk>/', wishlist_button, name='wishlist_button'),
|
||||
path(
|
||||
"web/components/wishlist/",
|
||||
list_wishlisted_products,
|
||||
name="list_wishlisted_products",
|
||||
),
|
||||
path("web/components/cart-dropdown/", cart_dropdown, name="cart_dropdown"),
|
||||
path("web/components/cart/", cart, name="cart"),
|
||||
path(
|
||||
"web/components/wishlist-button/<int:pk>/",
|
||||
wishlist_button,
|
||||
name="wishlist_button",
|
||||
'web/components/user-info/',
|
||||
login_required(user_info_component, login_url=_('/login/')),
|
||||
name='user_info_component',
|
||||
),
|
||||
path(
|
||||
"web/components/user-info/",
|
||||
login_required(user_info_component, login_url=_("/login/")),
|
||||
name="user_info_component",
|
||||
),
|
||||
path(
|
||||
"web/components/change-password/",
|
||||
login_required(change_password_component, login_url=_("/login/")),
|
||||
name="change_password_component",
|
||||
'web/components/change-password/',
|
||||
login_required(change_password_component, login_url=_('/login/')),
|
||||
name='change_password_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"),
|
||||
path("web/add-to-wishlist/", add_to_wishlist, name="add_to_wishlist"),
|
||||
path(
|
||||
"web/delete-from-wishlist/<int:pk>/",
|
||||
delete_from_wishlist,
|
||||
name="delete_from_wishlist",
|
||||
),
|
||||
path(
|
||||
"web/customer-address/<int:pk>/",
|
||||
update_customer_address,
|
||||
name="update_customer_address",
|
||||
),
|
||||
path(
|
||||
"web/customer-addresses/",
|
||||
list_customer_addresses_component,
|
||||
name="list_customer_addresses_component",
|
||||
),
|
||||
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'),
|
||||
path('web/add-to-wishlist/', add_to_wishlist, name='add_to_wishlist'),
|
||||
path('web/delete-from-wishlist/<int:pk>/', delete_from_wishlist, name='delete_from_wishlist'),
|
||||
path('web/customer-address/<int:pk>/', update_customer_address, name='update_customer_address'),
|
||||
path('web/customer-addresses/', list_customer_addresses_component, name='list_customer_addresses_component'),
|
||||
# manifest
|
||||
path("manifest.json", manifest, name="manifest_json"),
|
||||
path('manifest.json', manifest, name='manifest_json'),
|
||||
]
|
||||
|
||||
for resolver in i18n_resolvers:
|
||||
|
||||
Reference in New Issue
Block a user