From 5e42b2e43cec633c35d2f166db749b21eb0ea6e5 Mon Sep 17 00:00:00 2001 From: davewiththenicehat <54369722+davewiththenicehat@users.noreply.github.com> Date: Sun, 20 Jun 2021 09:16:23 -0400 Subject: [PATCH] command and filehelp addded web_get_admin_rul It was a very easy add. --- evennia/commands/command.py | 12 ++++++++++++ evennia/help/filehelp.py | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/evennia/commands/command.py b/evennia/commands/command.py index 0adf89bd11..a81f8b6efb 100644 --- a/evennia/commands/command.py +++ b/evennia/commands/command.py @@ -551,6 +551,18 @@ Command {self} has no defined `func()` - showing on-command variables: except Exception as e: return "#" + def web_get_admin_url(self): + """ + Returns the URI path for the Django Admin page for this object. + + ex. Account#1 = '/admin/accounts/accountdb/1/change/' + + Returns: + path (str): URI path to Django Admin page for object. + + """ + return False + def client_width(self): """ Get the client screenwidth for the session using this command. diff --git a/evennia/help/filehelp.py b/evennia/help/filehelp.py index bb28fd63ed..4e0a9dac03 100644 --- a/evennia/help/filehelp.py +++ b/evennia/help/filehelp.py @@ -152,6 +152,18 @@ class FileHelpEntry: except Exception: return "#" + def web_get_admin_url(self): + """ + Returns the URI path for the Django Admin page for this object. + + ex. Account#1 = '/admin/accounts/accountdb/1/change/' + + Returns: + path (str): URI path to Django Admin page for object. + + """ + return False + def access(self, accessing_obj, access_type="view", default=True): """ Determines if another object has permission to access this help entry.