Permalink
Browse files

Fixed #7828 -- Removed some unnecessary imports from admin widgets. T…

…hanks to Julien for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 56df66b commit 69ac815a4112be4dce21b5f1e38a8a1a8f9db0ba @freakboy3742 freakboy3742 committed Jul 19, 2008
Showing with 0 additions and 4 deletions.
  1. +0 −4 django/contrib/admin/widgets.py
@@ -27,7 +27,6 @@ def __init__(self, verbose_name, is_stacked, attrs=None, choices=()):
super(FilteredSelectMultiple, self).__init__(attrs, choices)
def render(self, name, value, attrs=None, choices=()):
- from django.conf import settings
output = [super(FilteredSelectMultiple, self).render(name, value, attrs, choices)]
output.append(u'<script type="text/javascript">addEvent(window, "load", function(e) {')
# TODO: "id_" is hard-coded here. This should instead use the correct
@@ -85,7 +84,6 @@ def __init__(self, attrs={}):
super(AdminFileWidget, self).__init__(attrs)
def render(self, name, value, attrs=None):
- from django.conf import settings
output = []
if value:
output.append('%s <a target="_blank" href="%s%s">%s</a> <br />%s ' % \
@@ -103,7 +101,6 @@ def __init__(self, rel, attrs=None):
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()])
@@ -187,7 +184,6 @@ def __deepcopy__(self, memo):
return obj
def render(self, name, value, *args, **kwargs):
- from django.conf import settings
rel_to = self.rel.to
related_url = '../../../%s/%s/' % (rel_to._meta.app_label, rel_to._meta.object_name.lower())
self.widget.choices = self.choices

0 comments on commit 69ac815

Please sign in to comment.