Add docs for MasterView.help_url
and get_help_url()
This commit is contained in:
parent
e5ffe3025b
commit
db25a5bfd0
2 changed files with 31 additions and 8 deletions
|
@ -107,6 +107,7 @@ class MasterView(View):
|
|||
use_index_links = False
|
||||
|
||||
has_versions = False
|
||||
help_url = None
|
||||
|
||||
labels = {'uuid': "UUID"}
|
||||
|
||||
|
@ -1693,7 +1694,18 @@ class MasterView(View):
|
|||
return self.request.route_url('{}.{}'.format(route_prefix, action), **kw)
|
||||
|
||||
def get_help_url(self):
|
||||
return getattr(self, 'help_url', None)
|
||||
"""
|
||||
May return a "help URL" if applicable. Default behavior is to simply
|
||||
return the value of :attr:`help_url` (regardless of which view is in
|
||||
effect), which in turn defaults to ``None``. If an actual URL is
|
||||
returned, then a Help button will be shown in the page header;
|
||||
otherwise it is not shown.
|
||||
|
||||
This method is invoked whenever a template is rendered for a response,
|
||||
so if you like you can return a different help URL depending on which
|
||||
type of CRUD view is in effect, etc.
|
||||
"""
|
||||
return self.help_url
|
||||
|
||||
def render_to_response(self, template, data, mobile=False):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue