mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 15:56:30 +01:00
command and filehelp addded web_get_admin_rul
It was a very easy add.
This commit is contained in:
parent
1bb1345ac9
commit
5e42b2e43c
2 changed files with 24 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue