mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 02:36:32 +01:00
cleanup
This commit is contained in:
parent
5e8a632e9e
commit
bcec7a1ec0
2 changed files with 5 additions and 5 deletions
|
|
@ -74,7 +74,6 @@ from evennia.utils.utils import (
|
|||
from evennia.utils import logger
|
||||
from evennia.utils.utils import lazy_property
|
||||
from evennia.locks.lockhandler import LockHandler
|
||||
from evennia.utils.logger import log_info
|
||||
|
||||
_DEFAULT_HELP_CATEGORY = settings.DEFAULT_HELP_CATEGORY
|
||||
|
||||
|
|
@ -145,14 +144,12 @@ class FileHelpEntry:
|
|||
path (str): URI path to object detail page, if defined.
|
||||
|
||||
"""
|
||||
# log_info('filehelp web_get_detail_url start')
|
||||
try:
|
||||
return reverse(
|
||||
'help-entry-detail',
|
||||
kwargs={"category": slugify(self.help_category), "topic": slugify(self.key)},
|
||||
)
|
||||
except Exception as e:
|
||||
log_info(f'Exception: {getattr(e, "message", repr(e))}')
|
||||
except Exception:
|
||||
return "#"
|
||||
|
||||
def access(self, accessing_obj, access_type="view", default=True):
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ from evennia.help.manager import HelpEntryManager
|
|||
from evennia.typeclasses.models import Tag, TagHandler, AliasHandler
|
||||
from evennia.locks.lockhandler import LockHandler
|
||||
from evennia.utils.utils import lazy_property
|
||||
from evennia.utils.logger import log_info
|
||||
|
||||
__all__ = ("HelpEntry",)
|
||||
|
||||
|
|
@ -57,9 +56,11 @@ class HelpEntry(SharedMemoryModel):
|
|||
db_key = models.CharField(
|
||||
"help key", max_length=255, unique=True, help_text="key to search for"
|
||||
)
|
||||
|
||||
@lazy_property
|
||||
def key(self):
|
||||
return self.db_key
|
||||
|
||||
# help category
|
||||
db_help_category = models.CharField(
|
||||
"help category",
|
||||
|
|
@ -67,9 +68,11 @@ class HelpEntry(SharedMemoryModel):
|
|||
default="General",
|
||||
help_text="organizes help entries in lists",
|
||||
)
|
||||
|
||||
@lazy_property
|
||||
def help_category(self):
|
||||
return self.db_help_category
|
||||
|
||||
# the actual help entry text, in any formatting.
|
||||
db_entrytext = models.TextField(
|
||||
"help entry", blank=True, help_text="the main body of help text"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue