mirror of
https://github.com/evennia/evennia.git
synced 2026-03-21 23:36:30 +01:00
Merge pull request #2704 from ChrisLR/components-delimiter-change
[Components Contrib] Changed DBField and NDBField delimiters from __ to ::
This commit is contained in:
commit
ca06dd7c7b
2 changed files with 3 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ class Health(Component):
|
|||
Components may define DBFields or NDBFields at the class level.
|
||||
DBField will store its values in the host's DB with a prefixed key.
|
||||
NDBField will store its values in the host's NDB and will not persist.
|
||||
The key used will be 'component_name__field_name'.
|
||||
The key used will be 'component_name::field_name'.
|
||||
They use AttributeProperty under the hood.
|
||||
|
||||
Example:
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class DBField(AttributeProperty):
|
|||
owner (object): The component classF on which this is set
|
||||
name (str): The name that was used to set the DBField.
|
||||
"""
|
||||
key = f"{owner.name}__{name}"
|
||||
key = f"{owner.name}::{name}"
|
||||
self._key = key
|
||||
db_fields = getattr(owner, "_db_fields", None)
|
||||
if db_fields is None:
|
||||
|
|
@ -45,7 +45,7 @@ class NDBField(NAttributeProperty):
|
|||
owner (object): The component class on which this is set
|
||||
name (str): The name that was used to set the DBField.
|
||||
"""
|
||||
key = f"{owner.name}__{name}"
|
||||
key = f"{owner.name}::{name}"
|
||||
self._key = key
|
||||
ndb_fields = getattr(owner, "_ndb_fields", None)
|
||||
if ndb_fields is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue