Commit graph

6997 commits

Author SHA1 Message Date
Karl Hobley
12fa1ebee8 Fix API v1 tests
We're updated the BlogEntryPage model to use class-based api_fields but
API v1 doesn't support them. This commit adds enough compatibility to
make the v1 API tests work but issues a warning if the v1 API module
encounters any new style configs that it doesn't support.
2017-04-06 10:22:02 +01:00
Karl Hobley
726e85f4a6 Simplified API fields getter methods 2017-04-06 09:41:19 +01:00
Karl Hobley
84d6262ca5 Renamed field_configs to field_serializer_overrides 2017-03-30 11:12:08 +01:00
Karl Hobley
161d55565b Updated to use APIField class in api_fields
Thanks to @BertrandBordage for the suggestion!
2017-03-30 11:08:33 +01:00
Karl Hobley
268899b471 Allow custom field classes to be used in api_fields 2017-03-17 16:57:50 +00:00
Karl Hobley
9d7a33a87a Moved ImageRenditionField to a more importable place 2017-03-17 16:36:59 +00:00
Karl Hobley
301463a99d Use source keyword argument (instead of overriding get_attribute)
This allows the ImageRenditionField to be used on models that contain an
image field.
2017-03-17 16:36:49 +00:00
Matt Westcott
55eaa0c137 Don't use "!important" on animated properties on userbar items (#3447)
They don't seem to be necessary (the .is-active properties surely have higher specificity than the ones that set initial state), and they cause a rendering bug on Firefox 52. Fixes #3443
2017-03-15 23:54:06 +02:00
Janneke Janssen
a2d7b133fc Release notes for #3440 2017-03-13 17:18:25 +01:00
Matt Westcott
8b57a46ecc Add a separate 'detail' section to message rendering
This allows us to include block-level content (such as a list of validation errors) into the message without breaking the positioning of buttons - see https://github.com/wagtail/wagtail/pull/3440#discussion_r105564633
2017-03-13 17:10:06 +01:00
Matt Westcott
4a5714d5c7 Display non_field_errors from the page editor form as part of the header error message
Fixes #536
2017-03-13 17:10:06 +01:00
Matt Westcott
7ae9056429 fixup! Dj1.11 - Fix rendering of group permission checkboxes 2017-03-12 12:52:42 +03:00
Matt Westcott
313c2092bd Dj1.11 - Fix rendering of group permission checkboxes
The format_permissions tag used to lay out the permission checkboxes
worked by iterating over the BoundField, which gave a sequence of
CheckboxChoiceInput objects. This class has been dropped in 1.11 and
superseded by BoundWidget, which has a different way of accessing the
checkbox value. Add separate code paths for the two cases.
2017-03-12 12:52:42 +03:00
Matt Westcott
a98e0d9862 Add Python 3.6 to CI test matrix 2017-03-12 12:52:42 +03:00
Matt Westcott
e34bde2e5d fixup! Use assertTagInTemplateScript to test HTML declarations 2017-03-12 12:52:42 +03:00
Matt Westcott
217c839473 fixup! Use appropriate assertInHTML / assertTagInHTML variants for FieldBlock tests 2017-03-12 12:52:42 +03:00
Matt Westcott
f6ae4f9dd9 fixup! Add assertTagInHTML test helper 2017-03-12 12:52:42 +03:00
Matt Westcott
cc3b826025 fixup! Add Django 1.11b1 to Travis as allow_failures 2017-03-12 12:52:42 +03:00
Matt Westcott
73639938b7 fixup! Add Django 1.11b1 to Travis as allow_failures 2017-03-12 12:52:42 +03:00
Matt Westcott
2f6c88f52b Add Django 1.11b1 to Travis as allow_failures 2017-03-12 12:52:42 +03:00
Matt Westcott
e17668521a Fix remaining tests to use HTML-level comparison 2017-03-12 12:52:42 +03:00
Matt Westcott
68fa4dbea8 Add allow_extra_attrs option to assertTagInHTML 2017-03-12 12:52:42 +03:00
Matt Westcott
06605acae3 Use assertTagInTemplateScript to test HTML declarations 2017-03-12 12:52:42 +03:00
Matt Westcott
9c5ab4facf Add assertTagInTemplateScript test helper function
This asserts that a tag exists within a <script type="text/template"> block in the given HTML,
matching as per assertTagInHTML rules.
2017-03-12 12:52:42 +03:00
Matt Westcott
064d06c62c Use appropriate assertInHTML / assertTagInHTML variants for FieldBlock tests 2017-03-12 12:52:42 +03:00
Matt Westcott
5ac2aa62c1 Add assertTagInHTML test helper
This asserts that the given tag exists in the HTML content, respecting tag name and attributes but ignoring content.
2017-03-12 12:52:42 +03:00
Matt Westcott
8fc035af5e Ignore HTML attribute ordering in widget rendering tests
Patch provided by @timgraham via https://github.com/wagtail/wagtail/issues/3314#issuecomment-281774365
2017-03-12 12:52:42 +03:00
hyden
01e891d0c4 Convert every Cloudflare API error message into string (#3436) 2017-03-09 19:36:08 +00:00
Daniel Chimeno
92f64bef27 make script py2/3 compatible 2017-03-08 15:51:23 +00:00
Matt Westcott
21f1292cf7 Reinstate underscore in fields param, as per 40842fe8bf (commitcomment-21183519) 2017-03-07 11:03:30 +00:00
Matt Westcott
60f28f8dc3 Mark API v1 documentation as deprecated (#3429) 2017-03-07 10:49:19 +00:00
jacoor
40842fe8bf typo fix 2017-03-07 10:48:30 +00:00
Matt Westcott
ef5c61ece7 Fix inconsistent capitalisation that resulted in unnecessary extra strings to translate
Thanks to @chimeno
2017-03-07 10:23:16 +00: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
Matt Westcott
449c578c38 Fix UnorderedObjectListWarnings from paginated lists not specifying an ordering 2017-03-03 14:41:59 +00:00
Matt Westcott
29070191d6 Add on_delete param to ParentalKey 2017-03-03 12:34:12 +00:00
Trent Holliday
f28130647a Title not displaying page name
The `page` context variable does not exist for that view.
2017-03-03 09:56:05 +01:00
Thibaud Colas
d4e63c74e5 Mention Awesome Wagtail on "third-party tutorials" page (#3419)
It feels relevant to mention Awesome Wagtail here since it serves the same purpose as this page.
2017-03-02 12:00:38 +00:00
Janneke Janssen
6e9965d47f Fix possibility of tabbed interface conflicting with regular IDs 2017-03-01 16:57:09 +00:00
cho-leukeleu
d2baa4ba05 Update results.html
Close anchor tag
2017-03-01 15:55:44 +00:00
Stein Strindhaug
35305e1649 Fix for #3268 : Make file-label translated 2017-03-01 15:50:42 +00:00
Karl Hobley
986749d309 Flake8 plugins (#3411)
* Installed flake8-blind-except plugin

* Installed flake8-print plugin

* Combined flake8 and isort in Drone

flake8 needs to install a couple more dependencies now so I think it
makes sense to merge these and install testing dependencies in one go.
2017-03-01 12:21:34 +00:00
Matt Westcott
aa3ff07053 Dj1.11 - Specify ALLOWED_HOSTS in preview test
Django 1.11 now validates ALLOWED_HOSTS during tests:
https://docs.djangoproject.com/en/1.11/topics/testing/advanced/#topics-testing-advanced-multiple-hosts
2017-03-01 11:56:26 +00:00
Matt Westcott
54012e6397 Fix backtick quoting 2017-02-23 12:24:32 +00:00
Matt Westcott
d4114ff4ae Release note for #3007 2017-02-23 12:23:03 +00:00
Bertrand Bordage
87e11bec86 Adds password validation. 2017-02-23 12:19:24 +00:00
Bertrand Bordage
9216d434db Factorizes UserCreationForm and UserEditForm. 2017-02-23 10:40:45 +00:00
Tim Graham
7d8a1a0d1e Remove transitive imports of django.forms.utils.flattatt (#3397) 2017-02-22 19:31:07 +00:00
Matt Westcott
63d52af0a3 Release note for dropping Django 1.9 and Python 3.3 (#3376) 2017-02-22 17:40:09 +00:00
Matt Westcott
187908e773 Remove statement of Django 1.9 and Python 3.3 compatibility from docs 2017-02-22 17:39:38 +00:00