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

3285 Commits

Author SHA1 Message Date
John Esther
e317e562ea
Changed the title for Wagtail AMP support (#6775) 2021-02-04 17:28:31 +00:00
Thibaud Colas
75b73b2bf6
Fix typo in inline code formatting (#6783) 2021-02-04 17:26:21 +00:00
James Gutu
7bb4fddcb3
Changed heading in image index (#6773)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-02-04 15:59:36 +00:00
Kalob Taulien
6694533751 Merging in PR 6774 docs 2021-02-04 08:56:48 -07:00
Tom Dyson
b299096c16
Improve existing page docs in editor guide (#6777)
This is mainly to test [skip ci]
2021-02-04 15:41:33 +00:00
Tom Dyson
4fc528bef4
Remove excited tone (#6769)
Revert @phildexter's test PR, in the interest of maintaining our friendly but serious tone. Sorry Phil!
2021-02-04 15:37:57 +00:00
LisaBallam
29d1a8c7d1
Removed 'how to'
'How to' in included in the intro so doesn't need to be repeated
2021-02-04 14:42:18 +00:00
LisaBallam
bf716dfe2a
Remove 'new'
Wagtail is no longer that new - it's established
2021-02-04 14:34:16 +00:00
Storm Heg
d3285e9f1b Quote pip install command in developing docs
Prevents it from failing with zsh: no matches found: .[docs]
2021-02-04 12:36:00 +00:00
dex
a4e9431cc5
Update tutorial.rst (#6766)
Just spicing it up a bit.
2021-02-04 12:19:40 +00:00
Matt Westcott
9217193513 Revert "Writing documentation in for modes"
This reverts commit 044206db0d.
2021-02-04 11:51:36 +00:00
Coen van der Kamp
044206db0d Writing documentation in for modes 2021-02-04 12:46:14 +01:00
Matt Westcott
41ff62a056 Release note for #6756 in 2.12.1 2021-02-03 11:00:18 +00:00
Matt Westcott
920aba28ba Release notes for #6713 and #6756 in 2.11.4 2021-02-03 10:59:08 +00:00
Matt Westcott
1a7a5816a5 Fill in release date for 2.12 2021-02-02 16:09:16 +00:00
Matt Westcott
ab656424b7 Reinstate spidering of other documentation versions besides stable
These are now returning the correct canonical URL (thanks to a Cloudflare worker script), and letting search engines spider them again will hopefully boost visibility of that canonical URL.
2021-02-02 15:15:43 +00:00
Thibaud Colas
30b90a0f65
Improve wagtailforms accessibility guidance (#6740) 2021-01-29 19:45:48 +00:00
Matt Westcott
cb29fbba65 Release note for #6713 2021-01-29 16:12:55 +00:00
Thibaud Colas
29942d2a48
Add documentation formatting reference (#6729)
Co-authored-by: Andy Chosak <andy@chosak.org>
Co-authored-by: Tom Dyson <tom@torchbox.com>
2021-01-29 10:38:47 +00:00
Thibaud Colas
fce19a8059 Add release notes for #6730 2021-01-29 10:24:14 +00:00
Helen C
5682aea460 Add the option to set images as decorative
If an image is decorative, the alt text will be set to be empty. If an image is not decorative, then alt text must be supplied for screen readers.
2021-01-29 10:24:14 +00:00
Thibaud Colas
bf33842f45
Fix documentation typo 2021-01-27 16:01:06 +00:00
Matt Westcott
9886cb0476 add missing : to after_create_page example 2021-01-27 09:21:42 +00:00
Thibaud Colas
0dbd69f491
Configure Sphinx for Markdown support (#6711) 2021-01-26 22:09:52 +00:00
Matt Westcott
df125b1652 Release notes for #6718 2021-01-26 10:55:26 +00:00
Matt Westcott
d42b9b4a74 add backticks to streamfield option docs 2021-01-26 10:55:25 +00:00
Matt Westcott
8f2c7a0011 Documentation for new min_num, max_num, block_counts options 2021-01-26 10:55:24 +00:00
Matt Westcott
23096b9f73 Show required asterisks for required descendant blocks of required streamfields (#6715)
Fixes #5983; possibly also has a bearing on #4306. A CSS rule dating from the original StreamField design was hiding the 'required' asterisk on fields within a required StreamField, presumably on the mistaken belief that they duplicate the information given by the top-level asterisk on the streamfield. (In #5983 this was reported as a regression in 2.7 when the react-streamfield CSS was introduced, so it's possible that the old design had something to mitigate this, e.g. an asterisk being inserted elsewhere.)
2021-01-21 14:36:57 +00:00
Matt Westcott
97bfaf15e9
fix version number 2021-01-21 11:14:50 +00:00
Matt Westcott
14daf4be0a Remove outdated versionadded/versionchanged notes in docs 2021-01-19 09:51:01 +00:00
Matt Westcott
c3abf40ea5 Add release notes / changelog section for 2.13 2021-01-19 09:47:31 +00:00
Michael Brown
cadb5456c0 Apply scss styling to collection_choice_field (#6683) 2021-01-18 17:06:29 +00:00
Matt Westcott
c0c7f1bd5d Release note for #6635 2021-01-18 15:11:46 +00:00
Andy Babic
f905e705da Add Page.specific_deferred (#6661) 2021-01-18 13:25:55 +00:00
Will Giddens
2da410b2e0 Add combined index for Postgres search backend. (#6548)
Fixes #6546
2021-01-18 12:19:18 +00:00
David Beitey
3a5b7255ad Change UniqueConstraint for wider database support (#6607)
This fixes #6393 by modifying the constraint to use an IN condition
which supports both Postgres and SQL Server. Previously, the `|` (OR)
condition was only supported by Postgres because SQL Server only
supports AND conditions.

The implementation follows suggestions from @gasman in
https://github.com/wagtail/wagtail/issues/6393#issuecomment-732161057:

* Migration 0050 is modified to not break on SQL Server
* Added migration 0060 to add or replace the constraint

Additionally, this allows for and documents a `DATABASE_DRIVER` env
variable to be set for testing, to allow a different SQL Server driver
(e.g. FreeTDS on Mac/Linux); and adds the specific `host_is_server`
option for FreeTDS (won't affect SQL Server Native Client on CI).
2021-01-18 11:52:52 +00:00
Joshua Marantz
8e79c61564
Implement CSS variables for admin color theming (#6409)
Co-authored-by: JNaftali <jmarantz@thelabnyc.com>
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-01-17 02:17:41 +00:00
Vlad Herasymenko
454002fbd7 Include default emed finders in facebook embeds configuration example (#6625)
Facebook and Instagram embeds configuration section should include the default finders for all other providers. It's unclear for someone who just wants to fix his facebook embeds
2021-01-15 21:15:46 +00:00
Matthias Rohmer
9a1fc6d243 Add missing import to example code snippet (#6638)
Adding this makes the code snippet ready to use via copy and paste.
2021-01-15 21:10:55 +00:00
Matt Westcott
758fa2b863 Release note for #6654/#6658 2021-01-15 20:20:00 +00:00
Matt Westcott
b13641e936 Support custom document models with required fields
Same approach as 4023a90d6e for images - define an UploadedDocument model to hold the uploaded file up to the point where the required metadata has been supplied.
2021-01-15 20:05:08 +00:00
Matt Westcott
c29a92f801 Fix trailing whitespace 2021-01-15 19:44:37 +00:00
Fernando
30ad03d4ca Update S3 CORS documentation for Boto3 (#6668)
Boto3 has been around for a long time now. Adding a Boto-specific parameter in a tutorial is confusing (it was for me) as people are likely to install Boto3 directly and skip Boto. The `AWS_HEADERS` parameter was replaced by the `AWS_S3_OBJECT_PARAMETERS` parameter in Boto3 and the parameter that controls the access control list specifically is the `ACL`.

By the way, are the instructions on line 50 still relevant today?
2021-01-15 19:42:41 +00:00
LB
7737497239 fix JS code example in hooks docs
- when returning format_html `{` (brace) characters must be escaped
- https://docs.python.org/3/library/string.html#format-string-syntax
2021-01-15 13:18:15 +00:00
David Beitey
3c3df689f7
Fix formatting in Development documentation (#6686)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2021-01-13 13:26:41 +00:00
Thibaud Colas
1914394bc8
Update wagtail forms accessibility considerations to link to Django tickets (#6687) 2021-01-12 16:39:57 +00:00
Luis Nell
a726c93df4 fix: signal receivers example raising exception
Signal receivers must accept `**kwargs`, otherwise one runs into this:

```
File "/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 94, in connect
raise ValueError("Signal receivers must accept keyword arguments (**kwargs).")
ValueError: Signal receivers must accept keyword arguments (**kwargs).
```
2021-01-11 11:25:19 +00:00
Robert Rollins
d18ffb0233 Implemented a 'choose' permission for Images and Documents (#6466)
This PR adds the 'choose' permission discussed in #4488. It limits Image and Document choosers to showing only those Collections (and their contents) for which the current user has the Choose permission.

It grants Choose permissions to the Root Collection to every existing Group that has the "Can access Wagtail admin" perm, via data migration. So there will be no change in behavior unless the user goes in and alters the Choose perms for their site's groups.

This PR has no effect on anything except choosers. The Image and Document index pages are still controlled solely by the 'add' and 'change' permissions, as those are only accessible by users who have those permissions in the first place. This means that it's now possible to configure a Group to allow its members to choose images from existing Collections when editing pages, *without* them being able to edit said images or add new ones.
2021-01-05 12:23:49 +00:00
Matt Westcott
09fb115a2d Catch JSON decode errors in oembed responses (#6648)
Fixes #6646 - for private videos, Youtube's oembed endpoint returns the text "Forbidden", but with a 200 status code, which fails JSON decoding.
2020-12-18 15:59:51 +00:00
Bohreromir
3d18986610 fix ModelAdmin example (#6645) 2020-12-17 16:39:30 +00:00
Luis Nell
e48c1704cb
Change embed finder credit order (#6636)
It's a really small thing, but I honestly feel like Cynthia did most of the work of taking my workaround to production quality code and pushing it over the finish line. So she should be first here.
2020-12-16 14:35:00 +00:00
Vadim Karpenko
4cfd303db9 Check action menu items (pages and snippets) for None before using (#6566) 2020-12-15 19:17:53 +00:00
Matt Westcott
3768483352 Fill in release date for 2.11.3 2020-12-10 17:59:21 +00:00
Matt Westcott
49136ea4a5 Prevent error on publish check in create_log_entries_from_revisions (#6628)
Fixes #6498
2020-12-10 17:34:57 +00:00
Matt Westcott
971bdc0799 Fix combining locale/translation_of API filters with search (#6627)
Fixes #6626
2020-12-10 16:26:41 +00:00
Karl Hobley
45650053d5
Avoid recommending replacing image/document models entirely (#6624)
... when using the ``WAGTAILIMAGES_IMAGE_MODEL``/``WAGTAILDOCS_DOCUMENT_MODEL`` settings.

We can't really support this as we add new fields and methods to these base classes which all images/documents must support. If we did want to support swapping out the models entirely, every addition we make to the base models could be a breaking change.
2020-12-09 16:29:41 +00:00
Matt Westcott
f4702646bd Release note for #6572 2020-12-09 16:28:20 +00:00
David Beitey
67235accfc Improve database settings and docs for tests (#6585)
This change makes several improvements:

* Use in-memory SQLite database for test migrations

  The default database is SQLite but its NAME (which SQLite uses as the
  filename) was `wagtail`, which isn't valid since
  the wagtail codebase already has a `wagtail/` directory.  Trying to
  run migration creation commands
  (https://docs.wagtail.io/en/latest/contributing/developing.html#running-migrations-for-the-test-app-models)
  produced an error:

  django.db.utils.OperationalError: unable to open database file

  because of this conflict.

  This change uses an in-memory database as the default database for
  tests. If DATABASE_NAME were set to a real file name, then
  running the migration command with SQLite creates an empty db with
  this filename on running `django-admin`.

  Other non-SQLite engines continue to use the original `wagtail` name,
  meaning that the `test_wagtail` database gets created just as before.

* Modifies the default values for database USER, PASSWORD, HOST etc to
  being an empty string rather than None, to match Django's
  [defaults](https://docs.djangoproject.com/en/stable/ref/settings/#host).
  This helps avoid any potential issues when Django and database engines
  are expecting this being a string.

* Adds documentation to `developing.rst` regarding installation of
  required database modules and available environment variables for database
  connection customisation

* Normalises the DATABASE_PASSWORD tests environment variable to match
  the name in Django's database settings object
2020-12-09 15:28:44 +00:00
Dan Braghis
05587e0d84 Allow customising image/document admin forms (#6462) 2020-12-09 12:35:19 +00:00
Andreas Nüßlein
6a7a5756d9 Add string representation to image Format() (#6608)
when checking on the currently registered Formats, e.g. with `get_image_formats()` the output is now easier to read.
2020-12-09 12:16:26 +00:00
Brian Oliver
ac88310402
Update third-party tutorials (#6622) 2020-12-09 10:58:50 +00:00
Matt Westcott
8d9e864581 Release note for #6485 2020-12-08 18:23:56 +00:00
Matt Westcott
93a80efe50 Add docs for modifying StreamField data 2020-12-08 16:57:10 +00:00
Matt Westcott
9a953fd93c Additional release notes for #6559 2020-12-08 16:00:47 +00:00
Dan Braghis
0da2ba69bc Fix missing locale in the project template's homepage migration 2020-12-08 14:11:23 +00:00
Matt Westcott
2dfb82406a whitespace fix 2020-12-08 12:53:41 +00:00
Matt Westcott
4dc9f81d68 Add {% if page %} around language selector example
As suggested here: https://stackoverflow.com/questions/65065301/wagtail-not-redirecting-500-error-instead-of-404-when-debug-false/65065608?noredirect=1#comment115125518_65065608
2020-12-08 12:53:41 +00:00
Thibaud Colas
06c3c3a24b
Replace image upload in wagtailforms tutorial with latest version. Fix #5284 2020-12-08 10:20:48 +00:00
Scott Cranfill
bba831d2cf
Update pagination icons to use SVGs (#6573)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-04 17:03:50 +00:00
Matt Westcott
cbf0be31d5 revert to @allcaps's original approach to including robots.txt 2020-12-04 13:30:55 +00:00
Alex Sa
01d3854696
Add collection_id param to document chooser pagination handling. Fix #5913 (#6529)
Make sure document chooser pagination preserves the selected collection when moving between pages

Co-authored-by: Alexander Sajzew <a.sajzew@alexsa.de>
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-02 12:41:37 +00:00
Karran Besen
65d0cdf55f
Fix breadcrumb margin overlapping burger menu. Fix #6590 (#6597)
Stop menu icon overlapping the breadcrumb on small viewport widths in page editor

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-12-02 12:05:13 +00:00
Matt Westcott
7f4c914e68 try a different approach for including custom robots.txt 2020-12-02 11:13:23 +00:00
minusf
a18a36d820
Fix indentation of locked_by block in documentation (#6580) 2020-12-02 10:40:25 +00:00
Andy Chosak
fe427efb75 Fix Bonsai link in Elasticsearch docs
The search docs [0] currently link to a Bonsai signup page that 404s [1].
The signup page is currently a different page [2].
This commit replaces the Bonsai link with their homepage [3],
to avoid being overly dependent on their URL structure.

[0] https://docs.wagtail.io/en/v2.11.2/topics/search/backends.html
[1] https://bonsai.io/signup
[2] https://app.bonsai.io/signup
[3] https://bonsai.io/
2020-11-24 12:16:53 +00:00
Frantisek Holop
8f4e799fb8 remove double returns 2020-11-24 12:16:17 +00:00
Matt Westcott
56a92d466e Fill in release date for 2.11.2
Conflicts:
	CHANGELOG.txt
2020-11-17 15:44:24 +00:00
Cynthia Kiser
28cee081b2 Add custom oEmbed finders for Facebook and Instagram (#6550)
Move code from https://www.codista.com/en/blog/wagtail-instagram-new-oembed-api/ into core

Add custom oembed finder for Facebook

Apply suggestions from @originell's code review

Co-authored-by: Luis Nell <luis.nell@codista.com>

FIXUP More places to change the exception name (and a linter fix)

Extend Instagram/Facebook tests to check HTTP request

Add documentation for omitscript parameter
2020-11-17 15:06:24 +00:00
Matt Westcott
9ef3685efc Allow deleting the default locale (#6553)
Fixes #6533
2020-11-17 11:25:52 +00:00
Matt Westcott
414571cc99 Release note for #6544 2020-11-16 17:15:32 +00:00
Jérôme Lebleu
f88e6f91ff Fix header icon name in settings' edit view (#6554) 2020-11-16 15:02:19 +00:00
Matt Westcott
236632d815
Handle get_supported_language_variant returning a language variant not in LANGUAGES (#6547)
* Handle get_supported_language_variant returning a language variant not in LANGUAGES

Fixes #6539

* Handle LANGUAGE_CODE that isn't in LANGUAGES

* Release note for #6547
2020-11-16 11:51:32 +00:00
Matt Westcott
a888d3383c Gracefully handle missing Locale records on Locale.get_active and .localized (#6549)
Fixes #6540
There are various code paths where Page.localized and similar can be called even when WAGTAIL_I18N_ENABLED is False, and since it's entirely likely that hand-rolled i18n mechanisms and ad-hoc configuration changes (e.g changing LANGUAGE_CODE) will break the Locale model's assumptions about how things are meant to work, we need to provide sensible fallback behaviour for when the current active locale, or the default locale as per LANGUAGE_CODE, does not have a corresponding Locale record:

* Locale.get_active() will fall back on the default LANGUAGE_CODE locale, or raise Locale.DoesNotExist if that one does not exist either;
* TranslatableMixin.localized (along with Page.localized and Page.localized_draft) will handle a missing Locale record by falling back on the default LANGUAGE_CODE locale, or failing that, returning self.
2020-11-16 10:31:01 +00:00
Karl Hobley
792a9d272b Fetch the depth field of page translations on the edit view
This field is used in the `.can_edit()` permission check
2020-11-13 17:14:22 +00:00
Coen van der Kamp
4702b6f14d Add custom robots.txt to docs 2020-11-12 16:35:05 +00:00
Matt Westcott
be45cee2aa Fill in release date for 2.11.1 2020-11-06 17:30:55 +00:00
Matt Westcott
f378f48e14 Prevent errors on get_url_parts when a non-content-language locale is active (#6521)
Fixes #6510 and #6511

Catch the LookupError from get_supported_content_language_variant so that if the active language is not one that is recognised as a content language, the URL prefix will be left unchanged from the page's reported locale.

Additionally, skip the `translation.override` when WAGTAIL_I18N_ENABLED is false; this accounts for the fact that existing sites may have used alternative / custom i18n implementations involving i18n_patterns, and on these sites we can't rely on the page's locale field to be meaningful. That way, we restore the pre-2.11 behaviour: if the existing i18n code was using some kind of wrapper around the get_url_parts call, then that will work again; and if not, the URL will reflect the current active locale, which is no worse than before.
2020-11-06 17:04:18 +00:00
Thibaud Colas
37e9e1d54d
#6090 Document accessibility considerations (#6272)
Co-authored-by: Coen van der Kamp <coen@fourdigits.nl>
2020-11-06 15:38:00 +00:00
Matt Westcott
3c984b9871 Avoid circular import between wagtail.admin.auth and custom user models (#6522)
Fixes #6518

If the models.py containing a custom user model directly or indirectly imports wagtail.admin.auth, this causes a circular dependency because wagtail.admin.auth attempts to import django.contrib.auth.views, which in turn depends on the custom user model. Fix this by moving the django.contrib.auth.views import inside reject_request.
2020-11-06 09:35:21 +00:00
Matt Westcott
ed1996cdbc Upgrade consideration note for dropping Elasticsearch 2 2020-11-05 12:04:12 +00:00
Matt Westcott
6e1e36256a Remove elasticsearch 2 support 2020-11-05 12:04:12 +00:00
Matt Westcott
4d6a41a83b Drop travis entirely 2020-11-05 12:04:12 +00:00
Sævar Öfjörð Magnússon
a541510417 Additional safeguard to check if a cached site is from an older version of Wagtail (#6515) 2020-11-04 12:22:43 +00:00
Matt Westcott
14f1d8d59a Add release notes section for 2.11.1
Conflicts:
	CHANGELOG.txt
	docs/releases/index.rst
2020-11-04 10:45:15 +00:00
Naglis Jonaitis
74c692ba21 Fix ModelAdmin documentation example
The `get_extra_class_names_for_field_col` seems to have an `if` missing
and uses an undefined `balance`.
2020-11-03 13:49:18 +00:00
Matt Westcott
39f953eca3 Release note for Python 3.9 support (#6508) 2020-11-03 11:58:01 +00:00
Matt Westcott
5bcfcdd315 Formalise support for Python 3.9 2020-11-02 17:29:58 +00:00
Matt Westcott
330f0dde15 Fill in release date for 2.11 2020-11-02 15:06:22 +00:00
Matt Westcott
d56f8ea1c5
More prominent note about wagtail-localize in i18n docs (#6506) 2020-11-02 12:46:16 +00:00
Karl Hobley
516150403b
Update 2.12.rst 2020-10-23 20:07:51 +01:00