Optimized Scripts admin page. Fixed related name for objects on attributes.

Repaired search. Removed some backwards compatible parts of picklefield since
we aren't supporting version older than 1.5 and they were obscuring the true
cause of some issues.
This commit is contained in:
Kelketek 2013-07-21 09:44:34 -05:00
parent 699f86273b
commit 427dcc3985
4 changed files with 17 additions and 20 deletions

View file

@ -596,7 +596,8 @@ class TypedObject(SharedMemoryModel):
help_text="locks limit access to an entity. A lock is defined as a 'lock string' on the form 'type:lockfunctions', defining what functionality is locked and how to determine access. Not defining a lock means no access is granted.")
# many2many relationships
db_attributes = models.ManyToManyField(Attribute, null=True,
help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).')
help_text='attributes on this object. An attribute can hold any pickle-able python object (see docs for special cases).',
related_name='db_objects')
db_liteattributes = models.ManyToManyField(LiteAttribute, null=True,
help_text='liteattributes on this object. A LiteAttribute holds a key, a category and a string field for simple lookups.')
db_tags = models.ManyToManyField(Tag, null=True,
@ -1158,7 +1159,7 @@ class TypedObject(SharedMemoryModel):
attribute_name: (str) The attribute's name.
default: What to return if no attribute is found
raise_exception (bool) - raise an eception if no object exists instead of returning default.
raise_exception (bool) - raise an exception if no object exists instead of returning default.
"""
attr_obj = get_attr_cache(self, attribute_name)
if not attr_obj: