Ticket #7828: unnecessary_imports.diff

File unnecessary_imports.diff, 1.7 KB (added by Julien Phalip, 16 years ago)
  • django/django/contrib/admin/widgets.py

     
    2727        super(FilteredSelectMultiple, self).__init__(attrs, choices)
    2828
    2929    def render(self, name, value, attrs=None, choices=()):
    30         from django.conf import settings
    3130        output = [super(FilteredSelectMultiple, self).render(name, value, attrs, choices)]
    3231        output.append(u'<script type="text/javascript">addEvent(window, "load", function(e) {')
    3332        # TODO: "id_" is hard-coded here. This should instead use the correct
     
    8584        super(AdminFileWidget, self).__init__(attrs)
    8685       
    8786    def render(self, name, value, attrs=None):
    88         from django.conf import settings
    8987        output = []
    9088        if value:
    9189            output.append('%s <a target="_blank" href="%s%s">%s</a> <br />%s ' % \
     
    103101        super(ForeignKeyRawIdWidget, self).__init__(attrs)
    104102
    105103    def render(self, name, value, attrs=None):
    106         from django.conf import settings
    107104        related_url = '../../../%s/%s/' % (self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower())
    108105        if self.rel.limit_choices_to:
    109106            url = '?' + '&amp;'.join(['%s=%s' % (k, v) for k, v in self.rel.limit_choices_to.items()])
     
    187184        return obj
    188185
    189186    def render(self, name, value, *args, **kwargs):
    190         from django.conf import settings
    191187        rel_to = self.rel.to
    192188        related_url = '../../../%s/%s/' % (rel_to._meta.app_label, rel_to._meta.object_name.lower())
    193189        self.widget.choices = self.choices
Back to Top