Compare commits
No commits in common. "805ce5966f2ebad4f15e493f02edec0e5fcafd68" and "dcdc0e7daba618f954b562300669b255099826e2" have entirely different histories.
805ce5966f
...
dcdc0e7dab
13
CHANGELOG.md
13
CHANGELOG.md
|
@ -5,19 +5,6 @@ All notable changes to wuttaweb will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
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).
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## v0.16.0 (2024-12-05)
|
|
||||||
|
|
||||||
### Feat
|
|
||||||
|
|
||||||
- add `get_template_context()` method for master view
|
|
||||||
|
|
||||||
### Fix
|
|
||||||
|
|
||||||
- add option for People entry in the Admin menu
|
|
||||||
- fix handling of `Upgrade.uuid`
|
|
||||||
- improve support for random objects with grid, master view
|
|
||||||
- hide CRUD header buttons if master view does not allow
|
|
||||||
|
|
||||||
## v0.15.0 (2024-11-24)
|
## v0.15.0 (2024-11-24)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|
|
@ -6,10 +6,10 @@ build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "WuttaWeb"
|
name = "WuttaWeb"
|
||||||
version = "0.16.0"
|
version = "0.15.0"
|
||||||
description = "Web App for Wutta Framework"
|
description = "Web App for Wutta Framework"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
authors = [{name = "Lance Edgar", email = "lance@wuttaproject.org"}]
|
authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]
|
||||||
license = {text = "GNU GPL v3+"}
|
license = {text = "GNU GPL v3+"}
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
|
@ -42,7 +42,7 @@ dependencies = [
|
||||||
"pyramid_tm",
|
"pyramid_tm",
|
||||||
"waitress",
|
"waitress",
|
||||||
"WebHelpers2",
|
"WebHelpers2",
|
||||||
"WuttJamaican[db]>=0.16.1",
|
"WuttJamaican[db]>=0.15.0",
|
||||||
"zope.sqlalchemy>=1.5",
|
"zope.sqlalchemy>=1.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@ wuttaweb = "wuttaweb.conf:WuttaWebConfigExtension"
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://wuttaproject.org/"
|
Homepage = "https://wuttaproject.org/"
|
||||||
Repository = "https://forgejo.wuttaproject.org/wutta/wuttaweb"
|
Repository = "https://forgejo.wuttaproject.org/wutta/wuttaweb"
|
||||||
Issues = "https://forgejo.wuttaproject.org/wutta/wuttaweb/issues"
|
|
||||||
Changelog = "https://forgejo.wuttaproject.org/wutta/wuttaweb/src/branch/master/CHANGELOG.md"
|
Changelog = "https://forgejo.wuttaproject.org/wutta/wuttaweb/src/branch/master/CHANGELOG.md"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -142,54 +142,38 @@ class MenuHandler(GenericHandler):
|
||||||
The return value for this method should be a *single* dict,
|
The return value for this method should be a *single* dict,
|
||||||
which will ultimately be one element of the final list of
|
which will ultimately be one element of the final list of
|
||||||
dicts as described in :class:`MenuHandler`.
|
dicts as described in :class:`MenuHandler`.
|
||||||
|
|
||||||
:param include_people: You can pass this flag to indicate the
|
|
||||||
admin menu should contain an entry for the "People" view.
|
|
||||||
"""
|
"""
|
||||||
items = []
|
|
||||||
|
|
||||||
if kwargs.get('include_people'):
|
|
||||||
items.extend([
|
|
||||||
{
|
|
||||||
'title': "All People",
|
|
||||||
'route': 'people',
|
|
||||||
'perm': 'people.list',
|
|
||||||
},
|
|
||||||
])
|
|
||||||
|
|
||||||
items.extend([
|
|
||||||
{
|
|
||||||
'title': "Users",
|
|
||||||
'route': 'users',
|
|
||||||
'perm': 'users.list',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'title': "Roles",
|
|
||||||
'route': 'roles',
|
|
||||||
'perm': 'roles.list',
|
|
||||||
},
|
|
||||||
{'type': 'sep'},
|
|
||||||
{
|
|
||||||
'title': "App Info",
|
|
||||||
'route': 'appinfo',
|
|
||||||
'perm': 'appinfo.list',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'title': "Raw Settings",
|
|
||||||
'route': 'settings',
|
|
||||||
'perm': 'settings.list',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'title': "Upgrades",
|
|
||||||
'route': 'upgrades',
|
|
||||||
'perm': 'upgrades.list',
|
|
||||||
},
|
|
||||||
])
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'title': "Admin",
|
'title': "Admin",
|
||||||
'type': 'menu',
|
'type': 'menu',
|
||||||
'items': items,
|
'items': [
|
||||||
|
{
|
||||||
|
'title': "Users",
|
||||||
|
'route': 'users',
|
||||||
|
'perm': 'users.list',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'title': "Roles",
|
||||||
|
'route': 'roles',
|
||||||
|
'perm': 'roles.list',
|
||||||
|
},
|
||||||
|
{'type': 'sep'},
|
||||||
|
{
|
||||||
|
'title': "App Info",
|
||||||
|
'route': 'appinfo',
|
||||||
|
'perm': 'appinfo.list',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'title': "Raw Settings",
|
||||||
|
'route': 'settings',
|
||||||
|
'perm': 'settings.list',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'title': "Upgrades",
|
||||||
|
'route': 'upgrades',
|
||||||
|
'perm': 'upgrades.list',
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
|
|
|
@ -217,7 +217,7 @@ class UpgradeView(MasterView):
|
||||||
|
|
||||||
def get_upgrade_filepath(self, upgrade, filename=None, create=True):
|
def get_upgrade_filepath(self, upgrade, filename=None, create=True):
|
||||||
""" """
|
""" """
|
||||||
uuid = str(upgrade.uuid)
|
uuid = upgrade.uuid
|
||||||
path = self.app.get_appdir('data', 'upgrades', uuid[:2], uuid[2:],
|
path = self.app.get_appdir('data', 'upgrades', uuid[:2], uuid[2:],
|
||||||
create=create)
|
create=create)
|
||||||
if filename:
|
if filename:
|
||||||
|
|
|
@ -14,17 +14,8 @@ class TestMenuHandler(WebTestCase):
|
||||||
self.handler = mod.MenuHandler(self.config)
|
self.handler = mod.MenuHandler(self.config)
|
||||||
|
|
||||||
def test_make_admin_menu(self):
|
def test_make_admin_menu(self):
|
||||||
|
menus = self.handler.make_admin_menu(self.request)
|
||||||
# no people entry by default
|
self.assertIsInstance(menus, dict)
|
||||||
menu = self.handler.make_admin_menu(self.request)
|
|
||||||
self.assertIsInstance(menu, dict)
|
|
||||||
routes = [item.get('route') for item in menu['items']]
|
|
||||||
self.assertNotIn('people', routes)
|
|
||||||
|
|
||||||
# but we can request it
|
|
||||||
menu = self.handler.make_admin_menu(self.request, include_people=True)
|
|
||||||
routes = [item.get('route') for item in menu['items']]
|
|
||||||
self.assertIn('people', routes)
|
|
||||||
|
|
||||||
def test_make_menus(self):
|
def test_make_menus(self):
|
||||||
menus = self.handler.make_menus(self.request)
|
menus = self.handler.make_menus(self.request)
|
||||||
|
|
|
@ -127,7 +127,7 @@ class TestUpgradeView(WebTestCase):
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
|
|
||||||
view = self.make_view()
|
view = self.make_view()
|
||||||
uuid = str(upgrade.uuid)
|
uuid = upgrade.uuid
|
||||||
|
|
||||||
# no filename
|
# no filename
|
||||||
path = view.download_path(upgrade, None)
|
path = view.download_path(upgrade, None)
|
||||||
|
@ -153,7 +153,7 @@ class TestUpgradeView(WebTestCase):
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
|
|
||||||
view = self.make_view()
|
view = self.make_view()
|
||||||
uuid = str(upgrade.uuid)
|
uuid = upgrade.uuid
|
||||||
|
|
||||||
# no filename
|
# no filename
|
||||||
path = view.get_upgrade_filepath(upgrade)
|
path = view.get_upgrade_filepath(upgrade)
|
||||||
|
|
Loading…
Reference in a new issue