Compare commits

...

16 commits

Author SHA1 Message Date
2500805c54 bump: version 0.22.11 → 0.23.0 2025-10-19 13:47:29 -05:00
8a3c147858 feat: require latest rattail; drop passlib dependency
should be using bcrypt directly now, even though technically rattail
still requires passlib
2025-10-19 13:46:24 -05:00
5ae236f228 fix: depend on latest rattail
to bring in sqlalchemy-utils
2025-10-04 10:08:26 -05:00
b62e41966c bump: version 0.22.10 → 0.22.11 2025-09-20 15:47:20 -05:00
c230536e49 fix: avoid error when row object missing field 2025-09-20 15:47:00 -05:00
3cc37bea30 bump: version 0.22.9 → 0.22.10 2025-09-20 14:47:29 -05:00
207125bdb3 fix: avoid error if 'default' theme not included 2025-09-20 14:47:05 -05:00
5a78b0740d fix: fix config extension entry point
per upstream changes
2025-09-20 14:41:55 -05:00
8e7169fb4a bump: version 0.22.8 → 0.22.9 2025-09-20 14:11:44 -05:00
6f14bb0e88 fix: small bugfixes per upstream changes 2025-09-06 12:09:39 -05:00
fcc90d25ac bump: version 0.22.7 → 0.22.8 2025-05-20 17:23:00 -05:00
e150453801 fix: add startup hack for tempmon DB model 2025-03-05 10:34:52 -06:00
e2582ffec5 bump: version 0.22.6 → 0.22.7 2025-02-19 10:33:39 -06:00
a6508154cb docs: update intersphinx doc links per server migration 2025-02-18 12:13:28 -06:00
7348eec671 fix: stop using old config for logo image url on login page 2025-02-18 11:16:23 -06:00
4221fa50dd fix: fix warning msg for deprecated Grid param 2025-02-14 11:37:21 -06:00
9 changed files with 68 additions and 21 deletions

View file

@ -5,6 +5,48 @@ 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.23.0 (2025-10-19)
### Feat
- require latest rattail; drop passlib dependency
### Fix
- depend on latest rattail
## v0.22.11 (2025-09-20)
### Fix
- avoid error when row object missing field
## v0.22.10 (2025-09-20)
### Fix
- avoid error if 'default' theme not included
- fix config extension entry point
## v0.22.9 (2025-09-20)
### Fix
- small bugfixes per upstream changes
## v0.22.8 (2025-05-20)
### Fix
- add startup hack for tempmon DB model
## 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

View file

@ -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

View file

@ -6,7 +6,7 @@ build-backend = "hatchling.build"
[project]
name = "Tailbone"
version = "0.22.6"
version = "0.23.0"
description = "Backoffice Web Application for Rattail"
readme = "README.md"
authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]
@ -43,7 +43,6 @@ dependencies = [
"openpyxl",
"paginate",
"paginate_sqlalchemy",
"passlib",
"Pillow",
"pyramid>=2",
"pyramid_beaker",
@ -53,7 +52,7 @@ dependencies = [
"pyramid_mako",
"pyramid_retry",
"pyramid_tm",
"rattail[db,bouncer]>=0.20.1",
"rattail[db,bouncer]>=0.21.0",
"sa-filters",
"simplejson",
"transaction",
@ -78,7 +77,7 @@ webapi = "tailbone.webapi:main"
beaker = "tailbone.cleanup:BeakerCleaner"
[project.entry-points."rattail.config.extensions"]
[project.entry-points."wutta.config.extensions"]
tailbone = "tailbone.config:ConfigExtension"

View file

@ -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)

View file

@ -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'))
@ -578,7 +578,7 @@ class Grid(WuttaGrid):
try:
return obj[column_name]
except TypeError:
except (TypeError, KeyError):
pass
def render_currency(self, obj, column_name):

View file

@ -300,8 +300,8 @@ def get_available_themes(rattail_config, include=None):
available.sort()
# make default theme the first option
i = available.index('default')
if i >= 0:
if 'default' in available:
i = available.index('default')
available.pop(i)
available.insert(0, 'default')

View file

@ -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),
}

View file

@ -343,7 +343,7 @@ class MasterView(View):
return self.redirect(self.request.current_route_url(**kw))
# Stash some grid stats, for possible use when generating URLs.
if grid.paginated and hasattr(grid, 'pager'):
if grid.paginated and grid.pager is not None:
self.first_visible_grid_index = grid.pager.first_item
# return grid data only, if partial page was requested

View file

@ -341,7 +341,7 @@ class TestGrid(WebTestCase):
# settings are loaded, applied, saved
self.assertEqual(grid.sort_defaults, [])
self.assertFalse(hasattr(grid, 'active_sorters'))
self.assertIsNone(grid.active_sorters)
self.request.GET = {'sort1key': 'name', 'sort1dir': 'desc'}
grid.load_settings()
self.assertEqual(grid.active_sorters, [{'key': 'name', 'dir': 'desc'}])
@ -365,7 +365,7 @@ class TestGrid(WebTestCase):
# with sort defaults
grid = self.make_grid(model_class=model.Setting, sortable=True,
sort_on_backend=True, sort_defaults='name')
self.assertFalse(hasattr(grid, 'active_sorters'))
self.assertIsNone(grid.active_sorters)
grid.load_settings()
self.assertEqual(grid.active_sorters, [{'key': 'name', 'dir': 'asc'}])
@ -376,7 +376,7 @@ class TestGrid(WebTestCase):
mod.SortInfo('name', 'asc'),
mod.SortInfo('value', 'desc'),
]
self.assertFalse(hasattr(grid, 'active_sorters'))
self.assertIsNone(grid.active_sorters)
grid.load_settings()
self.assertEqual(grid.active_sorters, [{'key': 'name', 'dir': 'asc'}])
@ -390,7 +390,7 @@ class TestGrid(WebTestCase):
grid = self.make_grid(key='settings', model_class=model.Setting,
sortable=True, sort_on_backend=True,
paginated=True, paginate_on_backend=True)
self.assertFalse(hasattr(grid, 'active_sorters'))
self.assertIsNone(grid.active_sorters)
grid.load_settings()
self.assertEqual(grid.active_sorters, [{'key': 'name', 'dir': 'desc'}])