Committin a 'working' checkpoint before I break more stuff.
This commit is contained in:
parent
ccf078b5c8
commit
d3808c1ea2
18 changed files with 494 additions and 444 deletions
18
apps/objects/managers/attribute.py
Normal file
18
apps/objects/managers/attribute.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
"""
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue