From c7ee9de9eb3b86c40e99987c10843bd4bee142f9 Mon Sep 17 00:00:00 2001 From: Lance Edgar <lance@wuttaproject.org> Date: Sat, 28 Dec 2024 16:43:22 -0600 Subject: [PATCH 1/7] fix: register vue3 form component for products -> make batch --- tailbone/templates/products/batch.mako | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tailbone/templates/products/batch.mako b/tailbone/templates/products/batch.mako index 9f969468..db029e5a 100644 --- a/tailbone/templates/products/batch.mako +++ b/tailbone/templates/products/batch.mako @@ -55,19 +55,20 @@ </%def> <%def name="render_form_template()"> - <script type="text/x-template" id="${form.component}-template"> + <script type="text/x-template" id="${form.vue_tagname}-template"> ${self.render_form_innards()} </script> </%def> <%def name="modify_vue_vars()"> ${parent.modify_vue_vars()} + <% request.register_component(form.vue_tagname, form.vue_component) %> <script> ## TODO: ugh, an awful lot of duplicated code here (from /forms/deform.mako) let ${form.vue_component} = { - template: '#${form.component}-template', + template: '#${form.vue_tagname}-template', methods: { ## TODO: deprecate / remove the latter option here From e0ebd43e7abaa3292dd252135bc2d880b6b312ca Mon Sep 17 00:00:00 2001 From: Lance Edgar <lance@wuttaproject.org> Date: Sat, 1 Feb 2025 15:18:12 -0600 Subject: [PATCH 2/7] =?UTF-8?q?bump:=20version=200.22.5=20=E2=86=92=200.22?= =?UTF-8?q?.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ pyproject.toml | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbacf2a5..0b1726a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to Tailbone will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.22.6 (2025-02-01) + +### Fix + +- register vue3 form component for products -> make batch + ## v0.22.5 (2024-12-16) ### Fix diff --git a/pyproject.toml b/pyproject.toml index 9c164772..9e83df80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "Tailbone" -version = "0.22.5" +version = "0.22.6" description = "Backoffice Web Application for Rattail" readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] @@ -59,7 +59,7 @@ dependencies = [ "transaction", "waitress", "WebHelpers2", - "WuttaWeb>=0.16.2", + "WuttaWeb>=0.21.0", "zope.sqlalchemy>=1.5", ] From 4221fa50dd95771c84c20473381edcaff006043d Mon Sep 17 00:00:00 2001 From: Lance Edgar <lance@wuttaproject.org> Date: Fri, 14 Feb 2025 11:37:21 -0600 Subject: [PATCH 3/7] fix: fix warning msg for deprecated Grid param --- tailbone/grids/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailbone/grids/core.py b/tailbone/grids/core.py index 134642dd..56b97b86 100644 --- a/tailbone/grids/core.py +++ b/tailbone/grids/core.py @@ -235,7 +235,7 @@ class Grid(WuttaGrid): if 'pageable' in kwargs: warnings.warn("pageable param is deprecated for Grid(); " - "please use vue_tagname param instead", + "please use paginated param instead", DeprecationWarning, stacklevel=2) kwargs.setdefault('paginated', kwargs.pop('pageable')) From 7348eec671542fa1317ad68a0816948ee96c76ac Mon Sep 17 00:00:00 2001 From: Lance Edgar <lance@wuttaproject.org> Date: Tue, 18 Feb 2025 11:16:23 -0600 Subject: [PATCH 4/7] fix: stop using old config for logo image url on login page --- tailbone/views/auth.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tailbone/views/auth.py b/tailbone/views/auth.py index 1338c107..eceab803 100644 --- a/tailbone/views/auth.py +++ b/tailbone/views/auth.py @@ -94,10 +94,6 @@ class AuthenticationView(View): else: self.request.session.flash("Invalid username or password", 'error') - image_url = self.rattail_config.get( - 'tailbone', 'main_image_url', - default=self.request.static_url('tailbone:static/img/home_logo.png')) - # nb. hacky..but necessary, to add the refs, for autofocus # (also add key handler, so ENTER acts like TAB) dform = form.make_deform_form() @@ -110,7 +106,6 @@ class AuthenticationView(View): return { 'form': form, 'referrer': referrer, - 'image_url': image_url, 'index_title': app.get_node_title(), 'help_url': global_help_url(self.rattail_config), } From a6508154cb93a376a7ec93efa930534c674364f8 Mon Sep 17 00:00:00 2001 From: Lance Edgar <lance@wuttaproject.org> Date: Tue, 18 Feb 2025 12:13:28 -0600 Subject: [PATCH 5/7] docs: update intersphinx doc links per server migration --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 52e384f5..ade4c92a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,10 +27,10 @@ templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] intersphinx_mapping = { - 'rattail': ('https://rattailproject.org/docs/rattail/', None), + 'rattail': ('https://docs.wuttaproject.org/rattail/', None), 'webhelpers2': ('https://webhelpers2.readthedocs.io/en/latest/', None), - 'wuttaweb': ('https://rattailproject.org/docs/wuttaweb/', None), - 'wuttjamaican': ('https://rattailproject.org/docs/wuttjamaican/', None), + 'wuttaweb': ('https://docs.wuttaproject.org/wuttaweb/', None), + 'wuttjamaican': ('https://docs.wuttaproject.org/wuttjamaican/', None), } # allow todo entries to show up From e2582ffec5f84f97df9cc7d2fdcdf5201b2d135f Mon Sep 17 00:00:00 2001 From: Lance Edgar <lance@wuttaproject.org> Date: Wed, 19 Feb 2025 10:33:39 -0600 Subject: [PATCH 6/7] =?UTF-8?q?bump:=20version=200.22.6=20=E2=86=92=200.22?= =?UTF-8?q?.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b1726a4..c974b3a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to Tailbone will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.22.7 (2025-02-19) + +### Fix + +- stop using old config for logo image url on login page +- fix warning msg for deprecated Grid param + ## v0.22.6 (2025-02-01) ### Fix diff --git a/pyproject.toml b/pyproject.toml index 9e83df80..a7214a8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "Tailbone" -version = "0.22.6" +version = "0.22.7" description = "Backoffice Web Application for Rattail" readme = "README.md" authors = [{name = "Lance Edgar", email = "lance@edbob.org"}] From e15045380171617b32f9dca6bcbda8b2c2472310 Mon Sep 17 00:00:00 2001 From: Lance Edgar <lance@wuttaproject.org> Date: Wed, 5 Mar 2025 10:34:52 -0600 Subject: [PATCH 7/7] fix: add startup hack for tempmon DB model --- tailbone/app.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tailbone/app.py b/tailbone/app.py index b7262866..d2d0c5ef 100644 --- a/tailbone/app.py +++ b/tailbone/app.py @@ -62,6 +62,17 @@ def make_rattail_config(settings): # nb. this is for compaibility with wuttaweb settings['wutta_config'] = rattail_config + # must import all sqlalchemy models before things get rolling, + # otherwise can have errors about continuum TransactionMeta class + # not yet mapped, when relevant pages are first requested... + # cf. https://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/database/sqlalchemy.html#importing-all-sqlalchemy-models + # hat tip to https://stackoverflow.com/a/59241485 + if getattr(rattail_config, 'tempmon_engine', None): + from rattail_tempmon.db import model as tempmon_model, Session as TempmonSession + tempmon_session = TempmonSession() + tempmon_session.query(tempmon_model.Appliance).first() + tempmon_session.close() + # configure database sessions if hasattr(rattail_config, 'appdb_engine'): tailbone.db.Session.configure(bind=rattail_config.appdb_engine)