Commit Graph

60 Commits

Author SHA1 Message Date
Gert Steyn cb71f869bb Changed from django.utils.datastructures.SortedDict (deprecated) to collections.OrderedDict 2015-03-19 12:20:42 +02:00
Bradley Ayers 006cc878ce Merge pull request #165 from ionelmc/master
Fix "silent" error handling in the TableData.__init__
2014-03-08 10:35:35 +11:00
Bradley Ayers 86056eedeb Add support for computed values. 2014-02-02 20:06:59 +11:00
Bradley Ayers 2bf273a350 Fix #178 -- using unicode in `fields` option. 2013-12-14 12:11:45 +11:00
Ionel Cristian Mărieș a4eecf646e Replace the exception dance with light input validation. 2013-08-28 14:38:53 +03:00
Ionel Cristian Mărieș c76a2bea1e Ooops, forgot the parens. 2013-08-27 14:38:32 +03:00
Ionel Cristian Mărieș 3287aa2a18 Fix the syntax to be parseable under py3 2013-08-27 14:29:29 +03:00
Ionel Cristian Mărieș 66e1f35205 Fix "silent" error handling in the TableData.__init__ to prepend the complete traceback and show original exception for Python 2.x. Previously it was impossible to debug query-time issues with django_tables2. 2013-08-27 13:50:38 +03:00
Bradley Ayers c9f3b9ac2a Fix tests for Python 2 2013-03-28 20:49:54 +11:00
Bradley Ayers 7e8fad55f0 All tests pass on Python 3.2 2013-03-28 09:20:35 +11:00
Bradley Ayers 7113cc701a Various compat changes for Python 3 2013-02-27 10:20:22 +10:00
Bradley Ayers 984fcbcb8e Remove use of deprecated StrAndUnicode base class 2013-01-09 17:12:25 +10:00
Sławek Ehlert 83d03fe901 support for localize in Table Meta class
with localize/unlocalize tuples
2012-12-03 19:30:06 +01:00
Dylan Verheul efbb49398c Added optional request parameter to Table, for automatic calling of RequestConfig 2012-11-23 14:01:01 +01:00
Bradley Ayers 512b91ead4 Fix #102, #101 2012-09-30 12:57:36 +10:00
Bradley Ayers 0741abd31c Satisfy pylint, add Python 3.2 testenv to tox 2012-09-27 09:48:11 +10:00
Bradley Ayers 0df5c4d50f Add support for Django 1.2 (though 1.1 *might* work) 2012-09-18 15:02:15 +10:00
Bradley Ayers 9effe9efe8 Add cardinality to the pagination display, resolves #94 2012-09-15 08:53:59 +10:00
Bradley Ayers 52cabdf4b5 Add BooleanColumn, tests, and the column library 2012-09-14 22:55:14 +10:00
Bradley Ayers b3af753061 Cleanup various coding problems. 2012-09-14 12:25:11 +10:00
Bradley Ayers 3ed0c77a46 Fix bug with table data ordering 2012-09-14 12:22:00 +10:00
Bradley Ayers 7836c98231 Column classes are chosen intelligently when building a table based on a model, resolves #91 2012-09-14 12:21:59 +10:00
Bradley Ayers 5999ad9121 Silent pagination errors are now handled in RequestConfig, Table.paginate raises paginator exceptions. Resolves #68 2012-09-12 09:59:12 +10:00
Bradley Ayers 3fff8c7172 Reduce the number of queries made when rendering a table, resolves #87 2012-09-11 10:36:16 +10:00
Bradley Ayers 0a2fdce275 Tables now try to determine queryset ordering automatically. Resolves #77 2012-07-12 11:47:52 +10:00
Bradley Ayers 9ae713f111 Minor comments + style cleanup 2012-07-12 11:41:27 +10:00
Bradley Ayers d0666e32c1 Change default value from en to em dash. 2012-06-24 11:26:38 +10:00
Bradley Ayers 315583bec5 Column defaults are now more sensible, resolves #64 2012-06-24 10:48:41 +10:00
Bradley Ayers 4b3330a84e When using model backed table, allow non-field values on the model to be specified in 'fields', resolves #82 2012-06-20 09:42:35 +10:00
Bradley Ayers fe5c187579 Setting Table.Meta.fields now affects default sequence of columns. Resolves #76 2012-06-16 11:36:30 +10:00
Selwin Ong 527a891457 Table.sequence should respect ._meta.sequence.
A few minor tweaks and fixes.
2012-05-13 11:35:15 +10:00
Selwin Ong 2d84a1ee15 Revert "Moved table._sequence to table._sequence_expanded for backwards compatibility."
This reverts commit 1debcfe942a19dffbe8253162ee8b1696e642a81.
2012-05-13 11:35:14 +10:00
Selwin Ong 73b7e1d157 Moved table._sequence to table._sequence_expanded for backwards compatibility. 2012-05-13 11:35:14 +10:00
Selwin Ong 76ea9a959d Store fully expanded sequence in _sequence 2012-05-13 11:35:14 +10:00
Selwin Ong 35833e4003 Make table.sequence default to ... 2012-05-13 11:30:00 +10:00
Selwin Ong 0c8fdddf42 Instantiate ``BoundColumn``s only once when table is first instantiated instead of every time a row is being read. 2012-05-13 11:30:00 +10:00
Pablo Martín 31a9503de4 Two littles error after the merge 2012-05-03 12:00:22 +02:00
Bradley Ayers 8b418447ab Made some minor tweaks after merge. 2012-05-03 10:13:33 +10:00
Pablo Martín de9058bc31 Now you can have something like this:
class PersonTable(tables.Table):

        class Meta:
	    model = Person
	    fields = ('first_name', 'email')

