wagtail/docs
Neal Todd 4a93424654 Prevent exception when attempting to delete a model with a protected 1-to-1 relation
Modeladmin handles notification to the user if a model instance has protected ForeignKey
relationships. However, if the protected relation is a OneToOneField it raises an exception:

  File ".../wagtail/wagtail/contrib/modeladmin/views.py", line 742, in post
    for obj in qs.all():
AttributeError: 'MyRelatedModel' object has no attribute 'all'

because qs in this case is the related instance rather than a queryset of related instances
(as is the case for a ForeignKey).

This commit handles the OneToOneField case as well.
2019-08-04 17:20:41 +10:00
..
_static Adds Collections section to editor's guide 2019-06-17 10:13:49 +01:00
advanced_topics Updated feature detection notes 2019-07-21 18:03:09 +10:00
contributing Adjust link label 2019-06-25 12:10:34 +01:00
editor_manual Adds Collections section to editor's guide 2019-06-17 10:13:49 +01:00
getting_started Remove support for Python 3.4 2019-04-10 17:39:53 +01:00
reference Add a `construct_page_listing_buttons` hook 2019-07-21 17:40:26 +10:00
releases Prevent exception when attempting to delete a model with a protected 1-to-1 relation 2019-08-04 17:20:41 +10:00
topics Add support for custom search handler classes to ModelAdmin's IndexView 2019-06-08 17:57:24 +01:00
Makefile add way of autocompile documentation 2017-02-20 20:24:17 +00:00
README.md Eliminate reference to requirements-dev.txt 2016-02-05 15:48:01 +00:00
autobuild.sh [skip ci] added commment about autobuild inside vms (#3379) 2017-02-16 21:29:10 +00:00
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 reduced size of logo 2015-07-07 14:41:41 +01:00
requirements.txt readthedocs needs a requirements.txt, apparently 2017-10-09 19:45:07 +01:00
spelling_wordlist.txt Added more words to the spelling wordlist 2018-04-05 12:13:05 +01:00
support.rst Add note about not asking support questions in multiple places 2018-07-11 11:09:45 +01:00

README.md

Wagtail docs

These are Sphinx docs, automatically built at http://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.