diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/models.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/narr/models.rst b/docs/narr/models.rst index 61e313830..9daa5668d 100644 --- a/docs/narr/models.rst +++ b/docs/narr/models.rst @@ -111,6 +111,15 @@ string. For instance: __name__ = '' __parent__ = None +.. note:: If your root model object has a ``__name__`` argument that + is not ``None`` or the empty string, URLs returned by the + ``repoze.bfg.url.model_url`` function and paths generated by the + ``repoze.bfg.traversal.model_path`` and + ``repoze.bfg.traversal.model_path_tuple`` APIs will be generated + improperly. The value of ``__name__`` will be prepended to every + path and URL generated (as opposed to a single leading slash or + empty tuple element). + A node returned from the root item's ``__getitem__`` method should have a ``__parent__`` attribute that is a reference to the root object, and its ``__name__`` attribute should match the name by which |
