8000 Update apphooks.rst (#6255) · django-cms/django-cms@3824adb · GitHub
[go: up one dir, main page]

Skip to content

Commit 3824adb

Browse files
Chematronixevildmp
authored andcommitted
Update apphooks.rst (#6255)
* Update apphooks.rst You need to add *Application instance name* by hand to a page when you add an ``app_name`` #hopeitsavessomeoneelsethetrouble * Changed as per czpython's suggestions While still trying to convey t 8000 hat we're fixing the same problem than the previous paragraphs refers to (and that *Application instance name* only appears after setting ``app_name`` )
1 parent 8aed395 commit 3824adb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/how_to/apphooks.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ then your ``MyApphook`` class should include::
6060
If you fail to this, then 5E99 any templates in the application that invoke URLs using the form ``{% url 'myapp:index' %}``
6161
or views that call (for example) ``reverse('myapp:index')`` will throw a ``NoReverseMatch`` error.
6262

63+
If you had already assigned a page to your aplication prior to setting the ``app_name`` attribute, you'll also need to edit its *Advanced settings* and specify your ``app_name`` in the *Application instance name* field that now appears, to avoid the ``NoReverseMatch`` error (the instance name is filled automatically in new pages).
64+
6365
*Unless* the class that defines the apphook specifies an ``app_name``, it can be attached only to one page at a time.
6466
Attempting to apply it a second time will cause an error. See :ref:`multi_apphook` for more on having multiple apphook
6567
instances.

0 commit comments

Comments
 (0)
0