evennia.server.manager¶
Custom manager for ServerConfig objects.
-
class
evennia.server.manager.
ServerConfigManager
(*args, **kwargs)[source]¶ Bases:
django.db.models.manager.Manager
This ServerConfigManager implements methods for searching and manipulating ServerConfigs directly from the database.
These methods will all return database objects (or QuerySets) directly.
ServerConfigs are used to store certain persistent settings for the server at run-time.
-
conf
(key=None, value=None, delete=False, default=None)[source]¶ Add, retrieve and manipulate config values.
- Parameters
key (str, optional) – Name of config.
value (str, optional) – Data to store in this config value.
delete (bool, optional) – If True, delete config with key.
default (str, optional) – Use when retrieving a config value by a key that does not exist.
- Returns
all (list) – If key was not given - all stored config values. value (str): If key was given, this is the stored value, or
default if no matching key was found.
-