0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00
Commit Graph

6227 Commits

Author SHA1 Message Date
Karl Hobley
b6c80cde36 1.4.3 no longer in development 2016-04-04 21:39:58 +01:00
Karl Hobley
81cdca1a91 Changelog/release note for #2438 2016-04-04 17:15:24 +01:00
Karl Hobley
1e44d78a02 Simplified _get_lowest_common_page_class 2016-04-04 17:06:40 +01:00
Tim Heap
09878fcfd8 Do not use ContentTypes in PageChooserPanel
Using ContentTypes can lead to the awkward case where they are used
before the database is migrated, leading to errors on start up. Removing
ContentTypes and using plain Model classes instead makes this
impossible, and also makes the code clearer.

Fixes #2433
2016-04-04 17:06:40 +01:00
Tim Heap
a48ae09ce9 Reset warnings before testing warnings 2016-04-04 17:06:40 +01:00
Karl Hobley
a6e53abd34 Changelog/release note for #1913 2016-04-04 10:35:32 +01:00
Karl Hobley
81795200c4 Docs for dynamic image serve view 2016-04-04 10:20:52 +01:00
Karl Hobley
430a3a2dae Moved action validation to as_view method 2016-04-04 10:20:52 +01:00
Karl Hobley
231523d3f4 Replace concatenation with string formatting
Thanks @prydie and @timheap
2016-04-04 10:20:51 +01:00
Karl Hobley
fa2ad257a5 Check signature before looking up image
The check doesn't need the image object so might as well move it
2016-04-04 10:20:51 +01:00
Karl Hobley
5ad0997dd8 Moved key-related methods out of ServeView class
Accessing these functions feels less hacky now
2016-04-04 10:20:51 +01:00
Karl Hobley
0049c0f310 Made generate/verify signature importable from views.serve
... and deprecated wagtailimages/utils.py
2016-04-04 10:20:51 +01:00
Karl Hobley
47132306e5 Cleanup try-except block in ServeView 2016-04-04 10:20:51 +01:00
Karl Hobley
fd3334d160 Moved generate/verify signature into ServeView 2016-04-04 10:20:51 +01:00
Karl Hobley
68d11d8dc2 Added redirect action to serve view 2016-04-04 10:20:51 +01:00
Karl Hobley
53adaf49d2 Serve view model is now configurable 2016-04-03 23:17:00 +01:00
Karl Hobley
4783843601 Make serve view a class-based-view 2016-04-03 23:17:00 +01:00
Karl Hobley
0fe1a1294a Allow an extra path component on image serve view
Currently, we only allow the following format for the serve view:

    /images/<signature/<id>/<filter>/

This URL doesn't look nice as an image is expected to be a standalone file. This commit makes the following format possible:

    /images/<signature/<id>/<filter>/test.jpg
2016-04-03 23:17:00 +01:00
Karl Hobley
ea758167db Catch SourceImageIOError in frontend serve view
Fixes #1066
2016-04-03 23:17:00 +01:00
Karl Hobley
7f9572d8e8 Moved images/frontend view module to images/serve 2016-04-03 23:16:29 +01:00
João Luiz Lorencetti
ffbe4730f0 The destination of the ParentalKey should be a subclass of ClusterableModel 2016-04-03 20:18:57 +01:00
Tim Heap
a0af3d6685 Ensure absolute_import, unicode_literals imported in all files
Drone will now check that

    from __future__ absolute_import, unicode_literals

is part of every Python source file, to ensure a consistent experience
across all versions of Python.

See #2392 for an instance where missing `unicode_literals` was causing
problems.

Add missing absolute_import, unicode_literals to all files

Explicitly ensure strings are of the correct types

Now that unicode_literals is in every file, some things that used to
be py2 `str`s were now `unicode` instead. This caused issues with
generated class / function names, which must be `str` in all versions of
Python. This means bytes in py2, and unicode in py3. A test also checked
for the incorrect type of SafeString. HTML content should always be
unicode, so this has been fixed.
2016-04-03 13:11:48 +03:00
Alex Gleason
4499a859ba Merge pull request #2427 from toumaz/fix_settings_docs
Fix site settings docs for setting an icon
2016-04-01 12:13:32 -04:00
Tomas Olander
10e564b935 Fix site settings docs for setting an icon
The "icon-" prefix is automatically added in SettingMenuItem.
Using "icon-placeholder" as suggested would thus result in
the CSS class "icon-icon-placeholder".
2016-04-01 10:50:03 +02:00
Tim Heap
c038185915 Remove workarounds for bad request method checking
Previously, the POST data could not be empty for some views, otherwise
they would not work. This caused the workarounds to be necessary. The
request method detection was fixed in the previous commit, so this
commit removes the workarounds.
2016-03-31 12:51:24 +01:00
Tim Heap
7fa340f54b Check for POST requests correctly
Check `if request.method == 'POST':`, instead of `if request.POST:`. The
latter works as long as there is POST data, but on a delete form, for
example, there isn't any. It works fine usually, as the `csrf_token`
counts as POST data, and is included in all requests, but leads to
strange work arounds being required in tests.
2016-03-31 12:51:01 +01:00
Karl Hobley
25ab44237b 1.4.2 no longer in development 2016-03-31 10:11:21 +01:00
Karl Hobley
0e43826d96 Tweaks to changelog message 2016-03-30 22:29:33 +01:00
Tim Heap
b3aa292110 Use unicode_literals in some tests missing it
These tests sent some Python 2 `str`s to unidecode via taggit, which
raised a RuntimeWarning. These strings should be unicode, and are
unicode when they come from Django outside of the tests.

unicode_literals should be added to all Python files to ensure
consistent handling of strings across Python versions, but that is a
larger and more controversial change.
2016-03-30 21:56:29 +01:00
Tim Heap
edc236cb06 Verify SSL certificates for Elasticsearch connections by default
Making developers opt out of extra security is better than making them
opt in, especially when they may not be aware of the security they are
missing out on.
2016-03-30 21:56:03 +01:00
Tim Heap
888a1e0d4b Use aware datetimes in tests
Using naive datetimes was raising RuntimeWarnings
2016-03-30 21:55:44 +01:00
Tim Heap
94e6c2bbea Use add_arguments over deprecated option_list 2016-03-30 21:55:17 +01:00
Tim Heap
4ae35e7f03 Use _meta.get_fields() over deprecated _meta.get_all_related_objects() 2016-03-30 21:54:46 +01:00
Tim Heap
2c0d3b477b Use field.rel over field.related, rel.model over rel.to 2016-03-30 21:54:11 +01:00
Tim Heap
a9f1d23b9f Stop using methods deprecated in Wagtail
Some code was using methods from Wagtail, even though those methods were
deprecated with alternatives provided. Those alternatives are now used
instead.
2016-03-30 21:53:39 +01:00
Tim Heap
272b7223cf Update django-taggit version to 0.18.x branch 2016-03-30 20:02:26 +01:00
Karl Hobley
974d593c85 Changelog/release note for #2405 2016-03-30 19:59:59 +01:00
Tim Heap
8b6f84d899 Add tests for snippet edit handler form classes 2016-03-30 19:42:18 +01:00
Tim Heap
c823ace6a1 Check form class from Page edit handler for correct type
Forms for Page classes must subclass WagtailAdminPageForm. If they do
not, an error will be thrown for invalid arguments when the Page editor
is opened.

Partial fix for #2267.
2016-03-30 19:42:18 +01:00
Tim Heap
9c25d36041 Get EditHandler form class from model if not overridden
Unless overridden by passing `base_form_class=CustomFormClass` to an
EditHandler, the EditHandler now gets the base form class from the
model. People who override the EditHandler of a model no longer have to
also override the base_form_class if the model needs a custom one.

Fixes #2267
2016-03-30 19:42:18 +01:00
Karl Hobley
dcc89ce9b1 Set explorer menu media with property instead of class
Fixes #2369

The static() function was being called during app load which caused a crash when the user is using STATICFILES_STORAGE=ManifestStaticFilesStorage, DEBUG=False and haven't yet collected static files.

I've moved it into a property and it's now only called when a view is being rendered. This also is more consistent because we usually set media using properties (and so does Django admin).
2016-03-30 17:06:29 +03:00
Tim Heap
5a6afd32f2 Fix import order 2016-03-30 15:05:49 +01:00
Karl Hobley
0dc8fdb3b3 Split up TestFindSiteForRequest 2016-03-28 11:45:57 +01:00
Alex Gleason
7296a1dd71 Added tests for Site.find_for_request 2016-03-28 11:45:57 +01:00
Tim Heap
27db7fb69e Add @danni to CONTRIBUTORS.rst
See #2359
2016-03-28 02:49:07 +02:00
Karl Hobley
77f143ab8f Changelog/release note for #2386 2016-03-27 14:33:27 +01:00
Josh Barr
0b9f78ef9d replace classic logical fallacy in touch event detection with the recommended solution. 2016-03-27 14:28:28 +01:00
Timo Rieber
9bdc843c8f Clarified wagtail userbar options and positioning 2016-03-27 14:23:47 +01:00
Tim Heap
4b46ff341d Add docs on making Wagtail compatible with multiple Django versions 2016-03-27 07:15:56 +02:00
Chris Townsend
8ac23d0554 Updated to include TEMPLATE requirement for Django 1.9+
In Django 1.9+ if you do not add: 'builtins': ['overextends.templatetags.overextends_tags'], to your TEMPLATES section you will receive a TemplateSyntaxError when the overextends template files are rendered: "Invalid block tag on line".  Including 'builtins': ['overextends.templatetags.overextends_tags'], per the overextends docs (and experience) resolves this error.

https://github.com/stephenmcd/django-overextends
2016-03-24 21:38:58 +00:00