WebGrid 0.5.2__tar.gz → 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. {WebGrid-0.5.2 → WebGrid-0.5.3}/PKG-INFO +9 -1
  2. {WebGrid-0.5.2 → WebGrid-0.5.3}/WebGrid.egg-info/PKG-INFO +9 -1
  3. {WebGrid-0.5.2 → WebGrid-0.5.3}/changelog.rst +8 -0
  4. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/__init__.py +1 -1
  5. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/test_columns.py +13 -0
  6. WebGrid-0.5.3/webgrid/version.py +1 -0
  7. WebGrid-0.5.2/webgrid/version.py +0 -1
  8. {WebGrid-0.5.2 → WebGrid-0.5.3}/MANIFEST.in +0 -0
  9. {WebGrid-0.5.2 → WebGrid-0.5.3}/WebGrid.egg-info/SOURCES.txt +0 -0
  10. {WebGrid-0.5.2 → WebGrid-0.5.3}/WebGrid.egg-info/dependency_links.txt +0 -0
  11. {WebGrid-0.5.2 → WebGrid-0.5.3}/WebGrid.egg-info/entry_points.txt +0 -0
  12. {WebGrid-0.5.2 → WebGrid-0.5.3}/WebGrid.egg-info/not-zip-safe +0 -0
  13. {WebGrid-0.5.2 → WebGrid-0.5.3}/WebGrid.egg-info/requires.txt +0 -0
  14. {WebGrid-0.5.2 → WebGrid-0.5.3}/WebGrid.egg-info/top_level.txt +0 -0
  15. {WebGrid-0.5.2 → WebGrid-0.5.3}/readme.rst +0 -0
  16. {WebGrid-0.5.2 → WebGrid-0.5.3}/setup.cfg +0 -0
  17. {WebGrid-0.5.2 → WebGrid-0.5.3}/setup.py +0 -0
  18. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/blazeweb.py +0 -0
  19. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/extensions.py +0 -0
  20. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/filters.py +0 -0
  21. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/flask.py +0 -0
  22. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/i18n/babel.cfg +0 -0
  23. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/i18n/es/LC_MESSAGES/webgrid.mo +0 -0
  24. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/i18n/es/LC_MESSAGES/webgrid.po +0 -0
  25. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/i18n/webgrid.pot +0 -0
  26. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/renderers.py +0 -0
  27. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/application_form_edit.png +0 -0
  28. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/b_firstpage.png +0 -0
  29. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/b_lastpage.png +0 -0
  30. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/b_nextpage.png +0 -0
  31. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/b_prevpage.png +0 -0
  32. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/bd_firstpage.png +0 -0
  33. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/bd_lastpage.png +0 -0
  34. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/bd_nextpage.png +0 -0
  35. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/bd_prevpage.png +0 -0
  36. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/delete.png +0 -0
  37. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/gettext.min.js +0 -0
  38. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/i18n/es/LC_MESSAGES/webgrid.json +0 -0
  39. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/jquery.multiple.select.js +0 -0
  40. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/multiple-select.css +0 -0
  41. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/multiple-select.png +0 -0
  42. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/th_arrow_down.png +0 -0
  43. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/th_arrow_up.png +0 -0
  44. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/webgrid.css +0 -0
  45. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/static/webgrid.js +0 -0
  46. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/templates/grid.html +0 -0
  47. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/templates/grid_footer.html +0 -0
  48. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/templates/grid_header.html +0 -0
  49. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/templates/grid_table.html +0 -0
  50. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/templates/header_filtering.html +0 -0
  51. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/templates/header_paging.html +0 -0
  52. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/templates/header_sorting.html +0 -0
  53. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/testing.py +0 -0
  54. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/__init__.py +0 -0
  55. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/conftest.py +0 -0
  56. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/data/basic_table.html +0 -0
  57. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/data/people_table.html +0 -0
  58. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/data/stopwatch_table.html +0 -0
  59. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/helpers.py +0 -0
  60. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/test_api.py +0 -0
  61. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/test_filters.py +0 -0
  62. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/test_rendering.py +0 -0
  63. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/test_testing.py +0 -0
  64. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/test_types.py +0 -0
  65. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/tests/test_unit.py +0 -0
  66. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/types.py +0 -0
  67. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid/utils.py +0 -0
  68. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/__init__.py +0 -0
  69. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/app.py +0 -0
  70. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/data/basic_table.html +0 -0
  71. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/data/people_table.html +0 -0
  72. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/extensions.py +0 -0
  73. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/grids.py +0 -0
  74. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/helpers.py +0 -0
  75. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/i18n/babel.cfg +0 -0
  76. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/i18n/es/LC_MESSAGES/webgrid_ta.mo +0 -0
  77. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/i18n/es/LC_MESSAGES/webgrid_ta.po +0 -0
  78. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/i18n/webgrid_ta.pot +0 -0
  79. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/manage.py +0 -0
  80. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/model/__init__.py +0 -0
  81. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/model/entities.py +0 -0
  82. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/model/helpers.py +0 -0
  83. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/templates/groups.html +0 -0
  84. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/templates/index.html +0 -0
  85. {WebGrid-0.5.2 → WebGrid-0.5.3}/webgrid_ta/views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: WebGrid
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: A library for rendering HTML tables and Excel files from SQLAlchemy models.
5
5
  Home-page: https://github.com/level12/webgrid
6
6
  Author: Randy Syring
@@ -88,6 +88,14 @@ Links
88
88
  Changelog
89
89
  =========
90
90
 
91
+ 0.5.3 released 2023-03-02
92
+ -------------------------
93
+
94
+ - fix column attribute extraction for non-SQLAlchemy records (a090491_)
95
+
96
+ .. _a090491: https://github.com/level12/webgrid/commit/a090491
97
+
98
+
91
99
  0.5.2 released 2023-02-24
92
100
  -------------------------
93
101
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: WebGrid
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: A library for rendering HTML tables and Excel files from SQLAlchemy models.
5
5
  Home-page: https://github.com/level12/webgrid
6
6
  Author: Randy Syring
@@ -88,6 +88,14 @@ Links
88
88
  Changelog
89
89
  =========
90
90
 
91
+ 0.5.3 released 2023-03-02
92
+ -------------------------
93
+
94
+ - fix column attribute extraction for non-SQLAlchemy records (a090491_)
95
+
96
+ .. _a090491: https://github.com/level12/webgrid/commit/a090491
97
+
98
+
91
99
  0.5.2 released 2023-02-24
92
100
  -------------------------
93
101
 
@@ -1,6 +1,14 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 0.5.3 released 2023-03-02
5
+ -------------------------
6
+
7
+ - fix column attribute extraction for non-SQLAlchemy records (a090491_)
8
+
9
+ .. _a090491: https://github.com/level12/webgrid/commit/a090491
10
+
11
+
4
12
  0.5.2 released 2023-02-24
5
13
  -------------------------
6
14
 
@@ -322,7 +322,7 @@ class Column(object):
322
322
  if isinstance(record, dict):
323
323
  return record[self.key]
324
324
  return record._mapping[self.key]
325
- except (TypeError, KeyError):
325
+ except (TypeError, KeyError, AttributeError):
326
326
  pass
327
327
 
328
328
  # index style based on position in query and key
@@ -3,6 +3,7 @@ import datetime as dt
3
3
  from decimal import Decimal as D
4
4
 
5
5
  from blazeutils.containers import HTMLAttributes
6
+ from blazeutils.datastructures import BlankObject
6
7
  import pytest
7
8
 
8
9
  from webgrid import (
@@ -124,6 +125,18 @@ class TestColumn(object):
124
125
  assert col.can_sort is False
125
126
  assert col.visible is False
126
127
 
128
+ def test_extraction_by_key(self):
129
+ col = Column('Foo', 'foo')
130
+ record = {'foo': 'bar', 'other': 'value'}
131
+ data = col.extract_data(record)
132
+ assert data == 'bar'
133
+
134
+ def test_extraction_by_attribute(self):
135
+ col = Column('Foo', 'foo')
136
+ record = BlankObject(foo='bar', other='value')
137
+ data = col.extract_data(record)
138
+ assert data == 'bar'
139
+
127
140
  def test_nonkeyed_not_sort(self):
128
141
  class TG(Grid):
129
142
  FullNameColumn('Full Name')
@@ -0,0 +1 @@
1
+ VERSION = '0.5.3'
@@ -1 +0,0 @@
1
- VERSION = '0.5.2'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes