From c6da58060d9849eba7fcd0292a42557408492ee7 Mon Sep 17 00:00:00 2001 From: Mikei386 <44135113+Mikei386@users.noreply.github.com> Date: Sat, 14 Nov 2026 16:19:44 +0100 Subject: [PATCH] Add eSUN catalog, article lookup and account deletion --- .env.example | 2 + README.md | 51 +- docs/architecture.md | 4 +- filament/admin.py | 14 +- filament/bambu_petg_catalog.py | 351 ++ filament/esun_catalog.py | 2986 +++++++++++++++++ filament/forms.py | 28 +- filament/management/commands/seed_catalog.py | 32 +- filament/middleware.py | 1 + .../migrations/0011_esun_variant_images.py | 29 + filament/models.py | 5 +- filament/static/filament/app.css | 10 + filament/static/filament/catalog.js | 7 +- filament/tests/test_admin_auth.py | 102 +- filament/tests/test_catalog.py | 178 +- filament/views.py | 47 +- .../admin/auth/user/delete_confirmation.html | 6 + templates/filament/select_variant.html | 24 +- 18 files changed, 3841 insertions(+), 36 deletions(-) create mode 100644 filament/bambu_petg_catalog.py create mode 100644 filament/esun_catalog.py create mode 100644 filament/migrations/0011_esun_variant_images.py create mode 100644 templates/admin/auth/user/delete_confirmation.html diff --git a/.env.example b/.env.example index 50c25f5..077f822 100644 --- a/.env.example +++ b/.env.example @@ -11,10 +11,12 @@ GITEA_TOKEN_PATH=./appdata/secrets/gitea_token FAM_BIND_IP=127.0.0.1 FAM_PORT=8215 DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1 +# Bei Zugriff über einen HTTPS-Reverse-Proxy die externe Origin inklusive https:// eintragen. DJANGO_CSRF_TRUSTED_ORIGINS= # Lokales HTTP: 0. Für HTTPS im Betrieb auf 1 ändern! DJANGO_COOKIE_SECURE=0 DJANGO_SECURE_SSL_REDIRECT=0 +# Nur einschalten, wenn ausschließlich der eigene Proxy das Backend erreicht und den Header setzt. DJANGO_TRUST_PROXY=0 DJANGO_HSTS_SECONDS=0 SEED_CATALOG=1 diff --git a/README.md b/README.md index b2c63d0..66e4bfa 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Keine SPA, keine externen Schriften/Skripte, kein externer Datenbankserver. - Die Bestellhistorie zeigt die bestellten, eingetroffenen und übergebenen Positionen der Gruppe. Bestell- und Übergabezeitpunkte werden bei den jeweiligen Statuswechseln gespeichert. - Deaktivierte Varianten bleiben in vorhandenen Positionen sichtbar, sind nicht neu wählbar. -- Einmalig ladbare Startkataloge für Bambu Lab und SUNLU sowie konsistentes +- Einmalig ladbare Startkataloge für Bambu Lab, SUNLU und eSUN sowie konsistentes SQLite-Online-Backup. Unter „Spule verbraucht“ lässt sich eine Rolle ausbuchen und dieselbe Variante optional in @@ -134,9 +134,12 @@ docker compose exec --user 99:100 app /app/runtime/venv/bin/python /app/runtime/ **Individuelles Passwort mit mindestens 12 Zeichen** wählen und erst am verdeckten Prompt tippen. Kein Standardpasswort, keine automatisch angelegten Benutzer. Passwortvalidierung nicht umgehen. -Unter `/admin/` die weiteren normalen Konten mit jeweils eigenen Passwörtern anlegen. Deaktivieren -statt Löschen erhält ihre Daten. Private Bestände, Drucker und Profilfelder sind nicht im Admin -freigegeben; auch Administratoren erhalten dort keinen privaten Daten-Bypass. +Unter `/admin/` die weiteren normalen Konten mit jeweils eigenen Passwörtern anlegen. +Zum endgültigen Entfernen unter **Benutzer** das gewünschte Konto öffnen, **Löschen** wählen +und bestätigen. Dabei werden auch dessen Bestand, Bestellwünsche samt Bestellhistorie, +Drucker, Freigaben und gesendetes Feedback gelöscht. Beim Deaktivieren bleiben die Daten erhalten. +Die Löschbestätigung zeigt die Anzahl der zugehörigen Datensätze. Private Bestände, Drucker +und Profilfelder haben keine eigene Ansicht im Admin. Bei abweichenden PUID/PGID stets dieselben numerischen IDs für Management-Befehle verwenden. `FAM_DATA_DIR=/data` muss auch im Container-ENV gesetzt sein, damit `docker exec` dieselbe DB nutzt. @@ -160,7 +163,7 @@ Alle Angaben sind Container-ENV; `.env.example` enthält die Compose-Variablenna | `DJANGO_SECURE_SSL_REDIRECT` | `0`, bei korrekt eingerichtetem HTTPS-Proxy `1` | | `DJANGO_TRUST_PROXY` | `0`, nur bei isoliertem vertrauenswürdigem Reverse Proxy `1` | | `DJANGO_HSTS_SECONDS` | `0`, erst nach verifiziertem HTTPS aktivieren | -| `SEED_CATALOG` | Beispiel `1`: importiert die Startkataloge von Bambu Lab und SUNLU jeweils einmalig | +| `SEED_CATALOG` | Beispiel `1`: importiert die Startkataloge von Bambu Lab, SUNLU und eSUN jeweils einmalig | Compose-spezifisch: `FAM_IMAGE`, `FAM_APP_PATH`, `FAM_DATA_PATH`, `GITEA_TOKEN_PATH`, `FAM_BIND_IP` und `FAM_PORT`. Keine Secret-Werte, nur Einstellungen und Dateipfade. @@ -175,9 +178,28 @@ Optional `DJANGO_SECRET_KEY_FILE` mit einer für die Laufzeit-UID lesbaren Secre Nicht ungeschützt ins Internet veröffentlichen. Für produktive Zugriffe TLS und einen Login-Ratenbegrenzer am Reverse Proxy einrichten; **die App enthält keinen eigenen Brute-Force-Ratenbegrenzer**, auch nicht für `/admin/login/`. -Bei `DJANGO_TRUST_PROXY=1` darf nur der vertrauenswürdige Proxy das Backend erreichen und muss -fremde `X-Forwarded-Proto`-Header verwerfen/selbst setzen. Reines lokales HTTP ist ein -Test-/LAN-Backend-Modus, keine Zusicherung für einen sicheren Internetbetrieb. +Für Zugriff über einen eigenen HTTPS-Reverse-Proxy die folgenden Werte in der Compose-`.env` +oder als Container-Variablen in Unraid setzen. `filament.example.org` durch den Hostnamen aus +der Browseradresse ersetzen. + +```dotenv +DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,filament.example.org +DJANGO_CSRF_TRUSTED_ORIGINS=https://filament.example.org +DJANGO_COOKIE_SECURE=1 +DJANGO_TRUST_PROXY=1 +``` + +`DJANGO_CSRF_TRUSTED_ORIGINS` erwartet die externe Adresse mit Schema und bei abweichendem +Standardport inklusive Port, jeweils ohne Pfad oder abschließenden Schrägstrich. +Der Proxy gibt den öffentlichen `Host` samt gegebenenfalls explizitem Port weiter +und ersetzt `X-Forwarded-Proto` mit dem tatsächlichen Client-Protokoll. Bei +`DJANGO_TRUST_PROXY=1` muss das Backend ausschließlich über den eigenen Proxy erreichbar sein. +In Unraid die Änderung über **Docker → Fil-A-Management → Bearbeiten → Anwenden** übernehmen. +Bei Compose den Container mit `docker compose up -d` neu erstellen lassen. Die Anmeldeseite +anschließend über dieselbe externe HTTPS-Adresse frisch laden. + +Falls die Anmeldung weiter mit 403 fehlschlägt, steht der konkrete Grund im App-Log hinter +`Origin checking failed`, `Referer checking failed` oder `CSRF cookie not set`. `/healthz/` prüft SQLite und gibt nur `{"status":"ok"}` aus; für interne Tests keine HTTPS-Umleitung. Alternativ zu HTTPS wird ein **separater lesender SSH-Deploy-Key** unterstützt: @@ -293,6 +315,11 @@ Farb-/Spulenkombinationen einschließlich technischer und Supportfilamente. Zube CMYK-Verkaufspaket sind keine einzeln auswählbaren Filamentvarianten und deshalb ausgenommen; dessen enthaltene PLA-Basic-Farben sind bereits einzeln vorhanden. +Ein eigener Einmal-Import ergänzt [PETG Basic](https://eu.store.bambulab.com/products/petg-basic) +und [PETG Matte](https://eu.store.bambulab.com/products/petg-matte) auch in bestehenden +Datenbanken. Die 42 zusätzlichen Varianten umfassen 21 Farben mit Spule und als Refill +inklusive Artikelnummern, Herstellerfarbwerten und Produktbildern. + Der [deutsche SUNLU-Shop](https://de.store.sunlu.com/collections/3d-drucker-filament) liefert einen zweiten Startkatalog mit 67 Produkt-/Gewichtsausführungen und 561 Varianten aus dem öffentlichen Shopfeed vom 14. November 2026. Er enthält Spulen, Refill und größere @@ -301,6 +328,14 @@ dem Shopfeed. Wo SUNLU einen zuordenbaren Hexwert veröffentlicht, wird eine Far hinterlegt. Wenn das Angebot mehrere Rollengewichte unter derselben SKU führt, bleibt das einzelne Nettogewicht offen. +Der **eSUN-Startkatalog** enthält 50 Produkt-/Gewichtsausführungen und 438 bestätigte +Farb-/Spulenkombinationen aus den [offiziellen Shopangeboten](https://eu.esun3dstore.com/), +ergänzt um Einträge aus dem [eSUN-EU-Shop](https://esun3dstoreeu.com/). +Stand ist der 14. November 2026. Enthalten sind einzelne Spulen und Refill mit 1,75 mm. +Produktbilder und [Herstellerfarbwerte](https://www.esun3d.com/pla-pro-product) sind bei +eindeutiger Zuordnung hinterlegt. Die Artikelnummern bleiben ohne verifizierbare Angabe frei +und können im Admin ergänzt werden. + Die Datenstände werden mit dem Programm ausgeliefert und beim Start nicht aus dem Shop nachgeladen. Der erste erfolgreiche Import wird je Hersteller in der Datenbank markiert. Spätere Aufrufe überspringen den Import vollständig, sodass lokale Löschungen, Deaktivierungen, Umbenennungen und Ergänzungen diff --git a/docs/architecture.md b/docs/architecture.md index 0f7c7fe..2100412 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -16,7 +16,9 @@ User 1 ── n Printer - Farbcode, Nettogewicht und Durchmesser sind optionale Varianteneigenschaften. - Bestand und Bestellwünsche sind getrennte Tabellen. Pro `(owner, variant)` existiert höchstens eine Position; Datenbank-Constraints begrenzen Mengen auf 1–9999. -- Geschützte Katalog-Fremdschlüssel sowie das Deaktivieren statt Löschen erhalten Referenzen. +- Geschützte Katalog-Fremdschlüssel und das Deaktivieren von Varianten erhalten Katalogreferenzen. +- Beim bestätigten Löschen eines Kontos entfernt Django kaskadierend dessen Bestand, Bestellungen + samt Historie, Drucker, Freigaben und Feedback. - Drucker gehören nur einer Person; Hersteller/Modell sind unabhängig vom Filamentkatalog. - Das Profil ist das bestehende Django-User-Modell, ohne öffentliche Profil-/ID-Route. In gemeinsamen Bestellwünschen erscheint ausschließlich der Benutzername, nicht Name/E-Mail. diff --git a/filament/admin.py b/filament/admin.py index 45e5d6b..6960e58 100644 --- a/filament/admin.py +++ b/filament/admin.py @@ -24,6 +24,8 @@ class AccountAdmin(UserAdmin): search_fields = ("username",) ordering = ("username",) filter_horizontal = () + actions = None + delete_confirmation_template = "admin/auth/user/delete_confirmation.html" def lookup_allowed(self, lookup, value, request=None): # Django normally permits direct filters on all local model fields. @@ -35,7 +37,17 @@ class AccountAdmin(UserAdmin): } and super().lookup_allowed(lookup, value, request) def has_delete_permission(self, request, obj=None): - return False # Deactivate; preserve requests, ownership and private data. + if obj is not None: + if obj.pk == request.user.pk: + return False + if (obj.is_staff or obj.is_superuser) and not request.user.is_superuser: + return False + return super().has_delete_permission(request, obj) + + def get_deleted_objects(self, objs, request): + _, counts, perms_needed, protected = super().get_deleted_objects(objs, request) + # Show counts without disclosing private stock and printer details. + return [obj.get_username() for obj in objs], counts, perms_needed, protected @admin.register(Manufacturer, Color) diff --git a/filament/bambu_petg_catalog.py b/filament/bambu_petg_catalog.py new file mode 100644 index 0000000..5dd1ffe --- /dev/null +++ b/filament/bambu_petg_catalog.py @@ -0,0 +1,351 @@ +"""PETG Basic and PETG Matte from the current Bambu Lab EU store. + +Color codes, spool options, net weights and images are from each product’s +structured data. Swatches come from the hex code tables linked on those pages. +Snapshot taken on 14 November 2026. +""" + +BAMBU_PETG_CATALOG = { + "PETG Basic": ( + # https://eu.store.bambulab.com/products/petg-basic + ( + "Orange", + "refill", + "30301", + 1000, + "#FF671F", + "https://store.bblcdn.eu/s8/default/2aec282c1ec545f880a7aa75fbec8f95/PETG_Basic_orange.jpg", + ), + ( + "Orange", + "spool", + "30301", + 1000, + "#FF671F", + "https://store.bblcdn.eu/s8/default/2aec282c1ec545f880a7aa75fbec8f95/PETG_Basic_orange.jpg", + ), + ( + "Red", + "refill", + "30201", + 1000, + "#D6001C", + "https://store.bblcdn.eu/s8/default/ff07f59007e94090af967488b25de3d3/RED.png", + ), + ( + "Red", + "spool", + "30201", + 1000, + "#D6001C", + "https://store.bblcdn.eu/s8/default/ff07f59007e94090af967488b25de3d3/RED.png", + ), + ( + "Yellow", + "refill", + "30402", + 1000, + "#FCE300", + "https://store.bblcdn.eu/s8/default/7fe9bf3f4d12489386370193fb02850c/YELLOW.png", + ), + ( + "Yellow", + "spool", + "30402", + 1000, + "#FCE300", + "https://store.bblcdn.eu/s8/default/7fe9bf3f4d12489386370193fb02850c/YELLOW.png", + ), + ( + "Green", + "refill", + "30502", + 1000, + "#009639", + "https://store.bblcdn.eu/s8/default/ccc39455d1fd4669ba583c3da3eff47b/Green_1.jpg", + ), + ( + "Green", + "spool", + "30502", + 1000, + "#009639", + "https://store.bblcdn.eu/s8/default/ccc39455d1fd4669ba583c3da3eff47b/Green_1.jpg", + ), + ( + "Navy Blue", + "refill", + "30604", + 1000, + "#0086D6", + "https://store.bblcdn.eu/s8/default/a3f70e8ec1ba4d90808e92edcf28f17d/Navy_Blue_1.jpg", + ), + ( + "Navy Blue", + "spool", + "30604", + 1000, + "#0086D6", + "https://store.bblcdn.eu/s8/default/a3f70e8ec1ba4d90808e92edcf28f17d/Navy_Blue_1.jpg", + ), + ( + "Reflex Blue", + "refill", + "30603", + 1000, + "#001489", + "https://store.bblcdn.eu/s8/default/9cad6210e4184cf28c1006b4a612c87f/REFLEX_BLUE.png", + ), + ( + "Reflex Blue", + "spool", + "30603", + 1000, + "#001489", + "https://store.bblcdn.eu/s8/default/9cad6210e4184cf28c1006b4a612c87f/REFLEX_BLUE.png", + ), + ( + "Dark Beige", + "refill", + "30403", + 1000, + "#DBC8B6", + "https://store.bblcdn.eu/s8/default/86f7a87158834e79813b43badc1b26af/Dark_Beige_1.jpg", + ), + ( + "Dark Beige", + "spool", + "30403", + 1000, + "#DBC8B6", + "https://store.bblcdn.eu/s8/default/86f7a87158834e79813b43badc1b26af/Dark_Beige_1.jpg", + ), + ( + "White", + "refill", + "30106", + 1000, + "#FFFFFF", + "https://store.bblcdn.eu/s8/default/523e094a800f4064bf5d93daa1d05a08/WHITE.png", + ), + ( + "White", + "spool", + "30106", + 1000, + "#FFFFFF", + "https://store.bblcdn.eu/s8/default/523e094a800f4064bf5d93daa1d05a08/WHITE.png", + ), + ( + "Black", + "refill", + "30105", + 1000, + "#000000", + "https://store.bblcdn.eu/s8/default/c5cd4b9fed76448d8611f956a92b0ea7/Black.png", + ), + ( + "Black", + "spool", + "30105", + 1000, + "#000000", + "https://store.bblcdn.eu/s8/default/c5cd4b9fed76448d8611f956a92b0ea7/Black.png", + ), + ( + "Dark Brown", + "refill", + "30800", + 1000, + "#4F2C1D", + "https://store.bblcdn.eu/s8/default/fcacc5422e634ae7975f57b970504c36/BARK_BROWN.png", + ), + ( + "Dark Brown", + "spool", + "30800", + 1000, + "#4F2C1D", + "https://store.bblcdn.eu/s8/default/fcacc5422e634ae7975f57b970504c36/BARK_BROWN.png", + ), + ( + "Gray", + "refill", + "30107", + 1000, + "#7F7E83", + "https://store.bblcdn.eu/s8/default/05d2eea2bf4d426faa7614da8069e354/GRAY.png", + ), + ( + "Gray", + "spool", + "30107", + 1000, + "#7F7E83", + "https://store.bblcdn.eu/s8/default/05d2eea2bf4d426faa7614da8069e354/GRAY.png", + ), + ( + "Misty Blue", + "refill", + "30108", + 1000, + "#688197", + "https://store.bblcdn.eu/s8/default/4825e2d206bd4e39bf7ef7c13bbdf20e/Misty_Blue_1.jpg", + ), + ( + "Misty Blue", + "spool", + "30108", + 1000, + "#688197", + "https://store.bblcdn.eu/s8/default/4825e2d206bd4e39bf7ef7c13bbdf20e/Misty_Blue_1.jpg", + ), + ( + "Pine Green", + "refill", + "30503", + 1000, + "#034638", + "https://store.bblcdn.eu/s8/default/d8a399750c884985b22f700e99623fa1/Pine_Green_1.jpg", + ), + ( + "Pine Green", + "spool", + "30503", + 1000, + "#034638", + "https://store.bblcdn.eu/s8/default/d8a399750c884985b22f700e99623fa1/Pine_Green_1.jpg", + ), + ), + "PETG Matte": ( + # https://eu.store.bambulab.com/products/petg-matte + ( + "Black", + "refill", + "35101", + 1000, + "#000000", + "https://store.bblcdn.eu/s8/default/d70a3897529942a9b9ef310ee10112d0/black.png", + ), + ( + "Black", + "spool", + "35101", + 1000, + "#000000", + "https://store.bblcdn.eu/s8/default/d70a3897529942a9b9ef310ee10112d0/black.png", + ), + ( + "White", + "refill", + "35100", + 1000, + "#FFFFFF", + "https://store.bblcdn.eu/s8/default/7b8cfec40dc74d2585056b9c2406a7f7/07-compressed.jpg", + ), + ( + "White", + "spool", + "35100", + 1000, + "#FFFFFF", + "https://store.bblcdn.eu/s8/default/7b8cfec40dc74d2585056b9c2406a7f7/07-compressed.jpg", + ), + ( + "Gray", + "refill", + "35102", + 1000, + "#7F7E83", + "https://store.bblcdn.eu/s8/default/2a77f7dfe46b4bdf957fd8115aadda0a/04-compressed.jpg", + ), + ( + "Gray", + "spool", + "35102", + 1000, + "#7F7E83", + "https://store.bblcdn.eu/s8/default/2a77f7dfe46b4bdf957fd8115aadda0a/04-compressed.jpg", + ), + ( + "Pink", + "refill", + "35700", + 1000, + "#FABBCB", + "https://store.bblcdn.eu/s8/default/20964b7502cb4623a32e4b4024aff384/02-compressed.jpg", + ), + ( + "Pink", + "spool", + "35700", + 1000, + "#FABBCB", + "https://store.bblcdn.eu/s8/default/20964b7502cb4623a32e4b4024aff384/02-compressed.jpg", + ), + ( + "Violet", + "refill", + "35702", + 1000, + "#A7A4E0", + "https://store.bblcdn.eu/s8/default/97bfea817df947498fa49a83ba3b44d7/08-compressed.jpg", + ), + ( + "Violet", + "spool", + "35702", + 1000, + "#A7A4E0", + "https://store.bblcdn.eu/s8/default/97bfea817df947498fa49a83ba3b44d7/08-compressed.jpg", + ), + ( + "Baby Blue", + "refill", + "35600", + 1000, + "#B9D9EB", + "https://store.bblcdn.eu/s8/default/502a01ccf9db42e4974cdbf748cb7a91/03-compressed.jpg", + ), + ( + "Baby Blue", + "spool", + "35600", + 1000, + "#B9D9EB", + "https://store.bblcdn.eu/s8/default/502a01ccf9db42e4974cdbf748cb7a91/03-compressed.jpg", + ), + ( + "Avocado Green", + "refill", + "35501", + 1000, + "#BCE194", + "https://store.bblcdn.eu/s8/default/f9d466844bea4f65ac3424ed245be52f/06-compressed.jpg", + ), + ( + "Avocado Green", + "spool", + "35501", + 1000, + "#BCE194", + "https://store.bblcdn.eu/s8/default/f9d466844bea4f65ac3424ed245be52f/06-compressed.jpg", + ), + ( + "Lime", + "refill", + "35500", + 1000, + "#C0DF16", + "https://store.bblcdn.eu/s8/default/54e6fd898f2c492d935e1acb2c18e8bc/05-compressed.jpg", + ), + ( + "Lime", + "spool", + "35500", + 1000, + "#C0DF16", + "https://store.bblcdn.eu/s8/default/54e6fd898f2c492d935e1acb2c18e8bc/05-compressed.jpg", + ), + ), +} diff --git a/filament/esun_catalog.py b/filament/esun_catalog.py new file mode 100644 index 0000000..054f8d3 --- /dev/null +++ b/filament/esun_catalog.py @@ -0,0 +1,2986 @@ +"""eSUN starter catalog from the official EU shops, snapshot 2026-11-14. + +Only single 1.75 mm rolls and refills are included. Color names, weights and +images come from the product listings, and swatches from the eSUN product pages. +Entries use (color name, spool type, article number, grams, swatch, image URL). +The storefront did not provide a verified article number for these variants. +""" + +ESUN_CATALOG = { + "ABS CF": ( + # https://eu.esun3dstore.com/products/abs-cf + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/bb68245a37.jpg", + ), + ( + "Dark Blue", + "spool", + "", + 1000, + "#262431", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/82e75250a3.jpg", + ), + ( + "Dark Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/ce7a12ee79.jpg", + ), + ( + "Dark Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/e541c49058.jpg", + ), + ( + "Dark Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/070a5ffeb2.jpg", + ), + ), + "ABS ESD": ( + # https://eu.esun3dstore.com/products/abs-esd + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/18/products/1b5d1b6273.jpg", + ), + ), + "ABS Plus": ( + # https://eu.esun3dstore.com/products/abs-pro + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/5ee3c1275c.jpg", + ), + ( + "Blue", + "spool", + "", + 1000, + "#01378D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/b4cef1e8a6.jpg", + ), + ( + "Cold White", + "spool", + "", + 1000, + "#DBD6DC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/73c45f3f0e.jpg", + ), + ( + "Fire Engine Red", + "spool", + "", + 1000, + "#BB2028", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/dcf3b64033.jpg", + ), + ( + "Green", + "spool", + "", + 1000, + "#1B2D39", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/6610f96804.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/9c74e14f26.jpg", + ), + ( + "Natural", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/07532a846c.jpg", + ), + ( + "Orange", + "spool", + "", + 1000, + "#FF821B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/cdae4497bc.jpg", + ), + ( + "Red", + "spool", + "", + 1000, + "#B40200", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/408e45d71a.jpg", + ), + ( + "Silver", + "spool", + "", + 1000, + "#68676C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/5651594e07.jpg", + ), + ( + "Yellow", + "spool", + "", + 1000, + "#FFFC01", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/e3117f0dca.jpg", + ), + ), + "ABS Plus HS": ( + # https://eu.esun3dstore.com/products/eabs-pro-hs + ( + "Black", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/295a30a564.jpg", + ), + ( + "Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/09dd076fbc.jpg", + ), + ( + "Cold White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/b2e64064a3.jpg", + ), + ( + "Fire Engine Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/061847e97c.jpg", + ), + ( + "Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/e34c28a5a8.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/788cba891f.jpg", + ), + ( + "Natural", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/e40f50e1d8.jpg", + ), + ( + "Orange", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/57a7032f54.jpg", + ), + ( + "Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/42057b4a0b.jpg", + ), + ( + "Silver", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/58fd4fe490.jpg", + ), + ( + "White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/d225dcaafb.jpg", + ), + ( + "Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2502/06/products/b4fbeb0220.jpg", + ), + ), + "ASA LW": ( + # https://eu.esun3dstore.com/products/esun-asa-lw-175mm-3d-filament-075kg + ( + "Black", + "spool", + "", + 750, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/28/products/343c4f5ea8.jpg", + ), + ( + "White", + "spool", + "", + 750, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/28/products/34d6a7f52f.jpg", + ), + ), + "ASA Plus": ( + # https://eu.esun3dstore.com/products/easa + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/9998b220a4.jpg", + ), + ("Blue", "spool", "", 1000, "", ""), + ( + "Cold White", + "spool", + "", + 1000, + "#DBD6DC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/2e40c77703.jpg", + ), + ( + "Green", + "spool", + "", + 1000, + "#1B2D39", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/1e6f628071.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/458ae0fcde.jpg", + ), + ( + "Red", + "spool", + "", + 1000, + "#B40200", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/338dbae366.jpg", + ), + ( + "Silver", + "spool", + "", + 1000, + "#68676C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/04/products/d53955ae8f.jpg", + ), + ( + "Warm White", + "spool", + "", + 1000, + "#E1D7D6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/6fcd8fa944.jpg", + ), + ( + "Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/d9af628544.jpg", + ), + ), + "PA": ( + # https://eu.esun3dstore.com/products/epa + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/860415eccb.jpg", + ), + ( + "Clear", + "spool", + "", + 1000, + "#DEDBCC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/dec7b1e250.jpg", + ), + ), + "PA CF": ( + # https://eu.esun3dstore.com/products/epa-cf + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2604/20/products/ee64a236ba.jpg", + ), + ), + "PA12 CF": ( + # https://eu.esun3dstore.com/products/epa12-cf + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2604/20/products/e1ade6d758.jpg", + ), + ), + "PEBA 85A": ( + # https://eu.esun3dstore.com/products/peba-85a + ( + "Black", + "spool", + "", + 800, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/9bbe9c64f5.jpg", + ), + ( + "Grey", + "spool", + "", + 800, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/7e27a609c6.jpg", + ), + ( + "White", + "spool", + "", + 800, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/38d96e2ada.jpg", + ), + ), + "PEBA 90A": ( + # https://eu.esun3dstore.com/products/peba-90a + ( + "Black", + "spool", + "", + 800, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/c0c170dac6.jpg", + ), + ( + "Grey", + "spool", + "", + 800, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/ba9a2937e4.jpg", + ), + ( + "White", + "spool", + "", + 800, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/98a31ed215.jpg", + ), + ), + "PEBA LW": ( + # https://eu.esun3dstore.com/products/peba-lw + ( + "Black", + "spool", + "", + 800, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/14cf34bbfa.jpg", + ), + ( + "Grey", + "spool", + "", + 800, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2602/06/products/4595a4eb7c.jpg", + ), + ), + "PETG": ( + # https://eu.esun3dstore.com/products/petg + ( + "Fire Engine Red", + "spool", + "", + 1000, + "#BB2028", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/9c2fd57a29.jpg", + ), + ( + "Natural", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/ac64461319.jpg", + ), + ( + "Solid Black", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/e48a384c02.jpg", + ), + ( + "Solid Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/f7d1746ef6.jpg", + ), + ( + "Solid Gold", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/69d83bbde0.jpg", + ), + ( + "Solid Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/efe8aa48a5.jpg", + ), + ( + "Solid Grey", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/4b3368131b.jpg", + ), + ( + "Solid Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/5dc3ed88fa.jpg", + ), + ( + "Solid Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/f8daf81b2a.jpg", + ), + ( + "Solid Silver", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/cf3720371b.jpg", + ), + ( + "Solid White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/b612eb63e3.jpg", + ), + ( + "Solid Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/e8d74d6f85.jpg", + ), + ( + "Translucent Blue", + "spool", + "", + 1000, + "#01458E", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/0f9797a552.jpg", + ), + ( + "Translucent Green", + "spool", + "", + 1000, + "#A8E6CF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/8ef444180e.jpg", + ), + ( + "Translucent Magenta", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/151d546b48.jpg", + ), + ( + "Translucent Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2503/20/products/470631ad36.jpg", + ), + ), + "PETG Basic": ( + # https://eu.esun3dstore.com/products/petg-basic + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/aefb1cdaba.jpg", + ), + ( + "Blue", + "spool", + "", + 1000, + "#01378D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/662f02b531.jpg", + ), + ( + "Clear", + "spool", + "", + 1000, + "#DEDBCC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/90d90cca4b.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/9c43e1d3e7.jpg", + ), + ( + "Red", + "spool", + "", + 1000, + "#B40200", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/6a0129f7fd.jpg", + ), + ( + "Silver", + "spool", + "", + 1000, + "#68676C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/2b921ec843.jpg", + ), + ( + "Translucent Blue", + "spool", + "", + 1000, + "#01458E", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/fc0f212de1.jpg", + ), + ( + "Translucent Green", + "spool", + "", + 1000, + "#A8E6CF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/b86b94dfcd.jpg", + ), + ( + "Translucent Light Blue", + "spool", + "", + 1000, + "#0053B0", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/a4c92c2192.jpg", + ), + ( + "Translucent Light Green", + "spool", + "", + 1000, + "#05A59B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/678fb32d69.jpg", + ), + ( + "Translucent Light Orange", + "spool", + "", + 1000, + "#FFBD3A", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/70d2d31ccc.jpg", + ), + ( + "Translucent Light Pink", + "spool", + "", + 1000, + "#E298B3", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/42c81b13e8.jpg", + ), + ( + "Translucent Orange", + "spool", + "", + 1000, + "#D65400", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/3df90ed055.jpg", + ), + ( + "White", + "spool", + "", + 1000, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2609/30/products/c71ce40233.jpg", + ), + ), + "PETG CF": ( + # https://eu.esun3dstore.com/products/petg-cf + ( + "Antique Brass", + "spool", + "", + 1000, + "#A8918B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2411/29/products/ed758d2354.jpg", + ), + ( + "Black Red", + "spool", + "", + 1000, + "#3D3D3F,#EC4235", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2411/29/products/084ab0d855.jpg", + ), + ( + "Blackish Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2411/29/products/be1de9185d.jpg", + ), + ( + "Dark Grey", + "spool", + "", + 1000, + "#5F6366", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2411/29/products/c634dc1504.jpg", + ), + ( + "Deep Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2411/29/products/0c6ac973b2.jpg", + ), + ), + "PETG ESD": ( + # https://eu.esun3dstore.com/products/petg-esd + ("Black", "spool", "", 1000, "#272729", ""), + ), + "PETG Luminous": ( + # https://eu.esun3dstore.com/products/petg-luminous + ( + "Luminous Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2606/04/products/3728dc847e.jpg", + ), + ( + "Luminous Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2606/04/products/4c6a6e3014.jpg", + ), + ), + "PETG Matte": ( + # https://eu.esun3dstore.com/products/petg-matte + ( + "Alabaster White", + "spool", + "", + 1000, + "#DDCFC2", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/4452fdaedc.jpg", + ), + ( + "Almond Yellow", + "spool", + "", + 1000, + "#E9E199", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/57c27e6f3c.jpg", + ), + ( + "Apricot", + "spool", + "", + 1000, + "#E68A1D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/7df6568e8e.jpg", + ), + ( + "Blue Brick", + "spool", + "", + 1000, + "#4A6A8B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/cbbc9fd9cc.jpg", + ), + ( + "Brick Red", + "spool", + "", + 1000, + "#9B5347", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/9732f29255.jpg", + ), + ( + "Concrete Grey", + "spool", + "", + 1000, + "#B7B7B5", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/7dd4647140.jpg", + ), + ( + "Dark Grey", + "spool", + "", + 1000, + "#5F6366", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/a1488272a3.jpg", + ), + ( + "Earth Brown", + "spool", + "", + 1000, + "#6B4423", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/27448bd352.jpg", + ), + ( + "Light Blue", + "spool", + "", + 1000, + "#169BEA", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/b97a42b3b4.jpg", + ), + ( + "Light Khaki", + "spool", + "", + 1000, + "#C6C0A8", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/2bb234a950.jpg", + ), + ( + "Lilac", + "spool", + "", + 1000, + "#C78DBF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/de51efa19a.jpg", + ), + ( + "Matcha Green", + "spool", + "", + 1000, + "#989F4F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/1fd0d78c4c.jpg", + ), + ( + "Mint Green", + "spool", + "", + 1000, + "#69C296", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/5ad85656ed.jpg", + ), + ( + "Peach Pink", + "spool", + "", + 1000, + "#EEB9B3", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/495c19d790.jpg", + ), + ( + "Terracotta", + "spool", + "", + 1000, + "#E2725B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/28/products/dd2804a6c0.jpg", + ), + ( + "White", + "spool", + "", + 1000, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/30/products/0bd609d5a9.jpg", + ), + ), + "PETG Plus HS": ( + # https://eu.esun3dstore.com/products/epetg-hs + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/f0cf7fd928.jpg", + ), + ( + "Fire Engine Red", + "spool", + "", + 1000, + "#BB2028", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/094ce85566.jpg", + ), + ( + "Solid Blue", + "spool", + "", + 1000, + "#01378D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/feb499b973.jpg", + ), + ( + "Solid Green", + "spool", + "", + 1000, + "#1B2D39", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/3ecfd0c1f4.jpg", + ), + ( + "Solid Grey", + "spool", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/02310b8bdf.jpg", + ), + ( + "Solid Orange", + "spool", + "", + 1000, + "#FF821B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/8f0fd85416.jpg", + ), + ( + "Solid Silver", + "spool", + "", + 1000, + "#68676C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/29b433e342.jpg", + ), + ( + "Solid White", + "spool", + "", + 1000, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/c6e0cb19f7.jpg", + ), + ( + "Solid Yellow", + "spool", + "", + 1000, + "#FFFC01", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/04/products/f4c2cabaee.jpg", + ), + ), + "PLA Basic": ( + # https://eu.esun3dstore.com/products/epla + ("Aqua", "spool", "", 1000, "#6BBFE3", ""), + ("Barbie Pink", "spool", "", 1000, "#FD838E", ""), + ("Beige", "spool", "", 1000, "#FDC094", ""), + ("Black", "spool", "", 1000, "#272729", ""), + ("Blue", "spool", "", 1000, "#01378D", ""), + ("Bone White", "spool", "", 1000, "#C7B494", ""), + ("Brown", "spool", "", 1000, "#664033", ""), + ("Cold White", "spool", "", 1000, "#DBD6DC", ""), + ("Concrete Grey", "spool", "", 1000, "#B7B7B5", ""), + ("Dark Blue", "spool", "", 1000, "#262431", ""), + ("Fire Engine Red", "spool", "", 1000, "#BB2028", ""), + ("Grape Purple", "spool", "", 1000, "#9E83AC", ""), + ("Green", "spool", "", 1000, "#1B2D39", ""), + ("Grey", "spool", "", 1000, "#606783", ""), + ("Holly Green", "spool", "", 1000, "#03594E", ""), + ("Light Blue", "spool", "", 1000, "#169BEA", ""), + ("Light Grey", "spool", "", 1000, "#7997B3", ""), + ("Olive Green", "spool", "", 1000, "#1B1F11", ""), + ("Orange", "spool", "", 1000, "#FF821B", ""), + ("Peak Green", "spool", "", 1000, "#38D844", ""), + ("Pink", "spool", "", 1000, "#FF7F6F", ""), + ("Purple", "spool", "", 1000, "#793EB6", ""), + ("Red", "spool", "", 1000, "#B40200", ""), + ("RGB Red", "spool", "", 1000, "#E6413F", ""), + ("Silver", "spool", "", 1000, "#68676C", ""), + ("Sky Blue", "spool", "", 1000, "#63D0F9", ""), + ("White", "spool", "", 1000, "#F6F6F6", ""), + ("Yellow", "spool", "", 1000, "#FFFC01", ""), + ), + "PLA CF": ( + # https://eu.esun3dstore.com/products/epla-cf + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/21/products/4cb77f6ce1.jpg", + ), + ( + "Brown", + "spool", + "", + 1000, + "#664033", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/21/products/a35f64cffc.jpg", + ), + ( + "Green", + "spool", + "", + 1000, + "#1B2D39", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/21/products/a8eff83d88.jpg", + ), + ( + "Purple", + "spool", + "", + 1000, + "#793EB6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/21/products/95e73a05c3.jpg", + ), + ( + "Red", + "spool", + "", + 1000, + "#B40200", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/21/products/d212168fa2.jpg", + ), + ), + "PLA Chameleon": ( + # https://eu.esun3dstore.com/products/epla-chameleon + ( + "Galaxy Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/9a0cb6976e.jpg", + ), + ( + "Nebula Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/8da7788927.jpg", + ), + ( + "Polaris", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/5b02de05f4.jpg", + ), + ( + "Raspberry Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/ce53156a2b.jpg", + ), + ( + "Tech Black", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/0a0c47a101.jpg", + ), + ), + "PLA HF": ( + # https://eu.esun3dstore.com/products/pla-hf + ( + "Grey", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/08/products/c35f38b06c.jpg", + ), + ( + "White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/08/products/3975467267.jpg", + ), + ), + "PLA LW": ( + # https://eu.esun3dstore.com/products/epla-lw + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2501/25/products/618f948a11.jpg", + ), + ( + "Natural", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2501/25/products/21ac18c230.jpg", + ), + ), + "PLA Lite": ( + # https://eu.esun3dstore.com/products/epla-lite + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/070f6f8749.jpg", + ), + ( + "Blue", + "spool", + "", + 1000, + "#01378D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/a07fb29fe8.jpg", + ), + ( + "Cold White", + "spool", + "", + 1000, + "#DBD6DC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/8c5783aa3f.jpg", + ), + ( + "Fire Engine Red", + "spool", + "", + 1000, + "#BB2028", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/f1ae6124e4.jpg", + ), + ( + "Green", + "spool", + "", + 1000, + "#1B2D39", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/6329b2f83b.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/df01d4b5ad.jpg", + ), + ( + "Periwinkle Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/808343d38e.jpg", + ), + ( + "Red", + "spool", + "", + 1000, + "#B40200", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/bda491c373.jpg", + ), + ( + "Yellow", + "spool", + "", + 1000, + "#FFFC01", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/17/products/749bd18664.jpg", + ), + ), + "PLA Luminous": ( + # https://eu.esun3dstore.com/products/epla-luminous + ( + "Luminous Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2501/02/products/ff172fbfa6.jpg", + ), + ( + "Luminous Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2501/02/products/de2f5d3490.jpg", + ), + ), + "PLA Luminous Rainbow": ( + # https://eu.esun3dstore.com/products/epla-luminous-rainbow + ("Rainbow A", "spool", "", 1000, "#DE946F", ""), + ), + "PLA Magic": ( + # https://eu.esun3dstore.com/products/epla-magic + ( + "Dark Twinkling Blue", + "spool", + "", + 1000, + "#264C97", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/d9a3fc2f4a.jpg", + ), + ( + "Dark Twinkling Gold", + "spool", + "", + 1000, + "#CBEACA", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/4e88a52b9b.jpg", + ), + ( + "Dark Twinkling Green", + "spool", + "", + 1000, + "#658965", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/58838c0b21.jpg", + ), + ( + "Dark Twinkling Purple", + "spool", + "", + 1000, + "#904B68", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/953d27a729.jpg", + ), + ), + "PLA Marble": ( + # https://eu.esun3dstore.com/products/epla-marble + ("Grey", "spool", "", 1000, "#606783", ""), + ), + "PLA Matte": ( + # https://eu.esun3dstore.com/products/epla-matte + ( + "Almond Yellow", + "spool", + "", + 1000, + "#E9E199", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/3835dbee05.jpg", + ), + ( + "Aqua", + "spool", + "", + 1000, + "#6BBFE3", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/27/products/817cc3f8ed.jpg", + ), + ( + "Black White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/0511c93993.jpg", + ), + ( + "Brown", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/27/products/6dfe7886a8.jpg", + ), + ( + "Concrete Grey", + "spool", + "", + 1000, + "#B7B7B5", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/27/products/67de0c9f41.jpg", + ), + ( + "Dark Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/27/products/8c95959518.jpg", + ), + ( + "Dark Grey", + "spool", + "", + 1000, + "#5F6366", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/0d62eb6e1c.jpg", + ), + ( + "Deep Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/f26aab4ecc.jpg", + ), + ( + "Fire Engine Red", + "spool", + "", + 1000, + "#BB2028", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/27/products/f55a0301ac.jpg", + ), + ( + "Fruit Candy", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/04/products/9f2d64d1f6.jpg", + ), + ( + "Green Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/12a1090a40.jpg", + ), + ( + "Green Pink", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/a56dbab861.jpg", + ), + ( + "Green Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/d993d8668e.jpg", + ), + ( + "Lake Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/3fc4a415c7.jpg", + ), + ( + "Light Khaki", + "spool", + "", + 1000, + "#C6C0A8", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/99663d9cac.jpg", + ), + ( + "Lilac", + "spool", + "", + 1000, + "#C78DBF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/32b4da1364.jpg", + ), + ( + "Macaron", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/be28c9e619.jpg", + ), + ( + "Matcha Green", + "spool", + "", + 1000, + "#989F4F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/a58d5e82bc.jpg", + ), + ( + "Milky White", + "spool", + "", + 1000, + "#C9C9C9", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/31948269f0.jpg", + ), + ( + "Mint Green", + "spool", + "", + 1000, + "#69C296", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/1c47b912ea.jpg", + ), + ( + "Morandi Green", + "spool", + "", + 1000, + "#0D353D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/a62b54d7e5.jpg", + ), + ( + "Morandi Purple", + "spool", + "", + 1000, + "#C17B7D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/b69ddf918f.jpg", + ), + ( + "Ocean", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/e5f8bd11af.jpg", + ), + ( + "Olive Green", + "spool", + "", + 1000, + "#1B1F11", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/27/products/f00e48ddcb.jpg", + ), + ( + "Paddy Field", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/9a7e770f2f.jpg", + ), + ( + "Peach Pink", + "spool", + "", + 1000, + "#EEB9B3", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/d0f54f2a58.jpg", + ), + ( + "Purple Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/e024163a18.jpg", + ), + ( + "Purple Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/4a324ec09f.jpg", + ), + ( + "Rainbow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/ef028660be.jpg", + ), + ( + "Red Black", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/2aa2b2d50c.jpg", + ), + ( + "Red Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/4fd5fd5af7.jpg", + ), + ( + "Strawberry Red", + "spool", + "", + 1000, + "#F18579", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/a38fbafe36.jpg", + ), + ( + "Sunrise", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/65d41ab225.jpg", + ), + ( + "Tangerine", + "spool", + "", + 1000, + "#CE4D0B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/762e8ec49b.jpg", + ), + ), + "PLA Metal": ( + # https://esun3dstoreeu.com/products/epla-metal + ("Bronze", "spool", "", 1000, "", ""), + ("Gold", "spool", "", 1000, "", ""), + ), + "PLA Plus": ( + # https://eu.esun3dstore.com/products/pla-pro + ("Almond Yellow", "spool", "", 1000, "#E9E199", ""), + ("Apricot", "spool", "", 1000, "#E68A1D", ""), + ("Aqua", "spool", "", 1000, "#6BBFE3", ""), + ("Beige", "spool", "", 1000, "#FDC094", ""), + ("Black", "spool", "", 1000, "#272729", ""), + ("Blue", "spool", "", 1000, "#01378D", ""), + ("Bone White", "spool", "", 1000, "#C7B494", ""), + ("Brick Red", "spool", "", 1000, "#9B5347", ""), + ("Brown", "spool", "", 1000, "#664033", ""), + ("Cold White", "spool", "", 1000, "#DBD6DC", ""), + ("Concrete Grey", "spool", "", 1000, "#B7B7B5", ""), + ("Coral Orange", "spool", "", 1000, "#FF8C49", ""), + ("Dark Blue", "spool", "", 1000, "#262431", ""), + ("Fire Engine Red", "spool", "", 1000, "#BB2028", ""), + ("Gold", "spool", "", 1000, "#EDA10F", ""), + ("Grass Green", "spool", "", 1000, "#2B6439", ""), + ("Green", "spool", "", 1000, "#1B2D39", ""), + ("Grey", "spool", "", 1000, "#606783", ""), + ("Haze Blue", "spool", "", 1000, "#7AB9EF", ""), + ("Holly Green", "spool", "", 1000, "#03594E", ""), + ("Jade Green", "spool", "", 1000, "#53ECD0", ""), + ("Light Beige", "spool", "", 1000, "#E5C0A3", ""), + ("Light Blue", "spool", "", 1000, "#169BEA", ""), + ("Light Brown", "spool", "", 1000, "#C99367", ""), + ("Light Khaki", "spool", "", 1000, "#C6C0A8", ""), + ("Lilac", "spool", "", 1000, "#C78DBF", ""), + ("Magenta", "spool", "", 1000, "#E02552", ""), + ("Matcha Green", "spool", "", 1000, "#989F4F", ""), + ("Milky White", "spool", "", 1000, "#C9C9C9", ""), + ("Mint Green", "spool", "", 1000, "#69C296", ""), + ("Mustard Green", "spool", "", 1000, "#E4E6A5", ""), + ("Olive Green", "spool", "", 1000, "#1B1F11", ""), + ("Orange", "spool", "", 1000, "#FF821B", ""), + ("Peach Pink", "spool", "", 1000, "#EEB9B3", ""), + ("Peak Green", "spool", "", 1000, "#38D844", ""), + ("Pine Green", "spool", "", 1000, "#43634E", ""), + ("Pink", "spool", "", 1000, "#FF7F6F", ""), + ("Purple", "spool", "", 1000, "#793EB6", ""), + ("Red", "spool", "", 1000, "#B40200", ""), + ("RGB Blue", "spool", "", 1000, "#1E4FCF", ""), + ("RGB Green", "spool", "", 1000, "#9AEE74", ""), + ("RGB Red", "spool", "", 1000, "#E6413F", ""), + ("Silver", "spool", "", 1000, "#68676C", ""), + ("Soft Blue", "spool", "", 1000, "#71D6E8", ""), + ("Soft Pink", "spool", "", 1000, "#F89F93", ""), + ("Space Blue", "spool", "", 1000, "#50D3FF", ""), + ("Very Peri", "spool", "", 1000, "#22047E", ""), + ("White", "spool", "", 1000, "#F6F6F6", ""), + ("Yellow", "spool", "", 1000, "#FFFC01", ""), + # https://eu.esun3dstore.com/products/pla-refilament + ( + "Almond Yellow", + "refill", + "", + 1000, + "#E9E199", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/8ad36d7d5e.jpg", + ), + ( + "Apricot", + "refill", + "", + 1000, + "#E68A1D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/53a27decf1.jpg", + ), + ( + "Aqua", + "refill", + "", + 1000, + "#6BBFE3", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/67e2b5468f.jpg", + ), + ( + "Beige", + "refill", + "", + 1000, + "#FDC094", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/c1d7fc5beb.jpg", + ), + ( + "Black", + "refill", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/b28b14e8aa.jpg", + ), + ( + "Blue", + "refill", + "", + 1000, + "#01378D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/44d9d7b516.jpg", + ), + ( + "Bone White", + "refill", + "", + 1000, + "#C7B494", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/b985ac4f71.jpg", + ), + ( + "Brick Red", + "refill", + "", + 1000, + "#9B5347", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/26/products/ff3cb299a6.jpg", + ), + ( + "Brown", + "refill", + "", + 1000, + "#664033", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/099dab9342.jpg", + ), + ( + "Cold White", + "refill", + "", + 1000, + "#DBD6DC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/26/products/084c7854bb.jpg", + ), + ( + "Concrete Grey", + "refill", + "", + 1000, + "#B7B7B5", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/26/products/fe4b143b7b.jpg", + ), + ( + "Coral Orange", + "refill", + "", + 1000, + "#FF8C49", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/1bccd82850.jpg", + ), + ( + "Dark Blue", + "refill", + "", + 1000, + "#262431", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/1a82037760.jpg", + ), + ( + "Fire Engine Red", + "refill", + "", + 1000, + "#BB2028", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/94813cf7e4.jpg", + ), + ( + "Gold", + "refill", + "", + 1000, + "#EDA10F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/41192c7a3f.jpg", + ), + ( + "Grass Green", + "refill", + "", + 1000, + "#2B6439", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/8ceba7feec.jpg", + ), + ( + "Green", + "refill", + "", + 1000, + "#1B2D39", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/d357061d7c.jpg", + ), + ( + "Grey", + "refill", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/857a7c68b8.jpg", + ), + ( + "Haze Blue", + "refill", + "", + 1000, + "#7AB9EF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/4580f57dd6.jpg", + ), + ( + "Holly Green", + "refill", + "", + 1000, + "#03594E", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/26/products/da3b49679d.jpg", + ), + ( + "Jade Green", + "refill", + "", + 1000, + "#53ECD0", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/ff984e542a.jpg", + ), + ( + "Light Blue", + "refill", + "", + 1000, + "#169BEA", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/38819c4ce8.jpg", + ), + ( + "Light Brown", + "refill", + "", + 1000, + "#C99367", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/11ef591e92.jpg", + ), + ( + "Light Khaki", + "refill", + "", + 1000, + "#C6C0A8", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/23f6564cf8.jpg", + ), + ( + "Lilac", + "refill", + "", + 1000, + "#C78DBF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/480a7b3464.jpg", + ), + ( + "Magenta", + "refill", + "", + 1000, + "#E02552", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/fcfc2c6bb6.jpg", + ), + ( + "Matcha Green", + "refill", + "", + 1000, + "#989F4F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/9f5bcf83da.jpg", + ), + ( + "Milky White", + "refill", + "", + 1000, + "#C9C9C9", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/9dcca2ba83.jpg", + ), + ( + "Mint Green", + "refill", + "", + 1000, + "#69C296", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/a86d55de7c.jpg", + ), + ( + "Mustard Green", + "refill", + "", + 1000, + "#E4E6A5", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/dd307c7d7d.jpg", + ), + ( + "Olive Green", + "refill", + "", + 1000, + "#1B1F11", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/e986ee4d18.jpg", + ), + ( + "Orange", + "refill", + "", + 1000, + "#FF821B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/372071c630.jpg", + ), + ( + "Peach Pink", + "refill", + "", + 1000, + "#EEB9B3", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/e3fdec8ed7.jpg", + ), + ( + "Peak Green", + "refill", + "", + 1000, + "#38D844", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/b897347c4a.jpg", + ), + ( + "Pine Green", + "refill", + "", + 1000, + "#43634E", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/882b16ad0c.jpg", + ), + ( + "Pink", + "refill", + "", + 1000, + "#FF7F6F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/9f475dcc16.jpg", + ), + ( + "Purple", + "refill", + "", + 1000, + "#793EB6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/089ec68d77.jpg", + ), + ( + "Red", + "refill", + "", + 1000, + "#B40200", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/d1998f57b9.jpg", + ), + ( + "RGB Blue", + "refill", + "", + 1000, + "#1E4FCF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/56b37d5e81.jpg", + ), + ( + "RGB Green", + "refill", + "", + 1000, + "#9AEE74", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/1dde3bd7f0.jpg", + ), + ( + "RGB Red", + "refill", + "", + 1000, + "#E6413F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/2e88481a28.jpg", + ), + ( + "Silver", + "refill", + "", + 1000, + "#68676C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/90fe918d75.jpg", + ), + ( + "Soft Blue", + "refill", + "", + 1000, + "#71D6E8", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/829a2d3983.jpg", + ), + ( + "Soft Pink", + "refill", + "", + 1000, + "#F89F93", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/29/products/14cd824788.jpg", + ), + ( + "Space Blue", + "refill", + "", + 1000, + "#50D3FF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/931e2f39f1.jpg", + ), + ( + "Very Peri", + "refill", + "", + 1000, + "#22047E", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/25ae315967.jpg", + ), + ( + "White", + "refill", + "", + 1000, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/26/products/25295eab95.jpg", + ), + ( + "Yellow", + "refill", + "", + 1000, + "#FFFC01", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2510/17/products/fb4fbf91dc.jpg", + ), + ), + "PLA Plus (3 kg)": ( + # https://eu.esun3dstore.com/products/pla-pro-3kg-spool + ( + "Black", + "spool", + "", + 3000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/25/products/6d4b88d8b1.jpg", + ), + ( + "Blue", + "spool", + "", + 3000, + "#01378D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/29/products/e642611aec.jpg", + ), + ( + "Bone White", + "spool", + "", + 3000, + "#C7B494", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/25/products/4dadef39d8.jpg", + ), + ( + "Brown", + "spool", + "", + 3000, + "#664033", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/29/products/15e3757772.jpg", + ), + ( + "Cold White", + "spool", + "", + 3000, + "#DBD6DC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/25/products/9e90fc289e.jpg", + ), + ( + "Fire Engine Red", + "spool", + "", + 3000, + "#BB2028", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/29/products/ba6daeb5c1.jpg", + ), + ( + "Grey", + "spool", + "", + 3000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/25/products/bf3d25374f.jpg", + ), + ( + "Silver", + "spool", + "", + 3000, + "#68676C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/29/products/d6b7bb563b.jpg", + ), + ( + "White", + "spool", + "", + 3000, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/19/products/baeec108b1.jpg", + ), + ( + "Yellow", + "spool", + "", + 3000, + "#FFFC01", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/29/products/aeaed4fa34.jpg", + ), + ), + "PLA Plus (5 kg)": ( + # https://eu.esun3dstore.com/products/pla-pro-5kg-spool + ( + "Black", + "spool", + "", + 5000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/19/products/91b2d455af.jpg", + ), + ( + "Cold White", + "spool", + "", + 5000, + "#DBD6DC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/19/products/c6656fdc31.jpg", + ), + ( + "Grey", + "spool", + "", + 5000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/19/products/b6907b6cc0.jpg", + ), + ), + "PLA Plus HS": ( + # https://eu.esun3dstore.com/products/epla-pro-hs + ( + "Black", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/52d7ffe931.jpg", + ), + ( + "Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/891503d73f.jpg", + ), + ( + "Bone White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/7ff0d818fc.jpg", + ), + ( + "Brown", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/a623a7c12e.jpg", + ), + ( + "Cold White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/23e5bfca4c.jpg", + ), + ( + "Fire Engine Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/ca85c408dc.jpg", + ), + ( + "Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/9b06ca99b8.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/3bd56e33de.jpg", + ), + ( + "Light Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/8dfdd52202.jpg", + ), + ( + "Olive Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/2a322616b6.jpg", + ), + ( + "Orange", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/a93fda9163.jpg", + ), + ( + "Peak Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/bd9dc31ea7.jpg", + ), + ( + "Pine Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/109bd3458c.jpg", + ), + ( + "Pink", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/7823045047.jpg", + ), + ( + "Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/8434d7db71.jpg", + ), + ( + "Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/3ab949c69b.jpg", + ), + ( + "Silver", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/3c3fdf2609.jpg", + ), + ( + "White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/eff28c793e.jpg", + ), + ( + "Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2504/18/products/f9ddf55114.jpg", + ), + ), + "PLA Rock": ( + # https://eu.esun3dstore.com/products/pla-rock + ( + "Blueschist", + "spool", + "", + 1000, + "#1160BD,#59BADD", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/4eeb8a452e.jpg", + ), + ( + "Granite", + "spool", + "", + 1000, + "#CD8D72,#E1C1AC", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/3fae5071f3.jpg", + ), + ( + "Hornfels", + "spool", + "", + 1000, + "#417D73,#B4E7E2", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/ff6d33a2b0.jpg", + ), + ( + "Limestone", + "spool", + "", + 1000, + "#454F58,#C3C8CE", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/42ee67ce82.jpg", + ), + ( + "Pegmatite", + "spool", + "", + 1000, + "#6A5F5D,#DB8C49", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/1a7e9a1add.jpg", + ), + ( + "Quartzite", + "spool", + "", + 1000, + "#BC707C,#D3B0B4", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/8556a30083.jpg", + ), + ( + "Sandstone", + "spool", + "", + 1000, + "#A9643D,#E2BAA0", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/7e98a92750.jpg", + ), + ( + "Tiger-Porphyry", + "spool", + "", + 1000, + "#505050,#B3B4AF", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2508/28/products/87446e16d7.jpg", + ), + ), + "PLA ST": ( + # https://eu.esun3dstore.com/products/epla-st + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/ce34c8b73c.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/4f543614c9.jpg", + ), + ( + "Natural", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/89d2f480df.jpg", + ), + ), + "PLA Silk": ( + # https://eu.esun3dstore.com/products/epla-silk + ( + "Silk Aqua", + "spool", + "", + 1000, + "#6BBFE3", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/f0f6a98a30.jpg", + ), + ( + "Silk Blue", + "spool", + "", + 1000, + "#01378D", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/0744da6302.jpg", + ), + ( + "Silk Bronze", + "spool", + "", + 1000, + "#9C957B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/b701eec2c2.jpg", + ), + ( + "Silk Copper", + "spool", + "", + 1000, + "#AA3D16", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/b73059b2f3.jpg", + ), + ( + "Silk Cyan", + "spool", + "", + 1000, + "#0077CB", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/fec2a2ec57.jpg", + ), + ( + "Silk Dark Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/51784c2b04.jpg", + ), + ( + "Silk Gold", + "spool", + "", + 1000, + "#EDA10F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/db9a1ced2f.jpg", + ), + ( + "Silk Green", + "spool", + "", + 1000, + "#1B2D39", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/1e8c3534c1.jpg", + ), + ( + "Silk Grey", + "spool", + "", + 1000, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/d52480ef95.jpg", + ), + ( + "Silk Light Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/43cdd48158.jpg", + ), + ( + "Silk Lime", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/ccff536b08.jpg", + ), + ( + "Silk Orange", + "spool", + "", + 1000, + "#FF821B", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/5df7bc23af.jpg", + ), + ( + "Silk Pink", + "spool", + "", + 1000, + "#FF7F6F", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/61eb8d0fe1.jpg", + ), + ( + "Silk Purple", + "spool", + "", + 1000, + "#793EB6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/92b68e281c.jpg", + ), + ( + "Silk Red", + "spool", + "", + 1000, + "#B40200", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/aadaafe7bd.jpg", + ), + ( + "Silk Rose Gold", + "spool", + "", + 1000, + "#EC896C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/f1d5d5d8cc.jpg", + ), + ( + "Silk Silver", + "spool", + "", + 1000, + "#68676C", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2605/07/products/adc977db19.jpg", + ), + ( + "Silk White", + "spool", + "", + 1000, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/17f7db17d3.jpg", + ), + ( + "Silk Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/410e924b2b.jpg", + ), + ), + "PLA Silk Candy": ( + # https://esun3dstoreeu.com/products/epla-silk-candy + ("Blue+Green", "spool", "", 1000, "", ""), + ("Gold+Blue+Green", "spool", "", 1000, "", ""), + ("Red+Gold", "spool", "", 1000, "", ""), + ("Red+Gold+Blue", "spool", "", 1000, "", ""), + ("Silver+Black", "spool", "", 1000, "", ""), + ("Silver+Blue", "spool", "", 1000, "", ""), + ), + "PLA Silk Magic": ( + # https://eu.esun3dstore.com/products/epla-silk-magic + ( + "Black+Gold", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/a3b5d68681.jpg", + ), + ( + "Black+Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/1cfee57ba4.jpg", + ), + ( + "Black+Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/e777c7e62b.jpg", + ), + ( + "Black+Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/74b14ccf84.jpg", + ), + ( + "Blue+Orange+Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/2bf2b606e7.jpg", + ), + ( + "Blue+Red+Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/109b7e111c.jpg", + ), + ( + "Blue+Silver", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/a5600e34f8.jpg", + ), + ( + "Bronze+Purple+Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/da49f8420c.jpg", + ), + ( + "Gold+Green+Black", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/50b84a4960.jpg", + ), + ( + "Gold+Red+Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/14db1923c3.jpg", + ), + ( + "Gold+Silver", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/0076068e95.jpg", + ), + ( + "Gold+Silver+Copper", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/12/products/35d4cde618.jpg", + ), + ( + "Green+Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/8d81a85c41.jpg", + ), + ( + "Purple+Gold", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/df23e17127.jpg", + ), + ( + "Red+Black+Gold", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/762b14b922.jpg", + ), + ( + "Red+Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/98fdf2073f.jpg", + ), + ( + "Red+Gold", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/95e19b7222.jpg", + ), + ( + "Red+Gold+Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/38e352cae9.jpg", + ), + ( + "Red+Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/edcb9cd9af.jpg", + ), + ( + "Red+Green+Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/f36b91c3c2.jpg", + ), + ( + "Red+Yellow+Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/272b25f9fc.jpg", + ), + ), + "PLA Silk Metal": ( + # https://esun3dstoreeu.com/products/epla-silk-metal + ("Silk Bronze", "spool", "", 1000, "", ""), + ("Silk Copper", "spool", "", 1000, "", ""), + ("Silk Gold", "spool", "", 1000, "", ""), + ("Silk Rose Gold", "spool", "", 1000, "", ""), + ("Silk Silver", "spool", "", 1000, "", ""), + ), + "PLA Silk Rainbow": ( + # https://eu.esun3dstore.com/products/epla-silk-rainbow + ( + "Coral", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/20/products/98c47b267c.jpg", + ), + ( + "Forest", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/45f797b07f.jpg", + ), + ( + "Morning Glory", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/13da0a4d62.jpg", + ), + ( + "Scorching Sun", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/06fa9053ee.jpg", + ), + ( + "Universe", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2409/13/products/3f30f11c44.jpg", + ), + ), + "PLA Stars": ( + # https://eu.esun3dstore.com/products/estars-pla + ("Galaxy Black", "spool", "", 1000, "#0B0B1A", ""), + ), + "PLA UV Color Change": ( + # https://eu.esun3dstore.com/products/pla-uv-color-change + ( + "UV Change Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2506/23/products/7379258134.jpg", + ), + ( + "UV Change Fuchsia", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2506/23/products/c49339e4a7.jpg", + ), + ( + "UV Change Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2506/23/products/4c7a2788bd.jpg", + ), + ( + "UV Change Orange", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2506/23/products/6077eac416.jpg", + ), + ( + "UV Change Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2506/23/products/e2f3e56b43.jpg", + ), + ( + "UV Change Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2506/23/products/ac9ecdec6c.jpg", + ), + ( + "UV Change Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2506/23/products/4e81786975.jpg", + ), + ), + "PLA Wood": ( + # https://eu.esun3dstore.com/products/pla-wood + ( + "Aspen", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/7d86c77de4.jpg", + ), + ( + "Birch", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/52ffcf11a1.jpg", + ), + ( + "Oak", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2607/08/products/24126b95ba.jpg", + ), + ( + "Plain Wood", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/fce0f52c73.jpg", + ), + ( + "Walnut", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2512/30/products/b513eb60c6.jpg", + ), + ), + "PVA": ( + # https://esun3dstoreeu.com/products/pva + ("Yellow", "spool", "", 500, "#FFFC01", ""), + ), + "TPE 83A": ( + # https://eu.esun3dstore.com/products/tpe-83a + ( + "Black", + "spool", + "", + 1000, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/24/products/20cc3d9b62.jpg", + ), + ( + "White", + "spool", + "", + 1000, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2603/24/products/b46cbacc93.jpg", + ), + ), + "TPU 87A": ( + # https://eu.esun3dstore.com/products/tpu-87a + ("Clear", "spool", "", 1000, "", ""), + ), + "TPU 95A": ( + # https://eu.esun3dstore.com/products/tpu-95a + ( + "Black", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/d8f3bcdb95.jpg", + ), + ( + "Grey", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/ca1d2adae4.jpg", + ), + ( + "Natural", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/4a08d0b9e4.jpg", + ), + ( + "Rainbow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/43be18b3eb.jpg", + ), + ( + "Transparent Blue", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/a5e1eabf0b.jpg", + ), + ( + "Transparent Green", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/6693b123b8.jpg", + ), + ( + "Transparent Orange", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/d76dd4c09e.jpg", + ), + ( + "Transparent Pink", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/46efb7a537.jpg", + ), + ( + "Transparent Purple", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/9506462860.jpg", + ), + ( + "Transparent Red", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/c7912b31c5.jpg", + ), + ( + "Transparent Yellow", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/8b2e73cc21.jpg", + ), + ( + "White", + "spool", + "", + 1000, + "", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2511/25/products/aa07e35bcc.jpg", + ), + ), + "TPU LW": ( + # https://eu.esun3dstore.com/products/tpu-lw + ( + "Black", + "spool", + "", + 750, + "#272729", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2501/07/products/808183e350.jpg", + ), + ( + "Grey", + "spool", + "", + 750, + "#606783", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2501/07/products/3aa916b0be.jpg", + ), + ( + "White", + "spool", + "", + 750, + "#F6F6F6", + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/2501/03/products/b824741896.jpg", + ), + ), +} diff --git a/filament/forms.py b/filament/forms.py index ee56137..a1e2801 100644 --- a/filament/forms.py +++ b/filament/forms.py @@ -47,6 +47,22 @@ class QuantityForm(forms.Form): quantity = forms.IntegerField(label="Stückzahl", min_value=1, max_value=9999) +class ArticleLookupForm(forms.Form): + article_number = forms.CharField( + label="Artikelnummer", + max_length=Variant._meta.get_field("manufacturer_color_code").max_length, + error_messages={"required": "Bitte gib eine Artikelnummer ein."}, + widget=forms.TextInput( + attrs={ + "autocomplete": "off", + "spellcheck": "false", + "placeholder": "z. B. 40101", + "data-article-number": "", + } + ), + ) + + class ConsumeSpoolForm(forms.Form): quantity = forms.IntegerField(min_value=1, max_value=9999, widget=forms.HiddenInput) action = forms.ChoiceField(choices=[("consume", "Verbrauchen"), ("reorder", "Nachbestellen")]) @@ -124,9 +140,17 @@ class VariantSelectionForm(forms.Form): .values_list("color_id", "swatch") ) spools = set(narrowed.filter(color_id=color).values_list("spool_type", flat=True)) - self.fields["spool_type"].choices = [("", "Spulenausführung wählen")] + [ - (key, label) for key, label in Variant.SpoolType.choices if key in spools + spool_choices = [ + (key, "Filament auf Spule" if key == Variant.SpoolType.SPOOL else label) + for key, label in Variant.SpoolType.choices + if key in spools ] + spool_field = self.fields["spool_type"] + spool_field.choices = spool_choices + if not spool_choices: + spool_field.widget.attrs["disabled"] = True + elif not self.is_bound and values.get("spool_type") not in spools: + self.initial["spool_type"] = spool_choices[0][0] def clean(self): cleaned = super().clean() diff --git a/filament/management/commands/seed_catalog.py b/filament/management/commands/seed_catalog.py index 62f44ac..6086304 100644 --- a/filament/management/commands/seed_catalog.py +++ b/filament/management/commands/seed_catalog.py @@ -5,20 +5,30 @@ from django.db import transaction from filament.bambu_catalog import BAMBU_LAB_CATALOG, BAMBU_LAB_VARIANT_COUNT from filament.bambu_images_0006 import bambu_image_url +from filament.bambu_petg_catalog import BAMBU_PETG_CATALOG from filament.bambu_swatches_0005 import BAMBU_SWATCHES +from filament.esun_catalog import ESUN_CATALOG from filament.models import CatalogBootstrap, Color, Manufacturer, ProductType, Variant from filament.sunlu_catalog import SUNLU_CATALOG, SUNLU_IMAGE_BASE BAMBU_LAB_BOOTSTRAP_KEY = "bambu-lab-eu-initial-catalog" +BAMBU_PETG_BOOTSTRAP_KEY = "bambu-lab-eu-petg-basic-matte" SUNLU_BOOTSTRAP_KEY = "sunlu-de-initial-catalog" +ESUN_BOOTSTRAP_KEY = "esun-eu-initial-catalog" class Command(BaseCommand): - help = "Importiert die Bambu-Lab- und SUNLU-Erstkataloge einmalig pro Datenbank." + help = "Importiert die Erstkataloge von Bambu Lab, SUNLU und eSUN einmalig pro Datenbank." def handle(self, *args, **options): self.seed_bambu(options["verbosity"]) - self.seed_sunlu(options["verbosity"]) + self.seed_catalog( + options["verbosity"], BAMBU_PETG_BOOTSTRAP_KEY, "Bambu Lab", BAMBU_PETG_CATALOG + ) + self.seed_catalog( + options["verbosity"], SUNLU_BOOTSTRAP_KEY, "SUNLU", SUNLU_CATALOG, sunlu_image_url + ) + self.seed_catalog(options["verbosity"], ESUN_BOOTSTRAP_KEY, "eSUN", ESUN_CATALOG) @transaction.atomic def seed_bambu(self, verbosity): @@ -65,14 +75,14 @@ class Command(BaseCommand): ) @transaction.atomic - def seed_sunlu(self, verbosity): - _, should_import = CatalogBootstrap.objects.get_or_create(key=SUNLU_BOOTSTRAP_KEY) + def seed_catalog(self, verbosity, key, manufacturer_name, catalog, image_url=None): + _, should_import = CatalogBootstrap.objects.get_or_create(key=key) if not should_import: return - manufacturer, _ = Manufacturer.objects.get_or_create(name="SUNLU") + manufacturer, _ = Manufacturer.objects.get_or_create(name=manufacturer_name) created = 0 - for name, catalog_variants in SUNLU_CATALOG.items(): + for name, catalog_variants in catalog.items(): product, _ = ProductType.objects.get_or_create(manufacturer=manufacturer, name=name) for color_name, spool_type, sku, weight, swatch, image_path in catalog_variants: color, _ = Color.objects.get_or_create(name=color_name) @@ -85,13 +95,15 @@ class Command(BaseCommand): "net_weight_g": weight, "diameter_mm": Decimal("1.75"), "swatch": swatch, - "image_url": SUNLU_IMAGE_BASE + image_path + "?width=144" - if image_path - else "", + "image_url": image_url(image_path) if image_url else image_path, }, ) created += new if verbosity: self.stdout.write( - self.style.SUCCESS(f"SUNLU-Erstkatalog importiert: {created} Varianten ergänzt.") + self.style.SUCCESS(f"{manufacturer_name}-Katalog: {created} Varianten ergänzt.") ) + + +def sunlu_image_url(path): + return SUNLU_IMAGE_BASE + path + "?width=144" if path else "" diff --git a/filament/middleware.py b/filament/middleware.py index 948117f..901bf36 100644 --- a/filament/middleware.py +++ b/filament/middleware.py @@ -19,6 +19,7 @@ class PrivatePageMiddleware: }: image_sources += ( " https://cdn.shopify.com https://store.bblcdn.eu https://store.bblcdn.com" + " https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/" ) response["Content-Security-Policy"] = ( "default-src 'self'; script-src 'self'; style-src 'self'; " diff --git a/filament/migrations/0011_esun_variant_images.py b/filament/migrations/0011_esun_variant_images.py new file mode 100644 index 0000000..1abce54 --- /dev/null +++ b/filament/migrations/0011_esun_variant_images.py @@ -0,0 +1,29 @@ +# Generated by Django 5.2.19 on 2026-11-14 15:05 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("filament", "0010_order_history_dates"), + ] + + operations = [ + migrations.AlterField( + model_name="variant", + name="image_url", + field=models.URLField( + blank=True, + help_text="HTTPS-Bildadresse aus dem CDN von Bambu Lab, SUNLU oder eSUN.", + max_length=500, + validators=[ + django.core.validators.RegexValidator( + "\\Ahttps://(?:cdn\\.shopify\\.com/|store\\.bblcdn\\.eu/|store\\.bblcdn\\.com/|ueeshop\\.ly200-cdn\\.com/u_file/UPBB/UPBB609/)", + "Bitte eine HTTPS-Bildadresse von einer unterstützten CDN-Domain eingeben.", + ) + ], + verbose_name="Produktbild", + ), + ), + ] diff --git a/filament/models.py b/filament/models.py index 0b24700..ebf6de6 100644 --- a/filament/models.py +++ b/filament/models.py @@ -90,11 +90,12 @@ class Variant(models.Model): blank=True, validators=[ RegexValidator( - r"\Ahttps://(?:cdn\.shopify\.com|store\.bblcdn\.eu|store\.bblcdn\.com)/", + r"\Ahttps://(?:cdn\.shopify\.com/|store\.bblcdn\.eu/|store\.bblcdn\.com/" + r"|ueeshop\.ly200-cdn\.com/u_file/UPBB/UPBB609/)", "Bitte eine HTTPS-Bildadresse von einer unterstützten CDN-Domain eingeben.", ) ], - help_text="Bildadresse von cdn.shopify.com, store.bblcdn.eu oder store.bblcdn.com.", + help_text="HTTPS-Bildadresse aus dem CDN von Bambu Lab, SUNLU oder eSUN.", ) net_weight_g = models.PositiveIntegerField( "Nettogewicht (g)", null=True, blank=True, validators=[MinValueValidator(1)] diff --git a/filament/static/filament/app.css b/filament/static/filament/app.css index 329ec8d..3781018 100644 --- a/filament/static/filament/app.css +++ b/filament/static/filament/app.css @@ -549,6 +549,16 @@ td.quantity { .variant-panel { overflow: visible; } +.article-lookup { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 10px; +} +.article-lookup > :is(input, select) { + flex: 1 1 230px; + min-width: 0; +} .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); diff --git a/filament/static/filament/catalog.js b/filament/static/filament/catalog.js index e14d992..5ffd503 100644 --- a/filament/static/filament/catalog.js +++ b/filament/static/filament/catalog.js @@ -143,7 +143,12 @@ function enhanceColorSelect(select) { const form = document.querySelector("[data-catalog-form]"); if (form) { - const selects = [...form.querySelectorAll("select")]; + form.querySelector("[data-article-number]").addEventListener("keydown", (event) => { + if (event.key !== "Enter" || event.isComposing) return; + event.preventDefault(); + form.requestSubmit(form.querySelector("[data-article-lookup]")); + }); + const selects = [...form.querySelectorAll(".form-grid select")]; selects.forEach((select, index) => { select.addEventListener("change", () => { selects.slice(index + 1).forEach((next) => { diff --git a/filament/tests/test_admin_auth.py b/filament/tests/test_admin_auth.py index e93e73f..d91838d 100644 --- a/filament/tests/test_admin_auth.py +++ b/filament/tests/test_admin_auth.py @@ -1,9 +1,11 @@ import secrets from django.contrib.auth import get_user_model -from django.test import Client +from django.contrib.auth.models import Permission +from django.test import Client, override_settings +from django.urls import reverse -from filament.models import InventoryItem, Printer +from filament.models import Feedback, InventoryItem, OrderItem, Printer, SharingPreferences, Variant from .base import CatalogTestCase @@ -40,6 +42,68 @@ class AdminAuthenticationTests(CatalogTestCase): user.refresh_from_db() self.assertFalse(user.is_active) + def test_admin_can_delete_account_and_its_data_after_confirmation(self): + self.client.force_login(self.admin) + InventoryItem.objects.create(owner=self.alice, variant=self.spool, quantity=7) + OrderItem.objects.create(owner=self.alice, variant=self.spool, quantity=1) + OrderItem.objects.create( + owner=self.alice, variant=self.spool, quantity=2, status=OrderItem.Status.HANDED_OVER + ) + Printer.objects.create( + owner=self.alice, manufacturer="Privates Druckermodell", model="Test" + ) + SharingPreferences.objects.create( + owner=self.alice, share_inventory=True, share_printers=True + ) + Feedback.objects.create(sender=self.alice, message="Nachricht zur Löschprüfung") + other_stock = InventoryItem.objects.create(owner=self.bob, variant=self.spool, quantity=3) + other_order = OrderItem.objects.create(owner=self.bob, variant=self.spool, quantity=4) + + url = reverse("admin:auth_user_delete", args=[self.alice.pk]) + self.assertContains(self.client.get(f"/admin/auth/user/{self.alice.pk}/change/"), url) + confirmation = self.client.get(url) + self.assertContains(confirmation, "Bestellwünsche samt Bestellhistorie") + self.assertNotContains(confirmation, "Privates Druckermodell") + self.assertNotContains(confirmation, "7 ×") + self.assertNotContains(confirmation, "Nachricht zur Löschprüfung") + self.assertTrue(get_user_model().objects.filter(pk=self.alice.pk).exists()) + self.assertEqual(OrderItem.objects.filter(owner=self.alice).count(), 2) + + csrf_client = Client(enforce_csrf_checks=True) + csrf_client.force_login(self.admin) + self.assertEqual(csrf_client.post(url, {"post": "yes"}).status_code, 403) + csrf_client.get(url) + self.assertRedirects( + csrf_client.post( + url, + {"post": "yes", "csrfmiddlewaretoken": csrf_client.cookies["csrftoken"].value}, + ), + reverse("admin:auth_user_changelist"), + ) + self.assertFalse(get_user_model().objects.filter(pk=self.alice.pk).exists()) + self.assertFalse(InventoryItem.objects.filter(owner=self.alice).exists()) + self.assertFalse(OrderItem.objects.filter(owner=self.alice).exists()) + self.assertFalse(Printer.objects.filter(owner=self.alice).exists()) + self.assertFalse(SharingPreferences.objects.filter(owner=self.alice).exists()) + self.assertFalse(Feedback.objects.filter(sender=self.alice).exists()) + self.assertTrue(InventoryItem.objects.filter(pk=other_stock.pk).exists()) + self.assertTrue(OrderItem.objects.filter(pk=other_order.pk).exists()) + self.assertTrue(Variant.objects.filter(pk=self.spool.pk).exists()) + + def test_delete_requires_permission_and_keeps_the_current_admin_account(self): + self.client.force_login(self.admin) + admin_delete_url = reverse("admin:auth_user_delete", args=[self.admin.pk]) + self.assertEqual(self.client.post(admin_delete_url, {"post": "yes"}).status_code, 403) + self.bob.is_staff = True + self.bob.save(update_fields=["is_staff"]) + self.client.force_login(self.bob) + member_delete_url = reverse("admin:auth_user_delete", args=[self.alice.pk]) + self.assertEqual(self.client.post(member_delete_url, {"post": "yes"}).status_code, 403) + self.bob.user_permissions.add(Permission.objects.get(codename="delete_user")) + self.assertEqual(self.client.post(admin_delete_url, {"post": "yes"}).status_code, 403) + self.assertTrue(get_user_model().objects.filter(pk=self.admin.pk).exists()) + self.assertTrue(get_user_model().objects.filter(pk=self.alice.pk).exists()) + def test_admin_can_deactivate_catalog_variant_without_deleting_positions(self): self.client.force_login(self.admin) InventoryItem.objects.create(owner=self.alice, variant=self.spool, quantity=2) @@ -126,3 +190,37 @@ class AdminAuthenticationTests(CatalogTestCase): self.assertEqual(self.client.get("/abmelden/").status_code, 405) self.client.post("/abmelden/") self.assertEqual(self.client.get("/bestand/").status_code, 302) + + @override_settings( + ALLOWED_HOSTS=["filament.example.org", "app.internal"], + SECURE_PROXY_SSL_HEADER=("HTTP_X_FORWARDED_PROTO", "https"), + CSRF_TRUSTED_ORIGINS=["https://filament.example.org"], + CSRF_COOKIE_SECURE=True, + SESSION_COOKIE_SECURE=True, + ) + def test_csrf_protected_login_behind_https_reverse_proxy(self): + client = Client(enforce_csrf_checks=True) + headers = {"host": "filament.example.org", "x-forwarded-proto": "https"} + response = client.get("/anmelden/", headers=headers) + self.assertEqual(response.status_code, 200) + self.assertTrue(response.wsgi_request.is_secure()) + self.assertTrue(response.cookies["csrftoken"]["secure"]) + credentials = {"username": self.alice.username, "password": self.password} + payload = credentials | {"csrfmiddlewaretoken": client.cookies["csrftoken"].value} + origin = {"origin": "https://filament.example.org"} + self.assertEqual( + client.post("/anmelden/", credentials, headers=headers | origin).status_code, 403 + ) + self.assertEqual( + client.post( + "/anmelden/", payload, headers=headers | {"origin": "https://other.example.org"} + ).status_code, + 403, + ) + # The explicitly trusted origin also covers proxies that rewrite Host. + response = client.post( + "/anmelden/", payload, headers=headers | {"host": "app.internal"} | origin + ) + self.assertEqual(response.status_code, 302) + self.assertTrue(response.cookies["sessionid"]["secure"]) + self.assertEqual(client.get("/bestand/", headers=headers).status_code, 200) diff --git a/filament/tests/test_catalog.py b/filament/tests/test_catalog.py index 3151814..a577de1 100644 --- a/filament/tests/test_catalog.py +++ b/filament/tests/test_catalog.py @@ -2,7 +2,12 @@ from django.core.management import call_command, get_commands from filament.bambu_catalog import BAMBU_LAB_PRODUCT_COUNT, BAMBU_LAB_VARIANT_COUNT from filament.forms import VariantSelectionForm -from filament.management.commands.seed_catalog import BAMBU_LAB_BOOTSTRAP_KEY, SUNLU_BOOTSTRAP_KEY +from filament.management.commands.seed_catalog import ( + BAMBU_LAB_BOOTSTRAP_KEY, + BAMBU_PETG_BOOTSTRAP_KEY, + ESUN_BOOTSTRAP_KEY, + SUNLU_BOOTSTRAP_KEY, +) from filament.models import ( CatalogBootstrap, Color, @@ -71,7 +76,10 @@ class CatalogTests(CatalogTestCase): form = VariantSelectionForm(selection=self.selection()) self.assertEqual(list(form.fields["product_type"].queryset), [self.product]) self.assertEqual(set(form.fields["color"].queryset), {self.red, self.black}) - self.assertEqual({s for s, _ in form.fields["spool_type"].choices}, {"", "spool", "refill"}) + self.assertEqual( + form.fields["spool_type"].choices, + [("spool", "Filament auf Spule"), ("refill", "Refill (ohne Spule)")], + ) invalid = self.selection() | {"product_type": other_product.pk, "color": other_color.pk} self.assertFalse(VariantSelectionForm(invalid).is_valid()) response = self.client.post("/bestand/hinzufuegen/", invalid) @@ -108,6 +116,75 @@ class CatalogTests(CatalogTestCase): self.assertContains(response, "formnovalidate") self.assertFalse(InventoryItem.objects.exists()) + def test_spool_choices_have_no_placeholder_and_keep_the_existing_selection(self): + for url in ("/bestand/hinzufuegen/", "/bestellung/hinzufuegen/"): + for variant in (self.spool, self.refill, self.black_spool): + with self.subTest(url=url, variant=variant): + response = self.client.post(url, self.selection(variant) | {"action": "filter"}) + self.assertNotContains(response, "Spulenausführung wählen") + self.assertContains(response, "Filament auf Spule") + field = response.context["form"]["spool_type"] + self.assertEqual(field.value(), variant.spool_type) + self.assertEqual( + "refill" in dict(field.field.choices), variant.color_id == self.red.pk + ) + data = self.selection(self.black_spool) | {"spool_type": "", "action": "filter"} + self.assertEqual( + self.client.post(url, data).context["form"]["spool_type"].value(), "spool" + ) + + def test_article_lookup_prefills_both_forms_and_preserves_quantity(self): + self.refill.manufacturer_color_code = "PLA-RD-01" + self.refill.save(update_fields=["manufacturer_color_code"]) + for path, model in (("bestand", InventoryItem), ("bestellung", OrderItem)): + with self.subTest(path=path): + url = f"/{path}/hinzufuegen/" + response = self.client.post( + url, {"action": "lookup", "article_number": " pla-rd-01 ", "quantity": 4} + ) + self.assertContains(response, "Variante suchen") + self.assertEqual(response.context["form"].initial, self.selection(self.refill, "4")) + self.assertFalse(model.objects.exists()) + self.assertRedirects( + self.client.post(url, response.context["form"].initial), f"/{path}/" + ) + self.assertEqual(model.objects.get(variant=self.refill).quantity, 4) + + def test_article_lookup_requires_a_choice_for_duplicate_active_codes(self): + Variant.objects.filter(pk__in=[self.spool.pk, self.refill.pk]).update( + manufacturer_color_code="10100" + ) + self.black_spool.manufacturer_color_code = "10100" + self.black_spool.is_active = False + self.black_spool.save() + url = "/bestand/hinzufuegen/" + lookup = {"article_number": "10100", "quantity": 2} + response = self.client.post(url, lookup | {"action": "lookup"}) + self.assertContains(response, "Mehrere Varianten gefunden") + self.assertEqual(set(response.context["matches"]), {self.spool, self.refill}) + self.assertNotIn("spool_type", response.context["form"].initial) + + invalid = self.client.post( + url, lookup | {"action": "pick", "article_variant": self.black_spool.pk} + ) + self.assertContains(invalid, "Bitte wähle eine der gefundenen Varianten.") + picked = self.client.post( + url, lookup | {"action": "pick", "article_variant": self.spool.pk} + ) + self.assertEqual(picked.context["form"].initial, self.selection(self.spool, "2")) + self.assertFalse(InventoryItem.objects.exists()) + + def test_article_lookup_ignores_partial_and_unknown_codes(self): + self.spool.manufacturer_color_code = "40101" + self.spool.save(update_fields=["manufacturer_color_code"]) + url = "/bestellung/hinzufuegen/" + response = self.client.post( + url, self.selection() | {"action": "lookup", "article_number": "4010"} + ) + self.assertContains(response, "Zu dieser Artikelnummer gibt es keinen aktiven Eintrag.") + self.assertEqual(response.context["form"]["color"].value(), str(self.red.pk)) + self.assertFalse(OrderItem.objects.exists()) + def test_color_preview_is_available_in_both_flows_and_remains_optional(self): self.spool.swatch = "#DE4343" self.spool.save(update_fields=["swatch"]) @@ -152,10 +229,10 @@ class CatalogTests(CatalogTestCase): call_command("seed_catalog", verbosity=0) self.assertEqual( ProductType.objects.filter(manufacturer__name="Bambu Lab").count(), - BAMBU_LAB_PRODUCT_COUNT, + BAMBU_LAB_PRODUCT_COUNT + 2, ) bambu_variants = Variant.objects.filter(product_type__manufacturer__name="Bambu Lab") - self.assertEqual(bambu_variants.count(), BAMBU_LAB_VARIANT_COUNT) + self.assertEqual(bambu_variants.count(), BAMBU_LAB_VARIANT_COUNT + 42) self.assertFalse( bambu_variants.exclude(pk__in=(self.spool.pk, self.refill.pk, self.black_spool.pk)) .filter(image_url="") @@ -191,6 +268,13 @@ class CatalogTests(CatalogTestCase): ).swatch, "#000000,#A34342", ) + response = self.client.post( + "/bestand/hinzufuegen/", {"action": "lookup", "article_number": "40101"} + ) + self.assertEqual( + {(variant.color.name, variant.spool_type) for variant in response.context["matches"]}, + {("ABS Black", "spool"), ("ABS Black", "refill")}, + ) count = Variant.objects.count() inactive = Variant.objects.filter(manufacturer_color_code="11100").first() removed = Variant.objects.get( @@ -219,7 +303,12 @@ class CatalogTests(CatalogTestCase): variants = Variant.objects.filter(product_type__manufacturer=sunlu) self.assertEqual(variants.count(), 561) self.assertEqual(ProductType.objects.filter(manufacturer=sunlu).count(), 67) - self.assertEqual(Variant.objects.filter(product_type__manufacturer=self.maker).count(), 3) + self.assertEqual( + Variant.objects.filter(product_type__manufacturer=self.maker) + .exclude(product_type__name__in=("PETG Basic", "PETG Matte")) + .count(), + 3, + ) self.assertTrue(CatalogBootstrap.objects.filter(key=SUNLU_BOOTSTRAP_KEY).exists()) pla = variants.filter(product_type__name="PLA", color__name="Schwarz") @@ -248,3 +337,82 @@ class CatalogTests(CatalogTestCase): self.assertFalse(variants.filter(product_type__name="PETG-CF10").exists()) refill.refresh_from_db() self.assertFalse(refill.is_active) + + def test_esun_imports_once_into_existing_installations(self): + CatalogBootstrap.objects.create(key=BAMBU_LAB_BOOTSTRAP_KEY) + CatalogBootstrap.objects.create(key=SUNLU_BOOTSTRAP_KEY) + call_command("seed_catalog", verbosity=0) + esun = Manufacturer.objects.get(name="eSUN") + variants = Variant.objects.filter(product_type__manufacturer=esun) + self.assertEqual(variants.count(), 438) + self.assertEqual(ProductType.objects.filter(manufacturer=esun).count(), 50) + self.assertTrue(CatalogBootstrap.objects.filter(key=ESUN_BOOTSTRAP_KEY).exists()) + + pla_black = variants.filter(product_type__name="PLA Plus", color__name="Black") + self.assertEqual(set(pla_black.values_list("spool_type", flat=True)), {"spool", "refill"}) + refill = pla_black.get(spool_type="refill") + self.assertEqual(refill.swatch, "#272729") + self.assertEqual(refill.net_weight_g, 1000) + self.assertTrue(refill.image_url.startswith("https://ueeshop.ly200-cdn.com/")) + refill.full_clean() + for path in ("bestand", "bestellung"): + self.assertRedirects( + self.client.post(f"/{path}/hinzufuegen/", self.selection(refill)), f"/{path}/" + ) + response = self.client.get(f"/{path}/") + self.assertContains(response, f'src="{refill.image_url}"') + self.assertIn( + "https://ueeshop.ly200-cdn.com/u_file/UPBB/UPBB609/", + response["Content-Security-Policy"], + ) + refill.is_active = False + refill.manufacturer_color_code = "CUSTOM-001" + refill.save(update_fields=["is_active", "manufacturer_color_code"]) + pla_black.get(spool_type="spool").delete() + call_command("seed_catalog", verbosity=0) + refill.refresh_from_db() + self.assertFalse(refill.is_active) + self.assertEqual(refill.manufacturer_color_code, "CUSTOM-001") + self.assertEqual(variants.count(), 437) + self.assertEqual(pla_black.count(), 1) + + def test_bambu_petg_expands_an_existing_catalog_once(self): + CatalogBootstrap.objects.bulk_create( + [ + CatalogBootstrap(key=key) + for key in (BAMBU_LAB_BOOTSTRAP_KEY, SUNLU_BOOTSTRAP_KEY, ESUN_BOOTSTRAP_KEY) + ] + ) + product = ProductType.objects.create(manufacturer=self.maker, name="PETG Basic") + white, _ = Color.objects.get_or_create(name="White") + edited = Variant.objects.create( + product_type=product, + color=white, + spool_type="spool", + manufacturer_color_code="CUSTOM-WHITE", + is_active=False, + ) + call_command("seed_catalog", verbosity=0) + variants = Variant.objects.filter(product_type__manufacturer=self.maker).exclude( + product_type=self.product + ) + self.assertEqual(variants.filter(product_type__name="PETG Basic").count(), 26) + self.assertEqual(variants.filter(product_type__name="PETG Matte").count(), 16) + self.assertTrue(CatalogBootstrap.objects.filter(key=BAMBU_PETG_BOOTSTRAP_KEY).exists()) + self.assertFalse(variants.filter(product_type__name="PETG HF").exists()) + edited.refresh_from_db() + self.assertFalse(edited.is_active) + self.assertEqual(edited.manufacturer_color_code, "CUSTOM-WHITE") + + refill = variants.get(manufacturer_color_code="30106", spool_type="refill") + self.assertEqual(refill.swatch, "#FFFFFF") + self.assertEqual(refill.net_weight_g, 1000) + self.assertTrue(refill.image_url.startswith("https://store.bblcdn.eu/")) + form = VariantSelectionForm(selection=self.selection(refill)) + self.assertEqual( + set(form.fields["product_type"].queryset.values_list("name", flat=True)), + {"PETG Basic", "PETG Matte"}, + ) + refill.delete() + call_command("seed_catalog", verbosity=0) + self.assertFalse(variants.filter(manufacturer_color_code="30106").exists()) diff --git a/filament/views.py b/filament/views.py index 3d16619..7f626a8 100644 --- a/filament/views.py +++ b/filament/views.py @@ -12,6 +12,7 @@ from django.urls import reverse from django.views.decorators.http import require_http_methods from .forms import ( + ArticleLookupForm, ConsumeSpoolForm, FeedbackForm, OrderStatusForm, @@ -20,6 +21,7 @@ from .forms import ( QuantityForm, SharingPreferencesForm, VariantSelectionForm, + selection_id, ) from .models import InventoryItem, OrderItem, Printer, SharingPreferences, Variant from .services import add_quantity, consume_spool, update_order_status @@ -282,10 +284,42 @@ def inventory_add(request): def _add_position(request, model, back, title, destination): - is_add = request.method == "POST" and request.POST.get("action") != "filter" + selection = request.POST if request.method == "POST" else request.GET + action = request.POST.get("action") + is_add = request.method == "POST" and action not in {"filter", "lookup", "pick"} + lookup = ArticleLookupForm(request.POST if action in {"lookup", "pick"} else None) + matches = [] + if lookup.is_bound and lookup.is_valid(): + matches = list( + Variant.objects.filter( + is_active=True, + manufacturer_color_code__iexact=lookup.cleaned_data["article_number"], + ).select_related("product_type__manufacturer", "color") + ) + if not matches: + lookup.add_error( + "article_number", "Zu dieser Artikelnummer gibt es keinen aktiven Eintrag." + ) + else: + match = matches[0] if len(matches) == 1 else None + if action == "pick": + picked = selection_id(request.POST.get("article_variant")) + match = next((variant for variant in matches if variant.pk == picked), None) + if match is None: + lookup.add_error("article_number", "Bitte wähle eine der gefundenen Varianten.") + if match is not None: + selection = { + "manufacturer": match.manufacturer.pk, + "material": match.product_type.material_and_subtype[0], + "product_type": match.product_type_id, + "color": match.color_id, + "spool_type": match.spool_type, + "quantity": selection.get("quantity", 1), + } + matches = [] form = VariantSelectionForm( request.POST if is_add else None, - selection=request.POST if request.method == "POST" else request.GET, + selection=selection, ) if is_add and form.is_valid(): try: @@ -300,7 +334,14 @@ def _add_position(request, model, back, title, destination): return render( request, "filament/select_variant.html", - {"form": form, "title": title, "back_name": back, "destination": destination}, + { + "form": form, + "lookup": lookup, + "matches": matches, + "title": title, + "back_name": back, + "destination": destination, + }, ) diff --git a/templates/admin/auth/user/delete_confirmation.html b/templates/admin/auth/user/delete_confirmation.html new file mode 100644 index 0000000..e3553c1 --- /dev/null +++ b/templates/admin/auth/user/delete_confirmation.html @@ -0,0 +1,6 @@ +{% extends "admin/delete_confirmation.html" %} + +{% block delete_confirm %} +

Mit dem Konto werden auch dessen Filamentbestand, Bestellwünsche samt Bestellhistorie, Drucker, Freigaben und gesendetes Feedback dauerhaft gelöscht.

+ {{ block.super }} +{% endblock %} diff --git a/templates/filament/select_variant.html b/templates/filament/select_variant.html index 668dbc8..1b21fa6 100644 --- a/templates/filament/select_variant.html +++ b/templates/filament/select_variant.html @@ -1,6 +1,28 @@ {% extends "base.html" %}{% block title %}{{ title }} · Fil-A-Management{% endblock %}{% block content %} -← Zurück

AUS DEM GEMEINSAMEN KATALOG

{{ title }}

Wähle Schritt für Schritt eine Variante für {{ destination }}.

+← Zurück

AUS DEM GEMEINSAMEN KATALOG

{{ title }}

Wähle eine Variante für {{ destination }} oder suche nach ihrer Artikelnummer.

{% csrf_token %}{{ form.non_field_errors }} +
+ {{ lookup.article_number.label_tag }} +
+ {{ lookup.article_number }} + +
+ {{ lookup.article_number.errors }} +
+ {% if matches %} +
+ +
+ + +
+
+ {% endif %}
{% for field in form %}
{{ field.label_tag }}{{ field }}{{ field.errors }}{% if field.help_text %}{{ field.help_text }}{% endif %}
{% endfor %}

Jede Auswahl grenzt die folgenden Optionen ein. Nur aktive, angelegte Varianten sind wählbar.