mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-23 14:25:50 +00:00
Makes notes for settings module more visible (#2826)
This commit is contained in:
parent
b79069b247
commit
0b29ba80db
1 changed files with 2 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ Then access the settings through ``{{ settings }}``:
|
|||
|
||||
{{ settings.app_label.SocialMediaSettings.instagram }}
|
||||
|
||||
(Replace ``app_label`` with the label of the app containing your settings model.)
|
||||
.. note:: Replace ``app_label`` with the label of the app containing your settings model.
|
||||
|
||||
If you are not in a ``RequestContext``, then context processors will not have run, and the ``settings`` variable will not be availble. To get the ``settings``, use the provided ``{% get_settings %}`` template tag. If a ``request`` is in the template context, but for some reason it is not a ``RequestContext``, just use ``{% get_settings %}``:
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ Then access the settings through the ``settings()`` template function:
|
|||
|
||||
{{ settings("app_label.SocialMediaSettings").twitter }}
|
||||
|
||||
(Replace ``app_label`` with the label of the app containing your settings model.)
|
||||
.. note:: Replace ``app_label`` with the label of the app containing your settings model.
|
||||
|
||||
This will look for a ``request`` variable in the template context, and find the correct site to use from that. If for some reason you do not have a ``request`` available, you can instead use the settings defined for the default site:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue