Changed object and alias search methods to be more effective. Made aliases a separate model to avoid overhead with large searches. The change of aliases meand you need to resync your database.

This commit is contained in:
Griatch 2010-10-30 18:42:37 +00:00
parent 268328d36a
commit 19dd476115
3 changed files with 174 additions and 196 deletions

View file

@ -87,7 +87,7 @@ class TypedObjectManager(models.Manager):
are either a string '#N' or an integer N.
Output is the integer part.
"""
if type(dbref) == str:
if isinstance(dbref, basestring):
dbref = dbref.lstrip('#')
try:
dbref = int(dbref)