mirror of
https://github.com/evennia/evennia.git
synced 2026-04-06 16:44:08 +02:00
First version with all caches seemingly working ok. Started to remove the on-model wrappers that are not handled by the idmapper metaclass.
This commit is contained in:
parent
f1ba0ca177
commit
9e10a41e18
10 changed files with 144 additions and 165 deletions
|
|
@ -90,7 +90,7 @@ def field_pre_save(sender, instance=None, update_fields=None, raw=False, **kwarg
|
|||
"""
|
||||
if raw:
|
||||
return
|
||||
print "field_pre_save:", instance, update_fields# if hasattr(instance, "db_key") else instance, update_fields
|
||||
#print "field_pre_save:", instance, update_fields# if hasattr(instance, "db_key") else instance, update_fields
|
||||
if update_fields:
|
||||
# this is a list of strings at this point. We want field objects
|
||||
update_fields = (_GA(_GA(instance, "_meta"), "get_field_by_name")(field)[0] for field in update_fields)
|
||||
|
|
@ -166,7 +166,7 @@ def post_attr_update(sender, **kwargs):
|
|||
obj = kwargs['instance']
|
||||
model = kwargs['model']
|
||||
action = kwargs['action']
|
||||
print "update_attr_cache:", obj, model, action
|
||||
#print "update_attr_cache:", obj, model, action
|
||||
if kwargs['reverse']:
|
||||
# the reverse relation changed (the Attribute itself was acted on)
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -48,9 +48,6 @@ class ServerConfig(SharedMemoryModel):
|
|||
|
||||
objects = ServerConfigManager()
|
||||
|
||||
# used by Attributes eventually storing this safely
|
||||
_db_model_name = "serverconfig"
|
||||
|
||||
# Wrapper properties to easily set database fields. These are
|
||||
# @property decorators that allows to access these fields using
|
||||
# normal python operations (without having to remember to save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue