Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Unify 'detail' to 'details

Pacu2faa96637ca38
diff --git a/saleor/dashboard/category/urls.py b/saleor/dashboard/category/urls.py
index 189d6f04be..a1baf829c6 100644
--- a/saleor/dashboard/category/urls.py
+++ b/saleor/dashboard/category/urls.py
@@ -6,7 +6,7 @@ urlpatterns = [
url(r'^$',
views.category_list, name='category-list'),
url(r'^(?P<pk>[0-9]+)/$',
- views.category_detail, name='category-detail'),
+ views.category_details, name='category-details'),
url(r'^add/$',
views.category_create, name='category-add'),
url(r'^(?P<root_pk>[0-9]+)/add/$',
diff --git a/saleor/dashboard/category/views.py b/saleor/dashboard/category/views.py
index 84244d9855..55b2da1f64 100644
--- a/saleor/dashboard/category/views.py
+++ b/saleor/dashboard/category/views.py
@@ -45,7 +45,7 @@ def category_create(request, root_pk=None):
pgettext_lazy(
'Dashboard message', 'Added category %s') % category)
if root_pk:
- return redirect('dashboard:category-detail', pk=root_pk)
+ return redirect('dashboard:category-details', pk=root_pk)
return redirect('dashboard:category-list')
ctx = {'category': category, 'form': form, 'path': path}
return TemplateResponse(request, 'dashboard/category/form.html', ctx)
@@ -70,7 +70,7 @@ def category_edit(request, root_pk=None):
pgettext_lazy(
'Dashboard message', 'Updated category %s') % category)
if root_pk:
- return redirect('dashboard:category-detail', pk=root_pk)
+ return redirect('dashboard:category-details', pk=root_pk)
return redirect('dashboard:category-list')
elif form.errors:
status = 400
@@ -81,7 +81,7 @@ def category_edit(request, root_pk=None):
@staff_member_required
@permission_required('product.view_category')
-def category_detail(request, pk):
+def category_details(request, pk):
root = get_object_or_404(Category, pk=pk)
path = root.get_ancestors(include_self=True) if root else []
categories = root.get_children().order_by('name')
@@ -111,9 +111,9 @@ def category_delete(request, pk):
if root_pk:
if request.is_ajax():
response = {'redirectUrl': reverse(
- 'dashboard:category-detail', kwargs={'pk': root_pk})}
+ 'dashboard:category-details', kwargs={'pk': root_pk})}
return JsonResponse(response)
- return redirect('dashboard:category-detail', pk=root_pk)
+ return redirect('dashboard:category-details', pk=root_pk)
else:
if request.is_ajax():
response = {'redirectUrl': reverse('dashboard:category-list')}
diff --git a/saleor/dashboard/menu/urls.py b/saleor/dashboard/menu/urls.py
index 7e3b136378..2168fd6f69 100644
--- a/saleor/dashboard/menu/urls.py
+++ b/saleor/dashboard/menu/urls.py
@@ -12,7 +12,7 @@ urlpatterns = [
url(r'^(?P<pk>[0-9]+)/delete/$',
views.menu_delete, name='menu-delete'),
url(r'^(?P<pk>[0-9]+)/$',
- views.menu_detail, name='menu-detail'),
+ views.menu_details, name='menu-details'),
url(r'^(?P<menu_pk>[0-9]+)/add/$',
views.menu_item_create, name='menu-item-add'),
@@ -23,7 +23,7 @@ urlpatterns = [
url(r'^(?P<menu_pk>[0-9]+)/item/(?P<item_pk>[0-9]+)/delete/$',
views.menu_item_delete, name='menu-item-delete'),
url(r'^(?P<menu_pk>[0-9]+)/item/(?P<item_pk>[0-9]+)/$',
- views.menu_item_detail, name='menu-item-detail'),
+ views.menu_item_details, name='menu-item-details'),
url(r'^(?P<menu_pk>[0-9]+)/items/reorder/$',
views.ajax_reorder_menu_items, name='menu-items-reorder'),
diff --git a/saleor/dashboard/menu/views.py b/saleor/dashboard/menu/views.py
index 7d82b64dde..e9706d0ddf 100644
--- a/saleor/dashboard/menu/views.py
+++ b/saleor/dashboard/menu/views.py
@@ -71,7 +71,7 @@ def menu_edit(request, pk):
menu = form.save()
msg = pgettext_lazy('Dashboard message', 'Updated menu %s') % (menu,)
messages.success(request, msg)
- return redirect('dashboard:menu-detail', pk=menu.pk)
+ return redirect('dashboard:menu-details', pk=menu.pk)
ctx = {'form': form, 'menu': menu}
template = 'dashboard/menu/form.html'
return TemplateResponse(request, template, ctx)
@@ -79,7 +79,7 @@ def menu_edit(request, pk):
@staff_member_required
@permission_required('menu.view_menu')
-def menu_detail(request, pk):
+def menu_details(request, pk):
menu = get_object_or_404(Menu, pk=pk)
menu_items = menu.items.filter(parent=None).prefetch_related(
'category', 'collection', 'page')
@@ -127,8 +127,8 @@ def menu_item_create(request, menu_pk, root_pk=None):
messages.success(request, msg)
if root_pk:
return redirect(
- 'dashboard:menu-item-detail', menu_pk=menu.pk, item_pk=root_pk)
- return redirect('dashboard:menu-detail', pk=menu.pk)
+ 'dashboard:menu-item-details', menu_pk=menu.pk, item_pk=root_pk)
+ return redirect('dashboard:menu-details', pk=menu.pk)
ctx = {
'form': form, 'menu': menu, 'menu_item': menu_item, 'path': path}
return TemplateResponse(request, 'dashboard/menu/item/form.html', ctx)
@@ -147,7 +147,7 @@ def menu_item_edit(request, menu_pk, item_pk):
'Dashboard message', 'Saved menu item %s') % (menu_item,)
messages.success(request, msg)
return redirect(
- 'dashboard:menu-item-detail', menu_pk=menu.pk, item_pk=item_pk)
+ 'dashboard:menu-item-details', menu_pk=menu.pk, item_pk=item_pk)
ctx = {
'form': form, 'menu': menu, 'menu_item': menu_item, 'path': path}
return TemplateResponse(request, 'dashboard/menu/item/form.html', ctx)
@@ -166,11 +166,11 @@ def menu_item_delete(request, menu_pk, item_pk):
root_pk = menu_item.parent.pk if menu_item.parent else None
if root_pk:
redirect_url = reverse(
- 'dashboard:menu-item-detail', kwargs={
+ 'dashboard:menu-item-details', kwargs={
'menu_pk': menu_item.menu.pk, 'item_pk': root_pk})
else:
redirect_url = reverse(
- 'dashboard:menu-detail', kwargs={'pk': menu.pk})
+ 'dashboard:menu-details', kwargs={'pk': menu.pk})
return (
JsonResponse({'redirectUrl': redirect_url}) if request.is_ajax()
else redirect(redirect_url))
@@ -183,7 +183,7 @@ def menu_item_delete(request, menu_pk, item_pk):
@staff_member_required
@permission_required('menu.view_menu')
-def menu_item_detail(request, menu_pk, item_pk):
+def menu_item_details(request, menu_pk, item_pk):
menu = get_object_or_404(Menu, pk=menu_pk)
menu_item = get_object_or_404(menu.items.all(), pk=item_pk)
path = menu_item.get_ancestors(include_self=True)
diff --git a/saleor/dashboard/page/urls.py b/saleor/dashboard/page/urls.py
index d6378a2b2c..721cf7ed69 100644
--- a/saleor/dashboard/page/urls.py
+++ b/saleor/dashboard/page/urls.py
@@ -5,6 +5,6 @@ from . import views
urlpatterns = [
url(r'^$', views.page_list, name='page-list'),
url(r'^add/$', views.page_add, name='page-add'),
- url(r'^(?P<pk>[0-9]+)/$', views.page_detail, name='page-detail'),
+ url(r'^(?P<pk>[0-9]+)/$', views.page_details, name='page-details'),
url(r'^(?P<pk>[0-9]+)/update/$', views.page_update, name='page-update'),
url(r'^(?P<pk>[0-9]+)/delete/$', views.page_delete, name='page-delete')]
diff --git a/saleor/dashboard/page/views.py b/saleor/dashboard/page/views.py
index 97eb280817..11f9e20361 100644
--- a/saleor/dashboard/page/views.py
+++ b/saleor/dashboard/page/views.py
@@ -46,7 +46,7 @@ def _page_edit(request, page):
form.save()
msg = pgettext_lazy('Dashboard message', 'Saved page')
messages.success(request, msg)
- return redirect('dashboard:page-detail', pk=page.pk)
+ return redirect('dashboard:page-details', pk=page.pk)
ctx = {
'page': page, 'form': form}
return TemplateResponse(request, 'dashboard/page/form.html', ctx)
@@ -68,7 +68,7 @@ def page_delete(request, pk):
@staff_member_required
@permission_required('page.view_page')
-def page_detail(request, pk):
+def page_details(request, pk):
page = get_object_or_404(Page, pk=pk)
ctx = {'page': page}
return TemplateResponse(request, 'dashboard/page/detail.html', ctx)
diff --git a/saleor/dashboard/product/urls.py b/saleor/dashboard/product/urls.py
index 61830bde14..48c09ecff9 100644
--- a/saleor/dashboard/product/urls.py
+++ b/saleor/dashboard/product/urls.py
@@ -6,7 +6,7 @@ urlpatterns = [
url(r'^$',
views.product_list, name='product-list'),
url(r'^(?P<pk>[0-9]+)/$',
- views.product_detail, name='product-detail'),
+ views.product_details, name='product-details'),
url(r'^(?P<pk>[0-9]+)/publish/$', views.product_toggle_is_published,
name='product-publish'),
url(r'^(?P<pk>[0-9]+)/update/$',
@@ -57,7 +57,7 @@ urlpatterns = [
url(r'attributes/$',
views.attribute_list, name='product-attributes'),
url(r'attributes/(?P<pk>[0-9]+)/$',
- views.attribute_detail, name='product-attribute-detail'),
+ views.attribute_details, name='product-attribute-details'),
url(r'attributes/add/$',
views.attribute_add, name='product-attribute-add'),
url(r'attributes/(?P<pk>[0-9]+)/update/$',
diff --git a/saleor/dashboard/product/views.py b/saleor/dashboard/product/views.py
index 462925e5ac..bacb2579d5 100644
--- a/saleor/dashboard/product/views.py
+++ b/saleor/dashboard/product/views.py
@@ -166,7 +166,7 @@ def product_create(request, type_pk):
msg = pgettext_lazy(
'Dashboard message', 'Added product %s') % (product,)
messages.success(request, msg)
- return redirect('dashboard:product-detail', pk=product.pk)
+ return redirect('dashboard:product-details', pk=product.pk)
ctx = {
'product_form': product_form, 'variant_form': variant_form,
'product': product}
@@ -175,7 +175,7 @@ def product_create(request, type_pk):
@staff_member_required
@permission_required('product.view_product')
-def product_detail(request, pk):
+def product_details(request, pk):
products = Product.objects.prefetch_related('variants', 'images').all()
product = get_object_or_404(products, pk=pk)
variants = product.variants.all()
@@ -235,7 +235,7 @@ def product_edit(request, pk):
msg = pgettext_lazy(
'Dashboard message', 'Updated product %s') % (product,)
messages.success(request, msg)
- return redirect('dashboard:product-detail', pk=product.pk)
+ return redirect('dashboard:product-details', pk=product.pk)
ctx = {
'product': product, 'product_form': form, 'variant_form': variant_form}
return TemplateResponse(request, 'dashboard/product/form.html', ctx)
@@ -379,7 +379,7 @@ def variant_details(request, product_pk, variant_pk):
# If the product type of this product assumes no variants, redirect to
# product details page that has special UI for products without variants.
if not product.product_type.has_variants:
- return redirect('dashboard:product-detail', pk=product.pk)
+ return redirect('dashboard:product-details', pk=product.pk)
images = variant.images.all()
margin = get_margin_for_variant(variant)
@@ -421,7 +421,7 @@ def variant_delete(request, product_pk, variant_pk):
msg = pgettext_lazy(
'Dashboard message', 'Removed variant %s') % (variant.name,)
messages.success(request, msg)
- return redirect('dashboard:product-detail', pk=product.pk)
+ return redirect('dashboard:product-details', pk=product.pk)
ctx = {
'is_only_variant': product.variants.count() == 1, 'product': product,
'variant': variant}
@@ -451,7 +451,7 @@ def attribute_list(request):
@staff_member_required
@permission_required('product.view_properties')
-def attribute_detail(request, pk):
+def attribute_details(request, pk):
attributes = ProductAttribute.objects.prefetch_related('values').all()
attribute = get_object_or_404(attributes, pk=pk)
ctx = {
@@ -470,7 +470,7 @@ def attribute_add(request):
attribute = form.save()
msg = pgettext_lazy('Dashboard message', 'Added attribute')
messages.success(request, msg)
- return redirect('dashboard:product-attribute-detail', pk=attribute.pk)
+ return redirect('dashboard:product-attribute-details', pk=attribute.pk)
ctx = {'attribute': attribute, 'form': form}
return TemplateResponse(
request,
@@ -487,7 +487,7 @@ def attribute_edit(request, pk):
attribute = form.save()
msg = pgettext_lazy('Dashboard message', 'Updated attribute')
messages.success(request, msg)
- return redirect('dashboard:product-attribute-detail', pk=attribute.pk)
+ return redirect('dashboard:product-attribute-details', pk=attribute.pk)
ctx = {'attribute': attribute, 'form': form}
return TemplateResponse(
request,
@@ -523,7 +523,7 @@ def attribute_choice_value_add(request, attribute_pk):
msg = pgettext_lazy(
'Dashboard message', 'Added attribute\'s value')
messages.success(request, msg)
- return redirect('dashboard:product-attribute-detail', pk=attribute_pk)
+ return redirect('dashboard:product-attribute-details', pk=attribute_pk)
ctx = {'attribute': attribute, 'value': value, 'form': form}
return TemplateResponse(
request,
@@ -542,7 +542,7 @@ def attribute_choice_value_edit(request, attribute_pk, value_pk):
msg = pgettext_lazy(
'Dashboard message', 'Updated attribute\'s value')
messages.success(request, msg)
- return redirect('dashboard:product-attribute-detail', pk=attribute_pk)
+ return redirect('dashboard:product-attribute-details', pk=attribute_pk)
ctx = {'attribute': attribute, 'value': value, 'form': form}
return TemplateResponse(
request,
@@ -560,7 +560,7 @@ def attribute_choice_value_delete(request, attribute_pk, value_pk):
'Dashboard message',
'Removed attribute\'s value %s') % (value.name,)
messages.success(request, msg)
- return redirect('dashboard:product-attribute-detail', pk=attribute_pk)
+ return redirect('dashboard:product-attribute-details', pk=attribute_pk)
return TemplateResponse(
request,
'dashboard/product/product_attribute/values/modal/confirm_delete.html',
diff --git a/saleor/dashboard/shipping/urls.py b/saleor/dashboard/shipping/urls.py
index 44748745ac..eaf898bdad 100644
--- a/saleor/dashboard/shipping/urls.py
+++ b/saleor/dashboard/shipping/urls.py
@@ -7,8 +7,8 @@ urlpatterns = [
url(r'^add/$', views.shipping_method_add, name='shipping-method-add'),
url(r'^(?P<pk>\d+)/update/$', views.shipping_method_edit,
name='shipping-method-update'),
- url(r'^(?P<pk>\d+)/$', views.shipping_method_detail,
- name='shipping-method-detail'),
+ url(r'^(?P<pk>\d+)/$', views.shipping_method_details,
+ name='shipping-method-details'),
url(r'^(?P<pk>\d+)/delete/$',
views.shipping_method_delete, name='shipping-method-delete'),
diff --git a/saleor/dashboard/shipping/views.py b/saleor/dashboard/shipping/views.py
index 33c957f7cc..9e6b912d1f 100644
--- a/saleor/dashboard/shipping/views.py
+++ b/saleor/dashboard/shipping/views.py
@@ -37,7 +37,7 @@ def shipping_method_add(request):
method = form.save()
msg = pgettext_lazy('Dashboard message', 'Added shipping method')
messages.success(request, msg)
- return redirect('dashboard:shipping-method-detail', pk=method.pk)
+ return redirect('dashboard:shipping-method-details', pk=method.pk)
ctx = {'form': form, 'shipping_method': form.instance}
return TemplateResponse(request, 'dashboard/shipping/form.html', ctx)
@@ -51,14 +51,14 @@ def shipping_method_edit(request, pk):
method = form.save()
msg = pgettext_lazy('Dashboard message', 'Updated shipping method')
messages.success(request, msg)
- return redirect('dashboard:shipping-method-detail', pk=method.pk)
+ return redirect('dashboard:shipping-method-details', pk=method.pk)
ctx = {'form': form, 'shipping_method': method}
return TemplateResponse(request, 'dashboard/shipping/form.html', ctx)
@staff_member_required
@permission_required('shipping.view_shipping')
-def shipping_method_detail(request, pk):
+def shipping_method_details(request, pk):
shipping_methods = ShippingMethod.objects.prefetch_related(
'price_per_country').all()
method = get_object_or_404(shipping_methods, pk=pk)
@@ -97,7 +97,7 @@ def shipping_method_country_add(request, shipping_method_pk):
'Dashboard message', 'Added shipping price for %s') % (country,)
messages.success(request, msg)
return redirect(
- 'dashboard:shipping-method-detail', pk=shipping_method_pk)
+ 'dashboard:shipping-method-details', pk=shipping_method_pk)
ctx = {
'form': form, 'shipping_method': shipping_method, 'country': country}
return TemplateResponse(
@@ -117,7 +117,7 @@ def shipping_method_country_edit(request, shipping_method_pk, country_pk):
'Updated country shipping price %s') % (country,)
messages.success(request, msg)
return redirect(
- 'dashboard:shipping-method-detail', pk=shipping_method_pk)
+ 'dashboard:shipping-method-details', pk=shipping_method_pk)
ctx = {
'form': form, 'shipping_method': shipping_method, 'country': country}
return TemplateResponse(
@@ -135,7 +135,7 @@ def shipping_method_country_delete(
'Dashboard message', 'Removed shipping method %s') % (country,)
messages.success(request, msg)
return redirect(
- 'dashboard:shipping-method-detail', pk=shipping_method_pk)
+ 'dashboard:shipping-method-details', pk=shipping_method_pk)
ctx = {'country': country, 'shipping_method_pk': shipping_method_pk}
return TemplateResponse(
request, 'dashboard/shipping/modal/country_confirm_delete.html', ctx)
diff --git a/saleor/dashboard/sites/urls.py b/saleor/dashboard/sites/urls.py
index 98e0fa9f36..717f4e14f7 100644
--- a/saleor/dashboard/sites/urls.py
+++ b/saleor/dashboard/sites/urls.py
@@ -6,8 +6,8 @@ urlpatterns = [
url(r'^$', views.index, name='site-index'),
url(r'^(?P<pk>\d+)/update/$', views.site_settings_edit,
name='site-update'),
- url(r'^(?P<pk>\d+)/$', views.site_settings_detail,
- name='site-detail'),
+ url(r'^(?P<pk>\d+)/$', views.site_settings_details,
+ name='site-details'),
url(r'^(?P<pk>\d+)/delete/$', views.site_settings_edit,
name='site-delete'),
diff --git a/saleor/dashboard/sites/views.py b/saleor/dashboard/sites/views.py
index 6c8612e613..3e69cd5baa 100644
--- a/saleor/dashboard/sites/views.py
+++ b/saleor/dashboard/sites/views.py
@@ -15,7 +15,7 @@ from .forms import AuthorizationKeyForm, SiteForm, SiteSettingsForm
def index(request):
site = get_current_site(request)
settings = site.settings
- return redirect('dashboard:site-detail', pk=settings.pk)
+ return redirect('dashboard:site-details', pk=settings.pk)
@staff_member_required
@@ -33,7 +33,7 @@ def site_settings_edit(request, pk):
site_settings = site_settings_form.save()
messages.success(request, pgettext_lazy(
'Dashboard message', 'Updated site settings'))
- return redirect('dashboard:site-detail', pk=site_settings.id)
+ return redirect('dashboard:site-details', pk=site_settings.id)
ctx = {'site': site_settings, 'site_settings_form': site_settings_form,
'site_form': site_form}
return TemplateResponse(request, 'dashboard/sites/form.html', ctx)
@@ -41,7 +41,7 @@ def site_settings_edit(request, pk):
@staff_member_required
@permission_required('site.edit_settings')
-def site_settings_detail(request, pk):
+def site_settings_details(request, pk):
site_settings = get_object_or_404(SiteSettings, pk=pk)
authorization_keys = AuthorizationKey.objects.filter(
site_settings=site_settings)
@@ -61,7 +61,7 @@ def authorization_key_add(request, site_settings_pk):
msg = pgettext_lazy(
'Dashboard message', 'Added authorization key %s') % (key,)
messages.success(request, msg)
- return redirect('dashboard:site-detail', pk=site_settings_pk)
+ return redirect('dashboard:site-details', pk=site_settings_pk)
ctx = {'form': form, 'site_settings_pk': site_settings_pk, 'key': key}
return TemplateResponse(
request, 'dashboard/sites/authorization_keys/form.html', ctx)
@@ -77,7 +77,7 @@ def authorization_key_edit(request, site_settings_pk, key_pk):
msg = pgettext_lazy(
'dashboard message', 'Updated authorization key %s') % (key,)
messages.success(request, msg)
- return redirect('dashboard:site-detail', pk=site_settings_pk)
+ return redirect('dashboard:site-details', pk=site_settings_pk)
ctx = {'form': form, 'site_settings_pk': site_settings_pk, 'key': key}
return TemplateResponse(
request, 'dashboard/sites/authorization_keys/form.html', ctx)
@@ -96,7 +96,7 @@ def authorization_key_delete(request, site_settings_pk, key_pk):
'Removed site authorization key %s') %
(key,))
return redirect(
- 'dashboard:site-detail', pk=site_settings_pk)
+ 'dashboard:site-details', pk=site_settings_pk)
return TemplateResponse(
request, 'dashboard/sites/modal/confirm_delete.html',
{'key': key, 'site_settings_pk': site_settings_pk})
diff --git a/saleor/page/urls.py b/saleor/page/urls.py
index 789bdc33fb..a8d8c85339 100644
--- a/saleor/page/urls.py
+++ b/saleor/page/urls.py
@@ -4,4 +4,4 @@ from . import views
urlpatterns = [
url(r'^(?P<slug>[a-z0-9-_]+?)/$',
- views.page_detail, name='details')]
+ views.page_details, name='details')]
diff --git a/saleor/page/views.py b/saleor/page/views.py
index 0b6ba87799..46810e7ca2 100644
--- a/saleor/page/views.py
+++ b/saleor/page/views.py
@@ -6,7 +6,7 @@ from django.template.response import TemplateResponse
from .utils import pages_visible_to_user
-def page_detail(request, slug):
+def page_details(request, slug):
page = get_object_or_404(
pages_visible_to_user(user=request.user).filter(slug=slug))
today = datetime.date.today()
diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.html
index d74b5e8cb5..ffeb0682ae 100644
--- a/templates/dashboard/category/detail.html
+++ b/templates/dashboard/category/detail.html
@@ -15,7 +15,7 @@
{% block header_menu %}
{% if root %}
{% if root.parent %}
- {% url 'dashboard:category-detail' pk=root.parent.pk as url %}
+ {% url 'dashboard:category-details' pk=root.parent.pk as url %}
{% else %}
{% url 'dashboard:category-list' as url %}
{% endif %}
@@ -55,7 +55,7 @@
</li>
{% else %}
<li class="hide-on-med-and-down">
- <a href="{% url 'dashboard:category-detail' pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:category-details' pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
{{ node.name }}
</a>
</li>
@@ -128,7 +128,7 @@
</thead>
<tbody>
{% for node in categories %}
- <tr data-action-go="{% url 'dashboard:category-detail' pk=node.pk %}">
+ <tr data-action-go="{% url 'dashboard:category-details' pk=node.pk %}">
<td>
{{ node.name }}
</td>
diff --git a/templates/dashboard/category/form.html b/templates/dashboard/category/form.html
index 12dc016b43..0c16845439 100644
--- a/templates/dashboard/category/form.html
+++ b/templates/dashboard/category/form.html
@@ -47,7 +47,7 @@
{% if forloop.last %}
{% if node.pk %}
<li>
- <a href="{% url 'dashboard:category-detail' pk=node.pk %}" class="breadcrumbs--ellipsed-item">{{ node }}</a>
+ <a href="{% url 'dashboard:category-details' pk=node.pk %}" class="breadcrumbs--ellipsed-item">{{ node }}</a>
</li>
{% if category.pk %}
<li>
@@ -65,7 +65,7 @@
{% endif %}
{% else %}
<li class="hide-on-med-and-down">
- <a href="{% url 'dashboard:category-detail' pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:category-details' pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
{{ node.name }}
</a>
</li>
@@ -107,7 +107,7 @@
</div>
<div class="card-action right-align">
{% if path %}
- <a href="{% url 'dashboard:category-detail' pk=path.last.pk %}" class="btn btn-flat">
+ <a href="{% url 'dashboard:category-details' pk=path.last.pk %}" class="btn btn-flat">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
{% else %}
diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.html
index 46db27d977..5c15d71fd8 100644
--- a/templates/dashboard/category/list.html
+++ b/templates/dashboard/category/list.html
@@ -57,7 +57,7 @@
</thead>
<tbody>
{% for node in categories %}
- <tr data-action-go="{% url 'dashboard:category-detail' pk=node.pk %}">
+ <tr data-action-go="{% url 'dashboard:category-details' pk=node.pk %}">
<td>
{{ node.name }}
</td>
diff --git a/templates/dashboard/includes/_menu_items.html b/templates/dashboard/includes/_menu_items.html
index cab03225d7..201aa74588 100644
--- a/templates/dashboard/includes/_menu_items.html
+++ b/templates/dashboard/includes/_menu_items.html
@@ -34,7 +34,7 @@
</thead>
<tbody id="menu-items" class="menu-items" data-post-url="{% if menu_item %}{% url 'dashboard:menu-items-reorder' menu_pk=menu.pk root_pk=menu_item.pk %}{% else %}{% url 'dashboard:menu-items-reorder' menu_pk=menu.pk %}{% endif %}">
{% for item in menu_items %}
- <tr data-action-go="{% url 'dashboard:menu-item-detail' menu_pk=menu.pk item_pk=item.pk %}" class="menu-item" data-id="{{ item.pk }}">
+ <tr data-action-go="{% url 'dashboard:menu-item-details' menu_pk=menu.pk item_pk=item.pk %}" class="menu-item" data-id="{{ item.pk }}">
{% if perms.menu.edit_menu %}
<td class="data-table-icon ignore-link sortable__drag-area">
<svg data-src="{% static "dashboard/images/reorder.svg" %}" height="20" width="20" fill="#000" />
diff --git a/templates/dashboard/index.html b/templates/dashboard/index.html
index 4f33467682..3fa90c15f4 100644
--- a/templates/dashboard/index.html
+++ b/templates/dashboard/index.html
@@ -149,7 +149,7 @@
</thead>
<tbody>
{% for product in low_stock %}
- <tr data-action-go="{% url "dashboard:product-detail" pk=product.pk %}">
+ <tr data-action-go="{% url "dashboard:product-details" pk=product.pk %}">
<td>
{{ product }}
</td>
diff --git a/templates/dashboard/menu/item/detail.html b/templates/dashboard/menu/item/detail.html
index cb4fc76b4b..25980faca4 100644
--- a/templates/dashboard/menu/item/detail.html
+++ b/templates/dashboard/menu/item/detail.html
@@ -30,7 +30,7 @@
</li>
{% endif %}
<li title="{{ menu.name }}" class="breadcrumbs--ellipsed-item">
- <a href="{% url 'dashboard:menu-detail' pk=menu.pk %}">
+ <a href="{% url 'dashboard:menu-details' pk=menu.pk %}">
{{ menu.name }}
</a>
</li>
@@ -49,7 +49,7 @@
</li>
{% else %}
<li class="hide-on-med-and-down">
- <a href="{% url 'dashboard:menu-item-detail' menu_pk=menu.pk item_pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:menu-item-details' menu_pk=menu.pk item_pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
{{ node.name }}
</a>
</li>
diff --git a/templates/dashboard/menu/item/form.html b/templates/dashboard/menu/item/form.html
index cb7986301d..4d3e600a2a 100644
--- a/templates/dashboard/menu/item/form.html
+++ b/templates/dashboard/menu/item/form.html
@@ -30,7 +30,7 @@
</a>
</li>
<li>
- <a href="{% url 'dashboard:menu-detail' pk=menu.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:menu-details' pk=menu.pk %}" class="breadcrumbs--ellipsed-item">
{{ menu }}
</a>
</li>
@@ -42,7 +42,7 @@
</li>
{% for node in path %}
<li class="hide-on-med-and-down">
- <a href="{% url 'dashboard:menu-item-detail' menu_pk=menu.pk item_pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:menu-item-details' menu_pk=menu.pk item_pk=node.pk %}" title="{{ node.name }}" class="breadcrumbs--ellipsed-item">
{{ node.name }}
</a>
</li>
@@ -76,7 +76,7 @@
</div>
</div>
<div class="card-action right-align">
- <a href="{% if menu_item.pk %}{% url 'dashboard:menu-item-detail' menu_pk=menu.pk item_pk=menu_item.pk %}{% elif menu_item.parent %}{% url 'dashboard:menu-item-detail' menu_pk=menu.pk item_pk=menu_item.parent.pk %}{% else %}{% url 'dashboard:menu-detail' pk=menu.pk %}{% endif %}" class="btn btn-flat">
+ <a href="{% if menu_item.pk %}{% url 'dashboard:menu-item-details' menu_pk=menu.pk item_pk=menu_item.pk %}{% elif menu_item.parent %}{% url 'dashboard:menu-item-details' menu_pk=menu.pk item_pk=menu_item.parent.pk %}{% else %}{% url 'dashboard:menu-details' pk=menu.pk %}{% endif %}" class="btn btn-flat">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
{% if menu_item.pk %}
diff --git a/templates/dashboard/menu/list.html b/templates/dashboard/menu/list.html
index c3b46d5424..02ab30d6b6 100644
--- a/templates/dashboard/menu/list.html
+++ b/templates/dashboard/menu/list.html
@@ -50,7 +50,7 @@
</thead>
<tbody>
{% for menu in menus %}
- <tr data-action-go="{% url 'dashboard:menu-detail' pk=menu.pk %}">
+ <tr data-action-go="{% url 'dashboard:menu-details' pk=menu.pk %}">
<td>
{{ menu.name }}
</td>
diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.html
index 81c903b749..44f9a26e70 100644
--- a/templates/dashboard/order/detail.html
+++ b/templates/dashboard/order/detail.html
@@ -295,7 +295,7 @@
<tr class="last-no-border">
<td>
{% if line.variant.product %}
- <a href="{% url 'dashboard:product-detail' pk=line.variant.product.pk %}">{{ line.product_name }}</a>
+ <a href="{% url 'dashboard:product-details' pk=line.variant.product.pk %}">{{ line.product_name }}</a>
{% else %}
{{ line.product_name }}
{% endif %}
diff --git a/templates/dashboard/order/fulfillment.html b/templates/dashboard/order/fulfillment.html
index 53d9103f93..901706e2fb 100644
--- a/templates/dashboard/order/fulfillment.html
+++ b/templates/dashboard/order/fulfillment.html
@@ -77,7 +77,7 @@
<tr>
<td>
{% if line.variant %}
- <a href="{% url 'dashboard:variant-detail' pk=line.variant.pk %}">{{ line.product_name }}</a>
+ <a href="{% url 'dashboard:variant-details' pk=line.variant.pk %}">{{ line.product_name }}</a>
{% else %}
{{ line.product_name }}
{% endif %}
diff --git a/templates/dashboard/page/form.html b/templates/dashboard/page/form.html
index bdeed703e4..288418642c 100644
--- a/templates/dashboard/page/form.html
+++ b/templates/dashboard/page/form.html
@@ -33,7 +33,7 @@
</li>
<li>
{% if page.pk %}
- <a href="{% url 'dashboard:page-detail' pk=page.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:page-details' pk=page.pk %}" class="breadcrumbs--ellipsed-item">
{{ page }}
</a>
{% else %}
diff --git a/templates/dashboard/page/list.html b/templates/dashboard/page/list.html
index 74b6348624..f30b6dc4fe 100644
--- a/templates/dashboard/page/list.html
+++ b/templates/dashboard/page/list.html
@@ -51,7 +51,7 @@
</thead>
<tbody>
{% for page in pages %}
- <tr data-action-go="{% url 'dashboard:page-detail' pk=page.pk %}">
+ <tr data-action-go="{% url 'dashboard:page-details' pk=page.pk %}">
<td>
{{ page.title }}
</td>
diff --git a/templates/dashboard/product/form.html b/templates/dashboard/product/form.html
index 4129560e17..085d7349d3 100644
--- a/templates/dashboard/product/form.html
+++ b/templates/dashboard/product/form.html
@@ -36,7 +36,7 @@
</li>
<li>
{% if product.pk %}
- <a href="{% url "dashboard:product-detail" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url "dashboard:product-details" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
{{ product }}
</a>
{% else %}
@@ -119,7 +119,7 @@
</div>
<div class="card-action right-align">
{% if product.pk %}
- <a href="{% url 'dashboard:product-detail' product.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:product-details' product.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect">
diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.html
index 76164e5202..06df47cabd 100644
--- a/templates/dashboard/product/list.html
+++ b/templates/dashboard/product/list.html
@@ -69,7 +69,7 @@
</thead>
<tbody>
{% for product in products %}
- <tr class="avatar" data-action-go="{% url 'dashboard:product-detail' pk=product.pk %}">
+ <tr class="avatar" data-action-go="{% url 'dashboard:product-details' pk=product.pk %}">
<td class="bulk-checkbox ignore-link">
<input id="id_products_{{ product.pk }}" type="checkbox" name="products" value="{{ product.pk }}" class="filled-in select-item">
<label for="id_products_{{ product.pk }}"></label>
diff --git a/templates/dashboard/product/product_attribute/form.html b/templates/dashboard/product/product_attribute/form.html
index d63e745809..2d4cb1b2a3 100644
--- a/templates/dashboard/product/product_attribute/form.html
+++ b/templates/dashboard/product/product_attribute/form.html
@@ -36,7 +36,7 @@
</li>
{% if attribute.pk %}
<li>
- <a href="{% url 'dashboard:product-attribute-detail' attribute.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:product-attribute-details' attribute.pk %}" class="breadcrumbs--ellipsed-item">
{{ attribute }}
</a>
</li>
@@ -73,7 +73,7 @@
</div>
<div class="card-action right-align">
{% if attribute.pk %}
- <a href="{% url 'dashboard:product-attribute-detail' attribute.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:product-attribute-details' attribute.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect">
diff --git a/templates/dashboard/product/product_attribute/list.html b/templates/dashboard/product/product_attribute/list.html
index 5e3344d3d7..1db48e7adb 100644
--- a/templates/dashboard/product/product_attribute/list.html
+++ b/templates/dashboard/product/product_attribute/list.html
@@ -50,7 +50,7 @@
</thead>
<tbody>
{% for pk, name, values in attributes %}
- <tr data-action-go="{% url 'dashboard:product-attribute-detail' pk=pk %}">
+ <tr data-action-go="{% url 'dashboard:product-attribute-details' pk=pk %}">
<td>
{{ name }}
</td>
diff --git a/templates/dashboard/product/product_attribute/values/form.html b/templates/dashboard/product/product_attribute/values/form.html
index 0f92ab1fab..0384d8d55e 100644
--- a/templates/dashboard/product/product_attribute/values/form.html
+++ b/templates/dashboard/product/product_attribute/values/form.html
@@ -36,7 +36,7 @@
</li>
{% if attribute.pk %}
<li>
- <a href="{% url 'dashboard:product-attribute-detail' attribute.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:product-attribute-details' attribute.pk %}" class="breadcrumbs--ellipsed-item">
{{ attribute }}
</a>
</li>
@@ -74,7 +74,7 @@
</div>
</div>
<div class="card-action right-align">
- <a href="{% url 'dashboard:product-attribute-detail' pk=attribute.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:product-attribute-details' pk=attribute.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
{% if value.pk %}
diff --git a/templates/dashboard/product/product_image/form.html b/templates/dashboard/product/product_image/form.html
index 5b5be7dfda..b54ee1c993 100644
--- a/templates/dashboard/product/product_image/form.html
+++ b/templates/dashboard/product/product_image/form.html
@@ -16,19 +16,19 @@
{% block menu_products_class %}active{% endblock %}
{% block header_menu %}
- {% url "dashboard:product-detail" pk=product.pk as url %}
+ {% url "dashboard:product-details" pk=product.pk as url %}
{% include "dashboard/includes/_back_link.html" with url=url %}
{% endblock %}
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
<li>
- <a href="{% url "dashboard:product-detail" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url "dashboard:product-details" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
{{ product }}
</a>
</li>
<li class="back-mobile">
- <a href="{% url "dashboard:product-detail" pk=product.pk %}" class="breadcrumb">
+ <a href="{% url "dashboard:product-details" pk=product.pk %}" class="breadcrumb">
<svg data-src="{% static "dashboard/images/arrow-left.svg" %}" fill="#fff" width="20px" height="20px" />
</a>
</li>
diff --git a/templates/dashboard/product/product_image/list.html b/templates/dashboard/product/product_image/list.html
index a85e291087..05e3d3b44d 100644
--- a/templates/dashboard/product/product_image/list.html
+++ b/templates/dashboard/product/product_image/list.html
@@ -35,7 +35,7 @@
</a>
</li>
<li>
- <a href="{% url "dashboard:product-detail" product.pk %}">{{ product }}</a>
+ <a href="{% url "dashboard:product-details" product.pk %}">{{ product }}</a>
</li>
<li>
<span class="breadcrumbs--ellipsed-item">{% trans "Images" %}</span>
diff --git a/templates/dashboard/product/product_variant/detail.html b/templates/dashboard/product/product_variant/detail.html
index 898fd8f392..41dc887f82 100644
--- a/templates/dashboard/product/product_variant/detail.html
+++ b/templates/dashboard/product/product_variant/detail.html
@@ -26,7 +26,7 @@
</a>
</li>
<li class="hide-on-med-and-down">
- <a href="{% url "dashboard:product-detail" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url "dashboard:product-details" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
{{ product }}
</a>
</li>
diff --git a/templates/dashboard/product/product_variant/form.html b/templates/dashboard/product/product_variant/form.html
index 7ac1f114d4..9cf352e95c 100644
--- a/templates/dashboard/product/product_variant/form.html
+++ b/templates/dashboard/product/product_variant/form.html
@@ -27,12 +27,12 @@
</a>
</li>
<li class="back-mobile">
- <a href="{% url "dashboard:product-detail" pk=product.pk %}">
+ <a href="{% url "dashboard:product-details" pk=product.pk %}">
<svg data-src="{% static "dashboard/images/chevron-left.svg" %}" />
</a>
</li>
<li>
- <a href="{% url "dashboard:product-detail" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url "dashboard:product-details" pk=product.pk %}" class="breadcrumbs--ellipsed-item">
{{ product }}
</a>
</li>
@@ -107,7 +107,7 @@
{% trans "Save" context "Dashboard update action" %}
</button>
{% else %}
- <a href="{% url "dashboard:product-detail" pk=product.pk %}" class="btn-flat waves-effect">
+ <a href="{% url "dashboard:product-details" pk=product.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect">
diff --git a/templates/dashboard/search/results.html b/templates/dashboard/search/results.html
index 75fd54890a..9a716334cd 100644
--- a/templates/dashboard/search/results.html
+++ b/templates/dashboard/search/results.html
@@ -26,7 +26,7 @@
<ul class="collection list card">
{% for product in products %}
<li class="collection-item avatar list-item">
- <a href="{% url 'dashboard:product-detail' pk=product.pk %}">
+ <a href="{% url 'dashboard:product-details' pk=product.pk %}">
<img src="{% product_first_image product size="60x60" method="crop" %}"
srcset="{% product_first_image product size="60x60" method="crop" %} 1x, {% product_first_image product size="120x120" method="crop" %} 2x"
class="circle" alt="{{ product.name }}">
diff --git a/templates/dashboard/shipping/country/form.html b/templates/dashboard/shipping/country/form.html
index 108baca20a..96f43ac02e 100644
--- a/templates/dashboard/shipping/country/form.html
+++ b/templates/dashboard/shipping/country/form.html
@@ -38,7 +38,7 @@
</li>
{% if shipping_method.pk %}
<li>
- <a href="{% url 'dashboard:shipping-method-detail' shipping_method.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:shipping-method-details' shipping_method.pk %}" class="breadcrumbs--ellipsed-item">
{{ shipping_method }}
</a>
</li>
@@ -76,7 +76,7 @@
</div>
</div>
<div class="card-action right-align">
- <a href="{% url 'dashboard:shipping-method-detail' pk=shipping_method.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:shipping-method-details' pk=shipping_method.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
{% if country.pk %}
diff --git a/templates/dashboard/shipping/form.html b/templates/dashboard/shipping/form.html
index 281526b923..8441b1f586 100644
--- a/templates/dashboard/shipping/form.html
+++ b/templates/dashboard/shipping/form.html
@@ -40,7 +40,7 @@
</li>
{% if shipping_method.pk %}
<li>
- <a href="{% url 'dashboard:shipping-method-detail' shipping_method.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:shipping-method-details' shipping_method.pk %}" class="breadcrumbs--ellipsed-item">
{{ shipping_method }}
</a>
</li>
@@ -74,7 +74,7 @@
</div>
<div class="card-action right-align">
{% if shipping_method.pk %}
- <a href="{% url 'dashboard:shipping-method-detail' shipping_method.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:shipping-method-details' shipping_method.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect">
diff --git a/templates/dashboard/shipping/list.html b/templates/dashboard/shipping/list.html
index 2676afd9a6..dd768246b5 100644
--- a/templates/dashboard/shipping/list.html
+++ b/templates/dashboard/shipping/list.html
@@ -53,7 +53,7 @@
</thead>
<tbody>
{% for method in shipping_methods %}
- <tr data-action-go="{% if perms.shipping.edit_shipping %}{% url 'dashboard:shipping-method-detail' pk=method.pk %}{% endif %}">
+ <tr data-action-go="{% if perms.shipping.edit_shipping %}{% url 'dashboard:shipping-method-details' pk=method.pk %}{% endif %}">
<td>
{{ method }}
</td>
diff --git a/templates/dashboard/sites/authorization_keys/form.html b/templates/dashboard/sites/authorization_keys/form.html
index fa0fb5b59b..f3cffd16e8 100644
--- a/templates/dashboard/sites/authorization_keys/form.html
+++ b/templates/dashboard/sites/authorization_keys/form.html
@@ -67,7 +67,7 @@
</div>
</div>
<div class="card-action right-align">
- <a href="{% url 'dashboard:site-detail' pk=site_settings_pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:site-details' pk=site_settings_pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
{% if value.pk %}
diff --git a/templates/dashboard/sites/form.html b/templates/dashboard/sites/form.html
index cc45119887..d519175659 100644
--- a/templates/dashboard/sites/form.html
+++ b/templates/dashboard/sites/form.html
@@ -51,7 +51,7 @@
</div>
</div>
<div class="card-action right-align">
- <a class="btn-flat waves-effect" href="{% url 'dashboard:site-detail' pk=site.pk %}" target="_blank">
+ <a class="btn-flat waves-effect" href="{% url 'dashboard:site-details' pk=site.pk %}" target="_blank">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect">
diff --git a/templates/product/details.html b/templates/product/details.html
index 61b1e89a7b..d271063e72 100644
--- a/templates/product/details.html
+++ b/templates/product/details.html
@@ -118,7 +118,7 @@
</h1>
{% if user.is_staff %}
<p>
- <a href="{% url "dashboard:product-detail" pk=product.pk %}">
+ <a href="{% url "dashboard:product-details"pk=product.pk %}">
{% trans "Edit in dashboard" context "Product details link text" %}
</a>
</p>
diff --git a/tests/dashboard/test_category.py b/tests/dashboard/test_category.py
index e25602d4d9..3a6ddbb22e 100644
--- a/tests/dashboard/test_category.py
+++ b/tests/dashboard/test_category.py
@@ -52,9 +52,9 @@ def test_category_edit(admin_client, default_category):
assert Category.objects.all()[0].name == 'Cars'
-def test_category_detail(admin_client, default_category):
+def test_category_details(admin_client, default_category):
assert len(Category.objects.all()) == 1
- url = reverse('dashboard:category-detail',
+ url = reverse('dashboard:category-details',
kwargs={'pk': default_category.pk})
response = admin_client.post(url, follow=True)
assert response.status_code == 200
diff --git a/tests/dashboard/test_menu.py b/tests/dashboard/test_menu.py
index 51d1c8c4de..c9206a4b32 100644
--- a/tests/dashboard/test_menu.py
+++ b/tests/dashboard/test_menu.py
@@ -107,14 +107,14 @@ def test_view_menu_edit(admin_client, menu):
response = admin_client.post(url, data)
assert response.status_code == 302
- redirect_url = reverse('dashboard:menu-detail', kwargs={'pk': menu.pk})
+ redirect_url = reverse('dashboard:menu-details', kwargs={'pk': menu.pk})
assert get_redirect_location(response) == redirect_url
menu.refresh_from_db()
assert menu.name == name
-def test_view_menu_detail(admin_client, menu):
- url = reverse('dashboard:menu-detail', kwargs={'pk': menu.pk})
+def test_view_menu_details(admin_client, menu):
+ url = reverse('dashboard:menu-details', kwargs={'pk': menu.pk})
response = admin_client.post(url)
@@ -141,7 +141,7 @@ def test_view_menu_item_create(admin_client, menu, default_category):
response = admin_client.post(url, data)
assert response.status_code == 302
- redirect_url = reverse('dashboard:menu-detail', kwargs={'pk': menu.pk})
+ redirect_url = reverse('dashboard:menu-details', kwargs={'pk': menu.pk})
assert get_redirect_location(response) == redirect_url
assert MenuItem.objects.count() == 1
menu_item = MenuItem.objects.first()
@@ -160,7 +160,7 @@ def test_view_menu_item_create_with_parent(
assert response.status_code == 302
redirect_url = reverse(
- 'dashboard:menu-item-detail',
+ 'dashboard:menu-item-details',
kwargs={'menu_pk': menu.pk, 'item_pk': menu_item.pk})
assert get_redirect_location(response) == redirect_url
assert MenuItem.objects.count() == 2
@@ -190,7 +190,7 @@ def test_view_menu_item_edit(admin_client, menu, menu_item, default_category):
assert response.status_code == 302
redirect_url = reverse(
- 'dashboard:menu-item-detail',
+ 'dashboard:menu-item-details',
kwargs={'menu_pk': menu.pk, 'item_pk': menu_item.pk})
assert get_redirect_location(response) == redirect_url
assert MenuItem.objects.count() == 1
@@ -206,7 +206,7 @@ def test_view_menu_item_delete(admin_client, menu, menu_item):
response = admin_client.post(url)
assert response.status_code == 302
- redirect_url = reverse('dashboard:menu-detail', kwargs={'pk': menu.pk})
+ redirect_url = reverse('dashboard:menu-details', kwargs={'pk': menu.pk})
assert get_redirect_location(response) == redirect_url
assert MenuItem.objects.count() == 0
@@ -223,15 +223,15 @@ def test_view_menu_item_delete_with_parent(admin_client, menu, menu_item):
assert response.status_code == 302
redirect_url = reverse(
- 'dashboard:menu-item-detail',
+ 'dashboard:menu-item-details',
kwargs={'menu_pk': menu.pk, 'item_pk': menu_item.pk})
assert get_redirect_location(response) == redirect_url
assert MenuItem.objects.count() == 1
-def test_view_menu_item_detail(admin_client, menu, menu_item):
+def test_view_menu_item_details(admin_client, menu, menu_item):
url = reverse(
- 'dashboard:menu-item-detail',
+ 'dashboard:menu-item-details',
kwargs={'menu_pk': menu.pk, 'item_pk': menu_item.pk})
response = admin_client.post(url)
diff --git a/tests/dashboard/test_permissions.py b/tests/dashboard/test_permissions.py
index 73bae2ffa6..fbb23034e0 100644
--- a/tests/dashboard/test_permissions.py
+++ b/tests/dashboard/test_permissions.py
@@ -13,13 +13,13 @@ def test_staff_cant_view_staff_list(staff_client):
assert response.status_code == 302
-def test_admin_can_view_staff_detail(admin_client, admin_user):
+def test_admin_can_view_staff_details(admin_client, admin_user):
response = admin_client.get(reverse('dashboard:staff-details',
args=[admin_user.pk]))
assert response.status_code == 200
-def test_staff_cant_view_staff_detail(staff_client, admin_user):
+def test_staff_cant_view_staff_details(staff_client, admin_user):
response = staff_client.get(reverse('dashboard:staff-details',
args=[admin_user.pk]))
assert response.status_code == 302
@@ -45,13 +45,13 @@ def test_staff_cant_view_groups_list(staff_client):
assert response.status_code == 302
-def test_admin_can_view_group_detail(admin_client, staff_group):
+def test_admin_can_view_group_details(admin_client, staff_group):
response = admin_client.get(reverse('dashboard:group-details',
args=[staff_group.pk]))
assert response.status_code == 200
-def test_staff_cant_view_group_detail(staff_client, staff_group):
+def test_staff_cant_view_group_details(staff_client, staff_group):
response = staff_client.get(reverse('dashboard:group-details',
args=[staff_group.pk]))
assert response.status_code == 302
@@ -131,16 +131,16 @@ def test_staff_cant_view_products_attribute_add(staff_client):
assert response.status_code == 302
-def test_admin_can_view_products_attribute_detail(
+def test_admin_can_view_products_attribute_details(
admin_client, color_attribute):
- response = admin_client.get(reverse('dashboard:product-attribute-detail',
+ response = admin_client.get(reverse('dashboard:product-attribute-details',
args=[color_attribute.pk]))
assert response.status_code == 200
-def test_staff_cant_view_products_attribute_detail(
+def test_staff_cant_view_products_attribute_details(
staff_client, color_attribute):
- response = staff_client.get(reverse('dashboard:product-attribute-detail',
+ response = staff_client.get(reverse('dashboard:product-attribute-details',
args=[color_attribute.pk]))
assert response.status_code == 302
@@ -225,15 +225,15 @@ def test_staff_cant_view_shipping_methods_update(
assert response.status_code == 302
-def test_admin_can_view_shipping_methods_detail(admin_client, shipping_method):
- response = admin_client.get(reverse('dashboard:shipping-method-detail',
+def test_admin_can_view_shipping_methods_details(admin_client, shipping_method):
+ response = admin_client.get(reverse('dashboard:shipping-method-details',
args=[shipping_method.pk]))
assert response.status_code == 200
-def test_staff_cant_view_shipping_methods_detail(
+def test_staff_cant_view_shipping_methods_details(
staff_client, shipping_method):
- response = staff_client.get(reverse('dashboard:shipping-method-detail',
+ response = staff_client.get(reverse('dashboard:shipping-method-details',
args=[shipping_method.pk]))
assert response.status_code == 302
@@ -288,21 +288,21 @@ def test_staff_can_access_product_list(
assert response.status_code == 200
-def test_staff_cant_access_product_detail(
+def test_staff_cant_access_product_details(
staff_client, staff_user, product):
assert not staff_user.has_perm("product.view_product")
- response = staff_client.get(reverse('dashboard:product-detail',
+ response = staff_client.get(reverse('dashboard:product-details',
args=[product.pk]))
assert response.status_code == 302
-def test_staff_can_access_product_detail(
+def test_staff_can_access_product_details(
staff_client, staff_user, product, permission_view_product):
assert not staff_user.has_perm("product.view_product")
staff_user.user_permissions.add(permission_view_product)
staff_user = User.objects.get(pk=staff_user.pk)
assert staff_user.has_perm("product.view_product")
- response = staff_client.get(reverse('dashboard:product-detail',
+ response = staff_client.get(reverse('dashboard:product-details',
args=[product.pk]))
assert response.status_code == 200
@@ -756,7 +756,7 @@ def test_staff_with_permissions_can_view_products_attributes_list(
assert not staff_user.has_perm("product.view_properties")
response = staff_client.get(reverse('dashboard:product-attributes'))
assert response.status_code == 302
- response = staff_client.get(reverse('dashboard:product-attribute-detail',
+ response = staff_client.get(reverse('dashboard:product-attribute-details',
args=[color_attribute.pk]))
assert response.status_code == 302
staff_group.permissions.add(permission_view_properties)
@@ -765,7 +765,7 @@ def test_staff_with_permissions_can_view_products_attributes_list(
assert staff_user.has_perm("product.view_properties")
response = staff_client.get(reverse('dashboard:product-attributes'))
assert response.status_code == 200
- response = staff_client.get(reverse('dashboard:product-attribute-detail',
+ response = staff_client.get(reverse('dashboard:product-attribute-details',
args=[color_attribute.pk]))
assert response.status_code == 200
@@ -796,13 +796,13 @@ def test_staff_with_permissions_can_update_add_and_delete_products_attributes(
assert response.status_code == 200
-def test_staff_with_permissions_can_view_shipping_methods_and_detail(
+def test_staff_with_permissions_can_view_shipping_methods_and_details(
staff_client, staff_user, staff_group, permission_view_shipping,
shipping_method):
assert not staff_user.has_perm("shipping.view_shipping")
response = staff_client.get(reverse('dashboard:shipping-methods'))
assert response.status_code == 302
- response = staff_client.get(reverse('dashboard:shipping-method-detail',
+ response = staff_client.get(reverse('dashboard:shipping-method-details',
args=[shipping_method.pk]))
assert response.status_code == 302
staff_group.permissions.add(permission_view_shipping)
@@ -811,7 +811,7 @@ def test_staff_with_permissions_can_view_shipping_methods_and_detail(
assert staff_user.has_perm("shipping.view_shipping")
response = staff_client.get(reverse('dashboard:shipping-methods'))
assert response.status_code == 200
- response = staff_client.get(reverse('dashboard:shipping-method-detail',
+ response = staff_client.get(reverse('dashboard:shipping-method-details',
args=[shipping_method.pk]))
assert response.status_code == 200
diff --git a/tests/dashboard/test_product.py b/tests/dashboard/test_product.py
index 3e434a27fc..d9389a0d73 100644
--- a/tests/dashboard/test_product.py
+++ b/tests/dashboard/test_product.py
@@ -163,9 +163,9 @@ def test_attribute_list(db, product, color_attribute, admin_client):
assert response.status_code == 200
-def test_attribute_detail(color_attribute, admin_client):
+def test_attribute_details(color_attribute, admin_client):
url = reverse(
- 'dashboard:product-attribute-detail',
+ 'dashboard:product-attribute-details',
kwargs={'pk': color_attribute.pk})
response = admin_client.get(url)
assert response.status_code == 200
diff --git a/tests/dashboard/test_shipping.py b/tests/dashboard/test_shipping.py
index 2b76131486..fe7fa64d48 100644
--- a/tests/dashboard/test_shipping.py
+++ b/tests/dashboard/test_shipping.py
@@ -39,9 +39,9 @@ def test_shipping_method_edit(admin_client, shipping_method):
assert ShippingMethod.objects.all()[0].name == 'Flash'
-def test_shipping_method_detail(admin_client, shipping_method):
+def test_shipping_method_details(admin_client, shipping_method):
assert len(ShippingMethod.objects.all()) == 1
- url = reverse('dashboard:shipping-method-detail',
+ url = reverse('dashboard:shipping-method-details',
kwargs={'pk': shipping_method.pk})
response = admin_client.post(url, follow=True)
assert response.status_code == 200
diff --git a/tests/test_page.py b/tests/test_page.py
index f89ff57979..0e1d71c505 100644
--- a/tests/test_page.py
+++ b/tests/test_page.py
@@ -1,4 +1,4 @@
-def test_draft_page_detail(client, admin_client, page):
+def test_draft_page_details(client, admin_client, page):
page_url = page.get_absolute_url()
response = client.get(page_url)
assert response.status_code == 404
@@ -6,7 +6,7 @@ def test_draft_page_detail(client, admin_client, page):
assert response.status_code == 200
-def test_public_page_detail(client, admin_client, page):
+def test_public_page_details(client, admin_client, page):
page.is_visible = True
page.save()
page_url = page.get_absolute_url()