evennia.web.website.views.help

Views to manipulate help entries.

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

Bases: evennia.web.website.views.mixins.TypeclassMixin

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.

model

alias of evennia.help.models.HelpEntry

page_title = 'Help'
get_queryset()[source]

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

Returns

queryset (QuerySet) – 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, evennia.web.website.views.mixins.EvenniaDetailView

Returns the detail page for a given help entry.

template_name = 'website/help_detail.html'
get_context_data(**kwargs)[source]

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

Returns

context (dict) – Django context object

get_object(queryset=None)[source]

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

Returns

entry (HelpEntry) – HelpEntry requested in the URL.