From 8410419717e33907d8f823b7348b068cdb159c5b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 1 Feb 2023 18:44:55 -0600 Subject: [PATCH] Remove support for Buefy 0.8 only Buefy 0.9 and greater are supported now --- tailbone/config.py | 9 +- tailbone/subscribers.py | 13 +- tailbone/templates/appinfo/configure.mako | 93 ++--- tailbone/templates/appinfo/index.mako | 34 +- tailbone/templates/custorders/create.mako | 337 +++++++----------- tailbone/templates/custorders/items/view.mako | 139 +++----- tailbone/templates/datasync/configure.mako | 274 ++++++-------- tailbone/templates/datasync/status.mako | 176 ++++----- tailbone/templates/generate_feature.mako | 93 ++--- tailbone/templates/grids/b-table.mako | 115 +++--- tailbone/templates/grids/buefy.mako | 95 +++-- tailbone/templates/importing/configure.mako | 137 +++---- tailbone/templates/luigi/configure.mako | 205 +++++------ tailbone/templates/luigi/index.mako | 248 ++++++------- tailbone/templates/people/index.mako | 45 +-- .../templates/people/view_profile_buefy.mako | 266 ++++++-------- tailbone/templates/products/lookup.mako | 141 +++----- tailbone/templates/tables/create.mako | 114 +++--- .../trainwreck/transactions/rollover.mako | 65 ++-- tailbone/templates/upgrades/configure.mako | 83 ++--- 20 files changed, 1057 insertions(+), 1625 deletions(-) diff --git a/tailbone/config.py b/tailbone/config.py index bcdde8a6..be8f2dc2 100644 --- a/tailbone/config.py +++ b/tailbone/config.py @@ -27,7 +27,6 @@ Rattail config extension for Tailbone from __future__ import unicode_literals, absolute_import import warnings -from pkg_resources import parse_version from rattail.config import ConfigExtension as BaseExtension from rattail.db.config import configure_session @@ -78,11 +77,9 @@ def get_buefy_version(config): def get_buefy_0_8(config, version=None): - if not version: - version = get_buefy_version(config) - if version == 'latest': - return False - return parse_version(version) < parse_version('0.9') + warnings.warn("get_buefy_0_8() is no longer supported", + DeprecationWarning, stacklevel=2) + return False def global_help_url(config): diff --git a/tailbone/subscribers.py b/tailbone/subscribers.py index cbbcb95a..7ffd92bc 100644 --- a/tailbone/subscribers.py +++ b/tailbone/subscribers.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2022 Lance Edgar +# Copyright © 2010-2023 Lance Edgar # # This file is part of Rattail. # @@ -40,10 +40,9 @@ from webhelpers2.html import tags import tailbone from tailbone import helpers from tailbone.db import Session -from tailbone.config import (csrf_header_name, should_expose_websockets, - get_buefy_0_8) +from tailbone.config import csrf_header_name, should_expose_websockets from tailbone.menus import make_simple_menus -from tailbone.util import should_use_buefy, get_global_search_options, get_libver +from tailbone.util import should_use_buefy, get_global_search_options def new_request(event): @@ -160,10 +159,8 @@ def before_render(event): # buefy themes get some extra treatment if should_use_buefy(request): - # TODO: remove this hack once all nodes safely on buefy 0.9 - version = get_libver(request, 'buefy') - renderer_globals['buefy_0_8'] = get_buefy_0_8(rattail_config, - version=version) + # TODO: remove this hack once nothing references it + renderer_globals['buefy_0_8'] = False # maybe set custom stylesheet css = None diff --git a/tailbone/templates/appinfo/configure.mako b/tailbone/templates/appinfo/configure.mako index bb932148..8483a7a2 100644 --- a/tailbone/templates/appinfo/configure.mako +++ b/tailbone/templates/appinfo/configure.mako @@ -102,68 +102,45 @@ - % if buefy_0_8: - - % endif + + + + Edit + + diff --git a/tailbone/templates/appinfo/index.mako b/tailbone/templates/appinfo/index.mako index 9b50b8a9..40bf31ce 100644 --- a/tailbone/templates/appinfo/index.mako +++ b/tailbone/templates/appinfo/index.mako @@ -59,31 +59,17 @@
- % if buefy_0_8: - - % endif + + {{ props.row.path }} +
diff --git a/tailbone/templates/custorders/create.mako b/tailbone/templates/custorders/create.mako index b0dca6ec..f75b6c65 100644 --- a/tailbone/templates/custorders/create.mako +++ b/tailbone/templates/custorders/create.mako @@ -886,94 +886,72 @@ paginated per-page="5" :debounce-search="1000"> - % if buefy_0_8: - - % endif