mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 02:06:32 +01:00
19 lines
461 B
Python
19 lines
461 B
Python
|
|
"""
|
||
|
|
Custom manager for Attribute objects.
|
||
|
|
"""
|
||
|
|
from django.db import models
|
||
|
|
|
||
|
|
import defines_global
|
||
|
|
|
||
|
|
class AttributeManager(models.Manager):
|
||
|
|
def is_modifiable_attrib(self, attribname):
|
||
|
|
"""
|
||
|
|
Check to see if a particular attribute is modifiable.
|
||
|
|
|
||
|
|
attribname: (string) An attribute name to check.
|
||
|
|
"""
|
||
|
|
if attribname.upper() not in defines_global.NOSET_ATTRIBS:
|
||
|
|
return True
|
||
|
|
else:
|
||
|
|
return False
|