Commits

Germano Gabbianelli committed 8c6c489

Fixed wrong imports and a little error in autocomplete/views.py.

  • Participants
  • Parent commits 14c5369

Comments (0)

Files changed (1)

File autocomplete/views.py

 import operator
 
-from django.core.exceptions import ImproperlyConfigured
 from django.core.urlresolvers import reverse
-from django.contrib.admin.validation import check_isseq
 from django.db import models
-from django.http import Http404, HttpResponse
+from django.http import Http404, HttpResponse, HttpResponseForbidden
 from django.utils import simplejson
 from django.utils.encoding import smart_str
 
         def build_func(attr):
             if attr in self.model._meta.get_all_field_names():
                  return lambda m: getattr(m, attr)
-            return lambda m: value % vars(m)
+            return lambda m: attr % vars(m)
 
         for name in ('value', 'label'):
             attr = getattr(self, name)