diff --git a/.gitignore b/.gitignore index 8892e506..9ca0fda8 100644 --- a/.gitignore +++ b/.gitignore @@ -64,8 +64,9 @@ htmlcov/ .pybuilder/ # Storefronts -nuxt/ -next/ +.nuxt/ +.next/ +next-env.d.ts # Celery celerybeat-schedule diff --git a/core/admin.py b/core/admin.py index 664c9011..46a6ee3c 100644 --- a/core/admin.py +++ b/core/admin.py @@ -245,7 +245,7 @@ class ProductAdmin(FieldsetsMixin, BasicModelAdmin): ("brand", DALFRelatedFieldAjax), ("category", DALFRelatedFieldAjax), ("tags", DALFRelatedFieldAjax), - ("stocks__vendor", DALFRelatedFieldAjax), + ("stocks__vendor", DALFRelatedOnlyField), "created", "modified", ) diff --git a/core/api_urls.py b/core/api_urls.py index 22f47a02..da873ef7 100644 --- a/core/api_urls.py +++ b/core/api_urls.py @@ -57,10 +57,26 @@ sitemaps = { urlpatterns = [ path("core/", include(core_router.urls)), path( - "sitemap.xml", sitemap_index, {"sitemaps": sitemaps, "sitemap_url_name": "sitemap-detail"}, name="sitemap-index" + "sitemap.xml", + sitemap_index, + { + "sitemaps": sitemaps, + "sitemap_url_name": "core:sitemap-detail", + }, + name="sitemap-index", + ), + path( + "sitemap-
.xml", + sitemap_detail, + {"sitemaps": sitemaps}, + name="sitemap-detail", + ), + path( + "sitemap-
-.xml", + sitemap_detail, + {"sitemaps": sitemaps}, + name="sitemap-detail", ), - path("sitemap-
.xml", sitemap_detail, {"sitemaps": sitemaps}, name="sitemap-detail"), - path("sitemap-
-.xml", sitemap_detail, {"sitemaps": sitemaps}, name="sitemap-detail"), path("download//", download_digital_asset_view, name="download_digital_asset"), path("search/", GlobalSearchView.as_view(), name="global_search"), path("app/cache/", CacheOperatorView.as_view(), name="cache_operator"), diff --git a/core/management/commands/delete_never_ordered_products.py b/core/management/commands/delete_never_ordered_products.py index 84b1ba97..885eddb3 100644 --- a/core/management/commands/delete_never_ordered_products.py +++ b/core/management/commands/delete_never_ordered_products.py @@ -5,15 +5,14 @@ from core.models import Product CHUNK_SIZE = 5000 + class Command(BaseCommand): help = "Delete Product rows with no OrderProduct, in batches" def handle(self, *args, **options): while True: batch_ids = list( - Product.objects - .filter(orderproduct__isnull=True) - .values_list('pk', flat=True)[:CHUNK_SIZE] + Product.objects.filter(orderproduct__isnull=True).values_list("pk", flat=True)[:CHUNK_SIZE] ) if not batch_ids: break