          self.rel = rel
          super(ForeignKeyRawIdWidget, self).__init__(attrs)
  
      def render(self, name, value, attrs=None):
          from django.conf import settings
          related_url = '../../../%s/%s/' % (self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower())
          if self.rel.limit_choices_to:
              url = '?' + '&amp;'.join(['%s=%s' % (k, v) for k, v in self.rel.limit_choices_to.items()])
          else:
              url = ''
 
</s> remove         from django.conf import settings
 </s> add  </s> remove         from django.conf import settings
 </s> add  </s> remove         from django.conf import settings
 </s> add 
          self.rel = rel
          super(ForeignKeyRawIdWidget, self).__init__(attrs)
  
      def render(self, name, value, attrs=None):

          related_url = '../../../%s/%s/' % (self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower())
          if self.rel.limit_choices_to:
              url = '?' + '&amp;'.join(['%s=%s' % (k, v) for k, v in self.rel.limit_choices_to.items()])
          else:
              url = ''
keep keep keep keep replace keep keep keep keep keep
 Fixed #7828 -- Removed some unnecessary imports from admin widgets. Thanks to Julien for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7974 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/contrib/admin/widgets.py