0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
wagtail/docs
Andy Chosak 81d23fc8ab Support the rel attribute on ModelAdmin buttons
Currently it is possible to pass the target attribute to a button
created using ModelAdmin's ButtonHelper framework. This allows you to
generate button links like <a ... target="_blank">.

For example, if adding a new button and modeling it after the existing
edit_button code [0], you can add {'target': "_blank"} to the returned
dict and it'll get passed to the template when the button is rendered.

To be consistent with PR 4844, and to be consistent with what seems to
be the best practice ([1], [2]), we should also support passing the rel
attribute, which would allow for creation of button links like <a ...
target="_blank" rel="noopener noreferrer">.

[0] 5e2f50403b/wagtail/contrib/modeladmin/helpers/button.py (L61-L73)
[1] https://developers.google.com/web/tools/lighthouse/audits/noopener
[2] https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
2020-01-26 21:06:26 -05:00
..
_static Admin documents listing - rename 'uploaded' to 'created 2019-10-24 07:40:59 +10:00
advanced_topics Update links in docs to point at stable Django version 2019-12-01 13:19:40 +10:00
contributing Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00
editor_manual Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00
getting_started Make Django 3.0 support official 2019-12-17 14:24:31 +00:00
reference Update docs to cover responsive HTML being disabled by default 2020-01-20 18:57:51 +00:00
releases Support the rel attribute on ModelAdmin buttons 2020-01-26 21:06:26 -05:00
topics Update docs to cover responsive HTML being disabled by default 2020-01-20 18:57:51 +00:00
autobuild.sh
conf.py Add Wagtail Space Arnhem banner to documentation 2019-01-24 11:28:56 +00:00
favicon.ico add favicon to documentation 2018-03-08 12:24:13 +00:00
index.rst Fix broken link to bakerydemo (#4834) 2018-10-21 11:38:28 +02:00
logo.png
Makefile Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00
README.md Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00
requirements.txt
spelling_wordlist.txt Added more words to the spelling wordlist 2018-04-05 12:13:05 +01:00
support.rst Update links in documentation. (#5689) 2019-11-08 09:15:01 +00:00

Wagtail docs

These are Sphinx docs, automatically built at https://docs.wagtail.io when the master branch is committed to Github. To build them locally, install Wagtail's development requirements (in the root Wagtail directory):

pip install -e .[testing,docs]

To build the documentation for browsing, from this directory run:

make html 

then open _build/html/index.html in a browser.

To rebuild automatically while editing the documentation, from this directory run:

sphinx-autobuild . _build

The online editor at http://rst.ninjs.org/ is a helpful tool for checking reStructuredText syntax.