kopia lustrzana https://github.com/wagtail/wagtail
wording tweak
rodzic
e7e63e605e
commit
09f1300f89
|
@ -21,11 +21,11 @@ You should be familiar with Django templating basics before continuing with this
|
|||
Templates
|
||||
==========================
|
||||
|
||||
Every type of page or "content type" in Wagtail is defined in "The Model": a file called ``models.py``. The name of each "page model" is prefixing with ``class``. e.g If your site has a blog, you might have a ``BlogPage`` page model and another called ``BlogPageListing``. The names of the models are up to the developer.
|
||||
Every type of page or "content type" in Wagtail is defined as a "model" in a file called ``models.py``. If your site has a blog, you might have a ``BlogPage`` model and another called ``BlogPageListing``. The names of the models are up to the Django developer.
|
||||
|
||||
For each type of page in ``models.py``, Wagtail assumes an HTML template file exists of (almost) the same name. The Front End developer may need to create these templates themselves.
|
||||
For each page model in ``models.py``, Wagtail assumes an HTML template file exists of (almost) the same name. The Front End developer may need to create these templates themselves by refering to ``models.py`` to infer template names from the models defined therein.
|
||||
|
||||
To find a suitable template, Wagtail converts CamelCase names to underscore_case. So for a ``BlogPage``, a template file ``blog_page.html`` will be expected. The name of the template file can be overridden per model if necessary.
|
||||
To find a suitable template, Wagtail converts CamelCase names to underscore_case. So for a ``BlogPage``, a template ``blog_page.html`` will be expected. The name of the template file can be overridden per model if necessary.
|
||||
|
||||
Template files are assumed to exist here::
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue