Views to manipulate help entries.

Multi entry object type supported added by DaveWithTheNiceHat 2021

Pull Request #2429

evennia.web.website.views.help.get_help_category(help_entry, slugify_cat=True)[source]

Returns help category.

  • help_entry (HelpEntry, FileHelpEntry or Command) – Help entry instance.

  • slugify_cat (bool) – If true the return string is slugified. Default is True.


If an entry does not have a help_category attribute, DEFAULT_HELP_CATEGORY from the settings file is used. If the entry does not have attribute ‘web_help_entries’. One is created with a slugified copy of the attribute help_category. This attribute is used for sorting the entries for the help index (ListView) page.


help_category (str) – The category for the help entry.


Get the topic of the help entry.


help_entry (HelpEntry, FileHelpEntry or Command) – Help entry instance.


help_topic (str) – The topic of the help entry. Default is ‘unknown_topic’.

evennia.web.website.views.help.can_read_topic(cmd_or_topic, account)[source]

Check if an account or puppet has read access to a help entry.


bool – If command can be viewed or not.


This uses the ‘read’ lock. If no ‘read’ lock is defined, the topic is assumed readable by all. Even if this returns False, the entry will still be visible in the help index unless can_list_topic is also returning False.


Collect help topics from all sources (cmd/db/file).


account (Character or Account) – Account or Character to collect help topics from.


cmd_help_topics (dict) – contains Command instances. db_help_topics (dict): contains HelpEntry instances. file_help_topics (dict): contains FileHelpEntry instances

class evennia.web.website.views.help.HelpMixin[source]

Bases: object

This is a “mixin”, a modifier of sorts.

Any view class with this in its inheritance list will be modified to work with HelpEntry objects instead of generic Objects or otherwise.

page_title = 'Help'

Django hook; here we want to return a list of only those HelpEntries and other documentation that the current user is allowed to see.


queryset (list) – List of Help entries available to the user.

class evennia.web.website.views.help.HelpListView(**kwargs)[source]

Bases: evennia.web.website.views.help.HelpMixin, django.views.generic.list.ListView

Returns a list of help entries that can be viewed by a user, authenticated or not.

paginate_by = 500
template_name = 'website/help_list.html'
page_title = 'Help Index'
class evennia.web.website.views.help.HelpDetailView(**kwargs)[source]

Bases: evennia.web.website.views.help.HelpMixin, django.views.generic.detail.DetailView

Returns the detail page for a given help entry.

template_name = 'website/help_detail.html'
property page_title

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.


Adds navigational data to the template to let browsers go to the next or previous entry in the help list.


context (dict) – Django context object


Override of Django hook that retrieves an object by category and topic instead of pk and slug.


queryset (list) – A list of help entry objects.


entry (HelpEntry, FileHelpEntry or Command) – HelpEntry requested in the URL.