Before only exists exclude in the meta class.

In the words of python: "More implicit than explicit".
2012-04-20 14:20:52 +02:00
Bradley Ayers 1d7cf79383 Localise Django 1.3 dependency to Table.as_html 2012-04-06 07:41:34 +10:00
Bradley Ayers 2e941c71e5 Polish merge and bump to v0.10.1 2012-03-26 14:24:40 +10:00
Christopher Keele b45a40ec1b Honor paginators default per_pages, change nomenclature, remove sanity checks, keep pagination set to true by default. 2012-03-19 17:37:12 -05:00
Christopher Keele 99b4eef0e6 Since pagination is true by default, and therefore calls table.paginate, the default per_page ought to actually implement pagination instead of forcing an ugly 'Page 1 of 1' at the botton of the table. 2012-03-16 02:56:35 -05:00
Bradley Ayers 910f278b95 Fix bug in TableData order_by for queryset data 2012-03-14 12:07:20 +10:00
Bradley Ayers 44689e5881 Use functions rather than special methods, e.g. type(f) instead of f.__class__ 2012-03-14 11:59:59 +10:00
Bradley Ayers dfae3b229b Add column order by accessors, fixes #20 #48. Thanks thibault, skandocious, alvarovmz
Also renamed `sortable` to `orderable`.
Bump to v0.10.0
2012-03-14 11:45:54 +10:00
Bradley Ayers 908bf6b945 Table.__init__ no longer *always* calls .order_by() on querysets, fixes #55 2012-03-08 14:37:55 +10:00
Michael Hudson-Doyle 2858190f27 super call __new__ in DeclarativeColumnsMetaclass.__new__ 2012-03-08 13:39:54 +10:00
Bradley Ayers 1bb87b3f72 House cleaning after merging pull request.
- Use django.utils.html.escape rather than xml.sax
- Attach the template context to the table if using {% render_table %}
- Change TemplateColumn to look for table.context rather than table.request
- Add tests for TemplateColumn
- Add test for {% querystring %} to expose incorrect escaping bug
- Remove requirement for `request` to be in template context when using {% render_table %}
2012-02-24 09:06:51 +10:00
Chris Wilson 455a62eea6 Don't rethrow exception in debug mode, to keep the old stack trace. 2012-02-24 07:52:31 +10:00