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

531 Commits

Author SHA1 Message Date
Matt Westcott
f3e33f849f Convert StreamField reference to proper class definition markup 2021-03-23 18:57:53 +00:00
Matt Westcott
37c2326150 Split up StreamField documentation [skip ci] 2021-03-23 18:57:53 +00:00
Jaap Roes
8d0eff1717
Fix typo in hooks reference example (#6926) 2021-03-16 17:14:52 +00:00
Thibaud Colas
8b07ad4cea
Add support for SVG icons to SearchArea subclasses and register_admin_search_area (#6493) 2021-03-09 11:33:06 +00:00
Thibaud Colas
5257ef6c84
Update register_admin_menu_item documentation to match SVG icons setup (#6892) 2021-03-09 12:04:09 +01:00
naglis
73d41059f8
Fix typo in site settings documentation example (#6881)
Lowercase `i` is used in the model definition and in other examples.
2021-03-08 13:19:31 +00:00
Naomi I. Morduch Toubman
664b0489fe
Change master to main (#6830)
* Update references to `master` branch to say `main`

* Update external links

* Update links in old release notes
  Use tagged versions of code rather than current code
2021-03-03 13:33:19 -05:00
Andy Babic
fa8402f633 Implement PageQuerySet.defer_streamfields() 2021-03-03 13:03:46 +00:00
Andy Babic
8f38aaae87 Update type(), not_type(), exact_type() and not_exact_type() to accept multiple model classes as arguments 2021-03-02 20:00:28 +00:00
Storm Heg
24ef0e62e6 Fix documentation indentation
Fix code block indentation in tutorial.rst

Prevent it from being displayed as a quote.

Fix indentation in pages.rst

Fix indentation in indexing.rst

Fix indentation in searching.rst

Fix indentation in backends.rst

Fix indentation in renditions.rst

Fix indentation in custom_image_model.rst

Fix indentation in feature_detection.rst

Fix indentation in image_serve_view.rst

Fix indentation in custom_document_model.rst

Fix indentation in i18n.rst

Fix indentation in privacy.rst

Fix indentation in page_editing_interface.rst

Fix indentation in rich_text_internals.rst

Fix indentation in extending_hallo.rst

Fix indentation in configuration.rst

Fix indentation in usage.rst

Fix indentation in theory.rst

Fix indentation in model_reference.rst

Fix indentation in queryset_reference.rst

Configure editors to indent .rst files with 2 spaces

In order for the documentation to be styled correctly, the generator
depends on indentation. Too much indentation can result in the content
being wrapped in a quote block, which looks bad.

Fix indentation in sitemaps.rst

Fix indentation in frontendcache.rst

Fix indentation in routablepage.rst

Fix indentation in table_block.rst

Fix routablepage.rst autodocs disppearing

Fix indentation in table_block.rst

Fix indentation in redirects.rst

Fix indentation in table_documentation-modes.rst

Fix indentation in browser_issues.rst

Fix indentation in release_process.rst

Fix indentation of release notes

One more indent fix in the release notes

Fix indentation warnings

Fix warning about undefined label in docs

Error during `make html`:

  wagtail/docs/releases/1.7.rst:25: WARNING: undefined label: jpeg_image_quality
2021-02-26 09:17:00 +00:00
James Gutu
93abdabd41 moved jinja2 page from Advanced Topics to Reference 2021-02-04 12:12:11 -08: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
14daf4be0a Remove outdated versionadded/versionchanged notes in docs 2021-01-19 09:51:01 +00:00
Andy Babic
f905e705da Add Page.specific_deferred (#6661) 2021-01-18 13:25:55 +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
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
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
Bohreromir
3d18986610 fix ModelAdmin example (#6645) 2020-12-17 16:39:30 +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
Dan Braghis
05587e0d84 Allow customising image/document admin forms (#6462) 2020-12-09 12:35:19 +00:00
minusf
a18a36d820
Fix indentation of locked_by block in documentation (#6580) 2020-12-02 10:40:25 +00:00
Matt Westcott
6e1e36256a Remove elasticsearch 2 support 2020-11-05 12:04:12 +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
Loic Teixeira
6c9478c139 Rework headings hierarchy
Initial hierarchy:

- Available panel types
    - FieldPanel
    - StreamFieldPanel
    - MultiFieldPanel
    - InlinePanel
    - FieldRowPanel
    - HelpPanel
    - PageChooserPanel
    - ImageChooserPanel
    - FormSubmissionsPanel
    - DocumentChooserPanel
    - SnippetChooserPanel
        - Built-in Fields and Choosers
        - Field Customisation
    - Full-Width Input
    - Titles
    - Placeholder Text
    - Required Fields
    - Hiding Fields
        - Inline Panels and Model Clusters

Revised Hierarcy:

- Panel types
    - Built-in Fields and Choosers
        - FieldPanel
        - StreamFieldPanel
        - MultiFieldPanel
        - InlinePanel
        - FieldRowPanel
        - HelpPanel
        - PageChooserPanel
        - ImageChooserPanel
        - FormSubmissionsPanel
        - DocumentChooserPanel
        - SnippetChooserPanel
    - Field Customisation
        - Full-Width Input
        - Titles
        - Placeholder Text
        - Required Fields
        - Hiding Fields
    - Inline Panels and Model Clusters
2020-10-23 10:36:01 +01:00
David Bramwell
e28aa6b194 Document ModlelAdmin.prepopulated_fields 2020-10-19 21:36:05 +01:00
Karl Hobley
0efe4a75a5
[RFC 54] Internationalisation reference docs (#6377)
* Reference docs for internationalisation

* Update docs/reference/pages/model_reference.rst

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update docs/reference/pages/model_reference.rst

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Update docs/reference/pages/model_reference.rst

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Apply suggestions from code review

Co-authored-by: Dan Braghis <dan@zerolab.org>

* Add missing comma

* Apply suggestions from code review

Co-authored-by: Matt Westcott <matthew@torchbox.com>

Co-authored-by: Dan Braghis <dan@zerolab.org>
Co-authored-by: Matt Westcott <matthew@torchbox.com>
2020-10-19 18:40:58 +01:00
Matt Westcott
9fab50e87a remove trailing whitespace 2020-10-19 18:11:12 +01:00
Jean Zombie
b5cfca31eb Add example of updating a page within after_create_page (#6373)
This update intends to add the answer I got on my slack support request (https://wagtailcms.slack.com/archives/C81FGJR2S/p1599209092087000).
2020-10-19 18:01:49 +01:00
Karl Hobley
7f7f9b4de1 Make snippets action menu hookable 2020-10-14 14:41:22 +01:00
Karl Hobley
c170c50c78 Add view for converting aliases into regular pages 2020-10-08 10:24:58 +01:00
Karl Hobley
b5eddca28b Synchronise alias page content when the source is updated 2020-10-08 10:24:58 +01:00
Karl Hobley
674fa8e27a Add Page.create_alias method 2020-10-08 10:24:58 +01:00
Karl Hobley
17f63f0efc Add alias_of field to Page 2020-10-08 10:24:58 +01:00
Matt Westcott
dd442a3990 remove trailing whitespace to placate doc8 2020-10-05 12:44:57 +01:00
meghanabhange
f1fbbcbc24
Add validation for file extension in AbstractDocument using WAGTAIL_DOCS_EXTENSIONS setting (#6423) 2020-10-05 12:26:00 +01:00
Karl Hobley
cf38b2457d Put quotes around some inline code 2020-10-03 14:43:03 +01:00
Karl Hobley
39d931d77d Javascript => JavaScript 2020-10-03 14:43:03 +01:00
Karl Hobley
6e5f89adf2 General spelling fixes 2020-10-03 14:43:03 +01:00
Karl Hobley
9195131738 Lint docs with doc8 2020-10-03 14:43:03 +01:00
Ameet Virdee
48a8af71e5 Add documentation for placeholder text in Field Panels 2020-10-01 08:06:43 +02:00
Matt Westcott
008b6c12c4 Update BaseLogEntry docs to reference user_display_name. Fixes #6418 2020-09-30 15:43:27 +01:00
Matt Westcott
8edf16e5ff Serve PDFs inline in the browser
Fixes #1158
Add config options WAGTAILDOCS_CONTENT_TYPES and WAGTAILDOCS_INLINE_CONTENT_TYPES to determine the Content-Type and Content-Disposition headers returned for documents when using the Django serve view, and default to application/pdf being served inline.
2020-09-28 07:22:58 +10:00
Scott Cranfill
70bb9d934b
Support SVG icons in ModelAdmin menu items (#6402)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2020-09-25 15:58:52 +01:00
Andy Babic
8fd5d66756 Add RoutablePage.render() helper method and update documentation 2020-09-01 22:24:08 +01:00
Matt Westcott
a1f882b7c9 Convert remaining gettext .format strings to old-style string formatting
As per #5548 / #6238. Fixes #6343
2020-08-21 13:26:00 +01:00
Matt Westcott
8542f5fe9c Fix underline lengths to prevent Sphinx warnings 2020-08-07 17:23:42 +01:00
jacobtoppm
e85f16b500 Add a use case example for WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH=False 2020-08-07 17:10:24 +01:00
Karl Hobley
9ad14ea439
Add hooks for snippet listing buttons 2020-08-07 15:47:27 +01:00
Karl Hobley
9b02147d3e Add hooks.register_temporarily for testing hooks
There's currently a number of places where we test hooks by registering
hook functions from test methods. These are never cleaned up so that
hook remains registered in future tests. This can cause issues with
tests not working consistently when you run a subset of the tests.

This adds a `register_temporarily` function to the hooks module. This
function can be used either as a decorator or a context manager. It'll
always remove the hook after the decorated function or with block exits,
even if it exits through an exception.
2020-08-07 15:47:04 +01:00
Karl Hobley
4bf28b502c Fix docs for construct_page_listing_buttons 2020-07-31 11:14:48 +01:00
Karl Hobley
f3f932d2e5
Add before_{create,edit,delete}_snippet hooks 2020-07-30 08:08:40 +01:00
Matt Westcott
e0dc53d9ad Remove versionadded/versionchanged notes for 2.9 2020-07-28 12:53:22 +01:00
Chris Contolini
4231d9ef11
Fix minor typo in TableBlock docs (#6259)
Also a small grammatical fix.
2020-07-28 07:14:05 -04:00
jacobtoppm
c79668929e Update reference documentation, custom task guide, and release notes, and fix documentation build errors 2020-07-24 16:59:33 +01:00
jacobtoppm
85e4426948 Cancel ongoing workflows when a page is published, depending on the value of a new setting, WAGTAIL_WORKFLOW_CANCEL_ON_PUBLISH. Add a warning modal before publication if a workflow will be cancelled 2020-07-24 16:59:33 +01:00
Matt Westcott
bf53123309 Fix sphinx warnings from workflow / audit log documentation 2020-07-24 16:59:33 +01:00
Matt Westcott
6f85bca664 Use % formatting for new workflow / audit log translation strings
See #5548 - Transifex recognises % formatting, and will guard against translators introducing errors by attempting to translate the embedded variable names.
2020-07-24 16:59:33 +01:00
Matt Westcott
c8a8689cee Document icon_name and classname for register_page_action_menu_item 2020-07-24 16:59:33 +01:00
Dan Braghis
f69287f6f4 Add documentation 2020-07-24 16:59:33 +01:00
jacobtoppm
df3a63c7a2 Add new page methods and updated workflow state methods 2020-07-24 16:59:33 +01:00
jacobtoppm
2037e8c089 Update images in documentation 2020-07-24 16:59:33 +01:00
jacobtoppm
8911bd30d7 Add workflow models to reference 2020-07-24 16:59:33 +01:00
jacobtoppm
bf168df9f9 Document workflow signals 2020-07-24 16:59:33 +01:00
jacobtoppm
c75a2a3549 Add workflow settings 2020-07-24 16:59:33 +01:00
Matt Westcott
e8d02091ee Add warning about WAGTAILFORMS_HELP_TEXT_ALLOW_HTML 2020-07-20 10:36:41 +01:00
Matt Westcott
d9a41e7f24 Escape help text in form builder forms by default
This can be disabled with the setting WAGTAILFORMS_HELP_TEXT_ALLOW_HTML
2020-07-20 10:36:28 +01:00
Matt Westcott
78c9ef31d7 Typo fixes 2020-07-15 17:18:46 +01:00
Martin Sandström
c8f493c095 Add documentation for WAGTAIL_REDIRECTS_FILE_STORAGE setting (#6114) 2020-07-15 16:35:04 +01:00
Matt Westcott
9917d7d2e9 Additional documentation for next_url 2020-07-15 11:53:39 +10:00
Kevin
d75ab584c7 Fixing typos 2020-07-14 10:56:28 +01:00
Andy Babic
dd680ae4d4 Factor out content type fetching into a separate Page method, simplify the specific specific_class methods, and improve docstrings 2020-07-13 18:25:11 +01:00
Steven Wood
5611f5ef6c Clarify origin of From address used in password reset emails (#6219) 2020-07-13 18:15:21 +01:00
Storm Heg
8c306910dd Fix incorrect urls in the docs 2020-07-06 13:15:40 +01:00
Storm Heg
4076b9ef5e Replace calls to django.conf.urls.url with django.urls.path or django.urls.re_path 2020-07-06 13:15:37 +01:00
Matt Westcott
e9e6a8d5e7 Add more detail to RoutablePageMixin example (#6128) 2020-06-25 16:57:58 +01:00
Gassan Gousseinov
a4e05f4538 I would like only add my own editor without to redefine a default one. (#6118) 2020-06-25 16:53:06 +01:00
Jean Zombie
9baf6ce62a Update hooks.rst (#6160 / #6161)
This proposed update is in regard to Issue #6160
2020-06-25 14:54:16 +01:00
Tom Dyson
20b99d4386
Remove 'whitelist' from page reference docs (#6153) 2020-06-16 11:23:51 +01:00
Martin Sandström
301d1bc7f5 Add ability to import redirects from a file wagtail.contrib.redirects
* Add support for importing redirects via tsv, csv, xls and xlsx files
* Add import_redirects management command to redirects documentation
2020-06-07 11:20:39 +10:00
jacobtoppm
ead6c8b2a6 Add WAGTAIL_TIME_FORMAT to settings reference 2020-05-27 13:55:52 +01:00
GTpyro
147fda12fa Update signals.rst for Python 3 compatibility
The send_to_slack example was not compatible with Python 3. Example is updated using the requests & json libraries (instead of urllib & urllib2)
2020-05-26 19:21:13 +02:00
Coen van der Kamp
a1a2c35c1c Template render richtext without wrapper, add wagtail.contrib.legacy.richtext
* Add wagtail.contrib.legacy.richtext with tests & docs
* Make RichText.__html__ behave the same as template filter
* Resolves #1214
2020-05-21 07:53:31 +10:00
Karl Hobley
58f6aecfc7
Some cleanups in PostgreSQL search module (#5953)
* Separated logic for extracting indexable content

* Docs edits

* Readability improvements

* Simplify/deduplicate indexing code

* Simplify search code

Pulled in some code that will be included in a future Django release
(query.py)

* Reword a limitation

* Fix typo in docstring

* Raise a warning when Boost() is used in PostgreSQL search backend

* Add note mentioning that RawSearchQuery can be replaced in Django 3.1

* Add comment mentioning that we can replace query.py if Django PR merged
2020-05-18 15:54:31 +01:00
Kalob Taulien
b5f5ac10db
Add export_filename option to modeladmin
Merge pull request #6031 from wagtail/reports-filename
2020-05-15 10:04:57 -06:00
jacobtoppm
cc676c4c9e Add export_filename option to modeladmin 2020-05-14 15:50:47 +01:00
Kalob Taulien
f757324039 Add Snippet hooks (after_edit_snippet, after_create_snippet and after_delete_snippet) 2020-05-14 20:47:36 +10:00
Cameron Lamb
55476426db Fix typo in ModelAdminGroup example 2020-05-14 20:37:34 +10:00
Brylie Christopher Oxley
ff37ad6ab9 Add 'add_redirect' static method to Redirect
* This method was inspired by a Lacey Williams Henschel (@williln) presentation at Wagtail Space US 2018, called  'What the Wagtail docs don't tell you'. https://www.youtube.com/watch?v=PCkxBNXWM64&t=1220s
* Add docs section reference/contrib/redirects
2020-05-10 18:48:33 +10:00
jacobtoppm
30c398c91a Add purge_revisions management command
* Fix typo in publish_scheduled_pages dry run
* Add purge_revisions to docs
* Resolves #5192
2020-05-08 11:35:30 +10:00
LB (Ben Johnston)
9359b14326
fix sphinx warnings (#6001)
- use .add_css_file instead of .add_stylesheet in conf.py
- use .add_js_file instead of .add_javascript in conf.py
- fix duplicate clss references in pages model reference (for grouping of methods & attributes)
- rename wagtailspace.js to banner.js (may be used in the future for a generic banner)
2020-05-03 14:02:43 +02:00
Andy Babic
4846a3e801 Add get_page_url() method to BaseSetting
* adds a convenience `page_url` shortcut to improve how page URLs can be accessed from site settings in Django templates
2020-05-03 15:14:41 +10:00
Jonatas Baldin
a7f58821a7 Add publish & unpublish page hooks
* Add `before_unpublish_page` and `before_unpublish_page` hooks
* Add `before_publish_page` and `before_publish_page` hooks
* Resolves #4590
2020-05-03 14:18:13 +10:00
danbentley
1156182283
Add Page.context_object_name (#5999)
Page.context_object_name can be used to define a more meaningful name
for the page variable in the template.

If defined, the default `page` and `self` are still available for use in
shared templates.

Resolves #5213
2020-05-01 20:01:02 +02:00
Andy Babic
3fe8775024 Add pre_page_move and post_page_move signals
* Documentation for pre_page_move and post_page_move signals
* Resolves #2728
2020-04-28 20:26:40 +10:00
Haydn Greatnews
165c5c0ce5 Add date & datetime formatting to AbstractEmailForm + split out render_email method
* Rewrite AbstractEmailForm render to use cleaned_data
* Add date time formatting to AbstractEmailForm's render method according to Django settings SHORT_DATE_FORMAT and
SHORT_DATETIME_FORMAT
* Previously it was iterating over `form` which left no place to remove
data from the submission without removing the field from the form (which
is inadvisable, as discussed on #4313)
* Preserve order of fields in form emails using cleaned data
* Add a test for consistent date rendering in email forms
* update form customisation examples and add note about date / time formatting in email form usage (docs)
* resolves #3733
* resolves #4313
2020-04-26 20:25:48 +10:00
Ascani Carlo
5f3c12682f Redirect to previous url when deleting/copying/unpublish a page
* modify register_page_listing_buttons & register_page_listing_more_buttons to handle next_url kwarg
* resolves #3010
2020-04-26 18:24:13 +10:00
Matt Westcott
ceb4270e01 Remove versionadded/versionchanged notes for 2.8 2020-04-22 13:54:09 +01:00
Andy Babic
db8ab0875d Update BaseSetting to make it easier to utilise QuerySet.select_related() for more complex settings which reference related objects (such as pages) 2020-04-03 22:01:08 +01:00
Andy Babic
18118f54b6 Update docs 2020-04-03 21:28:13 +01:00