Commits

Anonymous committed 59b2dd9

added standard settings to dbindexer

  • Participants
  • Parent commits 7eb2383

Comments (0)

Files changed (2)

File dbindexer/backends.py

             del query.table_map[table_name]
         query.used_aliases.discard(alias)
 
-class PKNullFix(BaseResolver):
+class FKNullFix(BaseResolver):
     '''
         Django doesn't generate correct code for ForeignKey__isnull.
         It becomes a JOIN with pk__isnull which won't work on nonrel DBs,

File dbindexer/resolver.py

 class Resolver(object):
     def __init__(self):
         self.backends = []
-        for backend in settings.DBINDEXER_BACKENDS:
+        for backend in getattr(settings, 'DBINDEXER_BACKENDS',
+                               ('dbindexer.backends.BaseResolver',
+                                'dbindexer.backends.FKNullFix')):
                 self.backends.append(self.load_backend(backend))
 
     def load_backend(self, path):