Removed "Helpful model descriptions" section

Not a big fan of having hacky code in the docs
pull/1011/head
Karl Hobley 2015-02-19 16:49:57 +00:00
rodzic eb01ac012c
commit 27b43b4a68
1 zmienionych plików z 0 dodań i 29 usunięć

Wyświetl plik

@ -165,32 +165,3 @@ Make your model names more friendly to users of Wagtail using Django's internal
verbose_name = "Homepage"
When users are given a choice of pages to create, the list of page types is generated by splitting your model names on each of their capital letters. Thus a ``HomePage`` model would be named "Home Page" which is a little clumsy. ``verbose_name`` as in the example above, would change this to read "Homepage" which is slightly more conventional.
Helpful model descriptions
--------------------------
As your site becomes more complex users may require some prompting in deciding which content type to use when creating a new page. Developers can add a description to their Models by extending Django's internal model ``Meta`` class.
Insert the following once at the top of your ``models.py``:
.. code-block:: python
import django.db.models.options as options
options.DEFAULT_NAMES = options.DEFAULT_NAMES + ('description',)
Then for each model as necessary, add a description option to the model ``Meta`` class
.. code-block:: python
class HomePage(Page):
...
class Meta:
description = "The top level homepage for your site"
verbose_name = "Homepage"
(This method can be used to extend the Model Meta class in various ways however Wagtail only supports the addition of a ``description`` option).