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

6260 Commits

Author SHA1 Message Date
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
Karl Hobley
729ec8bfab Changelog/release note/upgrade consideration for #2388 2016-03-24 21:21:05 +00:00
Tim Heap
6bd168580e Change Indexed.search_fields to be a listish thing
Indexed.search_fields used to be a tuple. This is incorrect, and it
should have been a list.  Changing it to be a list now would be a
backwards incompatible change, as people do

    search_fields = Page.search_fields + (
        SearchField('body')
    )

Adding a tuple to the end of a list causes an error, so this would
cause all old code that used tuples to throw an error. This is not
great.

A new ThisShouldBeAList class, which subclasses list, has been added.
It additionally allows tuples to be added to it, as in the above
behaviour, but will raise a deprecation warning if someone does this.
Old code that uses tuples will continue to work, but raise a deprecation
warning.

See #2310
2016-03-24 21:05:09 +00:00
Karl Hobley
63a891266a Changelog/release note for #2382 2016-03-24 20:58:31 +00:00
Karl Hobley
9e1e12b5a6 Fixed syntax of jQuery selector
We recently updated to jQuery 2.x and this requires quotes around attribute values.

Fixes #2380
Fixes #2381
2016-03-24 20:51:03 +00:00
Matt Westcott
959d72c30c Remove deprecated features for 1.5; update deprecation warning versions 2016-03-22 22:44:18 +00:00
Tim Heap
e001cac581 Release notes for #2260 2016-03-22 14:36:21 +11:00
Jonas Lergell
78a489b53f Remove highlighting for calendar day when switching months in the datetimepicker 2016-03-22 14:30:44 +11:00
Jonas Lergell
5b10a4969d Show todays date in the datetimepicker, even if it is not currently selected 2016-03-22 14:30:44 +11:00
Math1985
03cba5b91c Ask user for old password when changing password
This is accomplished by using PasswordChangeForm instead of SetPasswordForm.

This adds extra security, as without this commit, an attacker that has access to
a user's session at one point in time will be able to change the user's password
and gain permanent access.
2016-03-22 11:50:18 +11:00
Danielle Madeley
6fde6863c5 Get the request host from request.get_host
Fixes #2358
2016-03-19 23:23:06 -04:00
Rob Moorman
5158ee7aad Removed arrow-up after selector issue #2365 2016-03-17 01:25:26 +00:00
Matt Westcott
8976453dfc Add Antonin Enfrun and Edd Baldry to French translators list 2016-03-16 12:33:21 +00:00
Matt Westcott
5f67ce2c4b 1.4 no longer 'in development' 2016-03-16 11:31:20 +00:00
Matt Westcott
bd1456c793 Pull new translations from Transifex 2016-03-16 11:04:04 +00:00
Matt Westcott
679df7e985 Add missing quoting to icon-*-after CSS 2016-03-15 17:07:10 +00:00
Tim Heap
84432fbfd6 Add docs on how to build docs
I put some docs in your docs on building docs, so now I can build docs
about my docs from my docs.
2016-03-11 17:24:38 +00:00
Matt Westcott
83ab0746bc Release note for #2333 2016-03-11 17:21:53 +00:00