0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
Commit Graph

7 Commits

Author SHA1 Message Date
Andy Babic
37bbbb9dba Improved code separation in contrib.modeladmin (#3467)
* Split `helpers.py` into separate `url.py`, `permission.py` and `button.py`, dedicated to those separate concerns and update the docs accordingly

* Move `ThumbnailMixin` out to `mixins.py` and update documentation accordingly

* Ad #NOQA to import lines to hush pep errors

* Alphabetise helper import order

* - Delete `helpers/helpers.py`
- wagtal -> wagtail in docs
2017-03-28 10:34:03 +01:00
Andy Babic
3348cd5c89 Reduce modeladmin’s dependency on wagtail.wagtailimages and wagtail.wagtaildocs
- Remove imports at the top of options.py and views.py that result in ImportError when those apps aren’t installed
- Alter ThumbnailMixin and InspectView to use the `wagtail.wagtailimages.shortcuts.get_rendition_or_not_found()` method to render images, which handles missing image source files gracefully, and reduces code duplication.
- Simplify `get_field_display_value()` by not limiting image and document rendering to ForeignKey fields. It should work consistently for property methods or other attributes too.
2017-03-03 15:33:17 +00:00
Matheus Bratfisch
ca16e9187f Add exclude_fields to ModelAdmin and ModelFormView, tests and doc 2017-02-22 11:41:44 +00:00
Tim Heap
6ba34636cb Fix whitespace errors in docs
Trimmed trailing whitespace, convert tabs to 4 spaces, add preference
for spaces to `.editorconfig`.
2016-11-28 13:41:35 +00:00
Andy Babic
23eced1fcd `Added support for 'exclude_from_explorer' attribute on ModelAdmin class 2016-11-23 16:51:08 +00:00
Andy Babic
78f67f8fdb * Gives the result_row_display control over the <tr> element for each row in IndexView by shifting the <tr> out of result_list.html and into result_row.html
* `result_row_display` adds a `data-object_pk` attribute to each row, to make items easier to identify with JS
* Adds `get_extra_attrs_for_row()` method to `ModelAdmin`, to give developers a way of adding further attributes to the `<tr>` element
2016-10-21 17:20:54 +01:00
Andy Babic
0c1b67bc16 Add documentation to help with customisation of contrib.modeladmin 2016-09-28 20:52:19 +01:00