Features: 1) Add new sitemap path for detailed section with pagination.
Fixes: 1) Replace `DALFRelatedFieldAjax` with `DALFRelatedOnlyField` for vendor stock field. Extra: 1) Minor formatting adjustments in `api_urls.py` for readability.
This commit is contained in:
parent
cd71d78b93
commit
c7d8fcbe03
2 changed files with 15 additions and 8 deletions
|
|
@ -245,7 +245,7 @@ class ProductAdmin(FieldsetsMixin, BasicModelAdmin):
|
||||||
("brand", DALFRelatedFieldAjax),
|
("brand", DALFRelatedFieldAjax),
|
||||||
("category", DALFRelatedFieldAjax),
|
("category", DALFRelatedFieldAjax),
|
||||||
("tags", DALFRelatedFieldAjax),
|
("tags", DALFRelatedFieldAjax),
|
||||||
("stocks__vendor", DALFRelatedFieldAjax),
|
("stocks__vendor", DALFRelatedOnlyField),
|
||||||
"created",
|
"created",
|
||||||
"modified",
|
"modified",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -59,14 +59,21 @@ urlpatterns = [
|
||||||
path(
|
path(
|
||||||
"sitemap.xml",
|
"sitemap.xml",
|
||||||
sitemap_index,
|
sitemap_index,
|
||||||
{
|
{"sitemaps": sitemaps, "sitemap_url_name": "sitemap-detail"},
|
||||||
"sitemaps": sitemaps,
|
name="sitemap-index",
|
||||||
"sitemap_url_name": "sitemap-index"
|
),
|
||||||
},
|
path(
|
||||||
name="sitemap-index"
|
"sitemap-<section>.xml",
|
||||||
|
sitemap_detail,
|
||||||
|
{"sitemaps": sitemaps},
|
||||||
|
name="sitemap-detail",
|
||||||
|
),
|
||||||
|
path(
|
||||||
|
"sitemap-<section>-<int:page>.xml",
|
||||||
|
sitemap_detail,
|
||||||
|
{"sitemaps": sitemaps},
|
||||||
|
name="sitemap-detail",
|
||||||
),
|
),
|
||||||
path("sitemap-<section>.xml", sitemap_detail, {"sitemaps": sitemaps}, name="sitemap-detail"),
|
|
||||||
path("sitemap-<section>-<int:page>.xml", sitemap_detail, {"sitemaps": sitemaps}, name="sitemap-detail"),
|
|
||||||
path("download/<str:order_product_uuid>/", download_digital_asset_view, name="download_digital_asset"),
|
path("download/<str:order_product_uuid>/", download_digital_asset_view, name="download_digital_asset"),
|
||||||
path("search/", GlobalSearchView.as_view(), name="global_search"),
|
path("search/", GlobalSearchView.as_view(), name="global_search"),
|
||||||
path("app/cache/", CacheOperatorView.as_view(), name="cache_operator"),
|
path("app/cache/", CacheOperatorView.as_view(), name="cache_operator"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue