From 56368908c0232376d2d1faaae2f692c56354a174 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Thu, 7 Sep 2023 22:59:07 +0200 Subject: [PATCH 1/8] install package furo from PyPI downgrade furo fix furo problem attempt with new name and toml format fly.dev fixed their deployment problems install package furo from PyPI downgrade furo fix furo problem attempt with new name and toml format Revert "Merge branch 'main' of github.com:jrief/django-formset" This reverts commit 1cfff3bea15d63492b21b5f8d40d9c3e4d3912f3, reversing changes made to 6b44c7b31544197ddc9f391ac4c08d548480a2c2. --- .deployment/Dockerfile | 2 +- fly.toml | 19 +++---------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.deployment/Dockerfile b/.deployment/Dockerfile index f576c323..019358a2 100644 --- a/.deployment/Dockerfile +++ b/.deployment/Dockerfile @@ -17,8 +17,8 @@ RUN npm ci # install Python specific requirements RUN pip install django psycopg2-binary Pillow uWSGI docutils Sphinx sphinx-toolbox -RUN pip install https://github.com/pradyunsg/furo/archive/refs/heads/main.zip RUN pip install https://github.com/jrief/django-sphinx-view/archive/refs/heads/main.zip +RUN pip install https://github.com/jrief/furo/archive/refs/heads/json-build.zip # copy project relevant files into container ADD assets /web/assets diff --git a/fly.toml b/fly.toml index bef06583..dbbb78fb 100644 --- a/fly.toml +++ b/fly.toml @@ -1,11 +1,13 @@ -# fly.toml file generated for django-formset on 2022-07-30T11:44:37+02:00 +# fly.toml file generated for django-formset2 on 2023-09-08T22:13:46+02:00 app = "django-formset" kill_signal = "SIGINT" kill_timeout = 5 +mounts = [] processes = [] [env] + PORT = "8080" DJANGO_WORKDIR="/web/workdir" DJANGO_MEDIA_ROOT="/web/workdir/media" DJANGO_STATIC_ROOT="/web/staticfiles" @@ -13,16 +15,11 @@ processes = [] [build] dockerfile = ".deployment/Dockerfile" -[experimental] - allowed_public_ports = [] - auto_rollback = true [[services]] - http_checks = [] internal_port = 8080 processes = ["app"] protocol = "tcp" - script_checks = [] [services.concurrency] hard_limit = 25 soft_limit = 20 @@ -36,13 +33,3 @@ processes = [] [[services.ports]] handlers = ["tls", "http"] port = 443 - - [[services.tcp_checks]] - grace_period = "1s" - interval = "15s" - restart_limit = 0 - timeout = "2s" - -[mounts] - source="workdir" - destination="/web/workdir" From da62ac937118e18ae6d4cb791677f514c36e7d23 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Thu, 7 Sep 2023 22:59:07 +0200 Subject: [PATCH 2/8] install package furo from PyPI --- .deployment/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.deployment/Dockerfile b/.deployment/Dockerfile index 019358a2..b1f48c1c 100644 --- a/.deployment/Dockerfile +++ b/.deployment/Dockerfile @@ -16,7 +16,7 @@ COPY package-lock.json /web/package-lock.json RUN npm ci # install Python specific requirements -RUN pip install django psycopg2-binary Pillow uWSGI docutils Sphinx sphinx-toolbox +RUN pip install django psycopg2-binary Pillow uWSGI docutils Sphinx sphinx-toolbox furo RUN pip install https://github.com/jrief/django-sphinx-view/archive/refs/heads/main.zip RUN pip install https://github.com/jrief/furo/archive/refs/heads/json-build.zip From 7fde77ae96c9ac1c52d8969e7335a1a64f2e38dd Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Thu, 7 Sep 2023 23:22:34 +0200 Subject: [PATCH 3/8] downgrade furo --- .deployment/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.deployment/Dockerfile b/.deployment/Dockerfile index b1f48c1c..50443b14 100644 --- a/.deployment/Dockerfile +++ b/.deployment/Dockerfile @@ -16,7 +16,7 @@ COPY package-lock.json /web/package-lock.json RUN npm ci # install Python specific requirements -RUN pip install django psycopg2-binary Pillow uWSGI docutils Sphinx sphinx-toolbox furo +RUN pip install django psycopg2-binary Pillow uWSGI docutils Sphinx sphinx-toolbox furo==2023.8.19 RUN pip install https://github.com/jrief/django-sphinx-view/archive/refs/heads/main.zip RUN pip install https://github.com/jrief/furo/archive/refs/heads/json-build.zip From a64ab27bf2313cdf9125188e915f83df5cfe66e4 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Fri, 8 Sep 2023 19:05:16 +0200 Subject: [PATCH 4/8] fix furo problem --- .deployment/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.deployment/Dockerfile b/.deployment/Dockerfile index 50443b14..019358a2 100644 --- a/.deployment/Dockerfile +++ b/.deployment/Dockerfile @@ -16,7 +16,7 @@ COPY package-lock.json /web/package-lock.json RUN npm ci # install Python specific requirements -RUN pip install django psycopg2-binary Pillow uWSGI docutils Sphinx sphinx-toolbox furo==2023.8.19 +RUN pip install django psycopg2-binary Pillow uWSGI docutils Sphinx sphinx-toolbox RUN pip install https://github.com/jrief/django-sphinx-view/archive/refs/heads/main.zip RUN pip install https://github.com/jrief/furo/archive/refs/heads/json-build.zip From 400bf1f03e8c31c38b591594a908cddcfb057bad Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Fri, 8 Sep 2023 22:24:30 +0200 Subject: [PATCH 5/8] attempt with new name and toml format --- fly.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fly.toml b/fly.toml index dbbb78fb..5490ed51 100644 --- a/fly.toml +++ b/fly.toml @@ -1,6 +1,6 @@ # fly.toml file generated for django-formset2 on 2023-09-08T22:13:46+02:00 -app = "django-formset" +app = "django-formset2" kill_signal = "SIGINT" kill_timeout = 5 mounts = [] From 2f0aafd83195218561357c0f51474416c1c02e60 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Sun, 17 Sep 2023 21:59:09 +0200 Subject: [PATCH 6/8] fix #87 Selectize losing its selected status Selectize widget losing its selected status when filter_by is defined --- client/django-formset/DjangoSelectize.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/client/django-formset/DjangoSelectize.ts b/client/django-formset/DjangoSelectize.ts index 148e90e1..fc85c626 100644 --- a/client/django-formset/DjangoSelectize.ts +++ b/client/django-formset/DjangoSelectize.ts @@ -67,6 +67,7 @@ class DjangoSelectize extends IncompleteSelect { this.validateInput(this.initialValue as string); this.tomSelect.on('change', (value: String) => this.validateInput(value)); this.setupFilters(tomInput); + this.tomSelect.setValue(this.initialValue); } protected getValue = () => this.currentValue; From 9095de43bf8c42cae902714fccc39016f358baee Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Thu, 21 Sep 2023 23:50:46 +0200 Subject: [PATCH 7/8] revert merge artifact --- client/django-formset/DjangoSelectize.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/client/django-formset/DjangoSelectize.ts b/client/django-formset/DjangoSelectize.ts index fc85c626..148e90e1 100644 --- a/client/django-formset/DjangoSelectize.ts +++ b/client/django-formset/DjangoSelectize.ts @@ -67,7 +67,6 @@ class DjangoSelectize extends IncompleteSelect { this.validateInput(this.initialValue as string); this.tomSelect.on('change', (value: String) => this.validateInput(value)); this.setupFilters(tomInput); - this.tomSelect.setValue(this.initialValue); } protected getValue = () => this.currentValue; From db0c9a25de078e0643a3a229a796497e3883df92 Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Thu, 21 Sep 2023 23:52:23 +0200 Subject: [PATCH 8/8] remove debugging statements --- client/django-formset/IncompleteSelect.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/client/django-formset/IncompleteSelect.ts b/client/django-formset/IncompleteSelect.ts index d64f4bfb..09b2b960 100644 --- a/client/django-formset/IncompleteSelect.ts +++ b/client/django-formset/IncompleteSelect.ts @@ -30,7 +30,6 @@ export abstract class IncompleteSelect extends Widget { const changedElement = event.currentTarget; if (changedElement instanceof HTMLSelectElement) { this.filterByValues.set(filterBy, Array.from(observedElement.selectedOptions).map(o => o.value)); - console.log(this.filterByValues); await this.reloadOptions(true); } });