From 0b3515a91669f229469ea80c0a77f810760afb29 Mon Sep 17 00:00:00 2001 From: Dave Cranwell Date: Mon, 1 Sep 2014 16:16:15 +0100 Subject: [PATCH] Update creating_pages.rst --- docs/core_components/pages/creating_pages.rst | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/core_components/pages/creating_pages.rst b/docs/core_components/pages/creating_pages.rst index e6fb9a14b1..e5e4d740db 100644 --- a/docs/core_components/pages/creating_pages.rst +++ b/docs/core_components/pages/creating_pages.rst @@ -147,3 +147,26 @@ In addition to the model fields provided, ``Page`` has many properties and metho Defines which template file should be used to render the login form for Protected pages using this model. This overrides the default, defined using ``PASSWORD_REQUIRED_TEMPLATE`` in your settings. See :ref:`private_pages` +Tips +~~~~ + +Friendly model names +-------------------- + +Make your model names more friendly to users of Wagtail using Django's ``Meta`` class with a ``verbose_name`` e.g + +.. code-block:: python + + class HomePage(Page): + ... + + class Meta: + 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. + +The above example also ensures the name of the + +Describing your models +---------------------- +