diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-03 21:16:05 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-09-03 21:16:05 +0000 |
| commit | 559c0da7c141488e5d7c6bc0ef54f27dca53ca42 (patch) | |
| tree | 59d4dac0ae9dc2299b0e278a686b90b5c270dc6e /django/contrib/admin/widgets.py | |
| parent | d7e37b661c33c563a0cbca892697c62b52312223 (diff) | |
Fixed a small initialisation edge-case in the raw_id_fields section of admin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/admin/widgets.py')
| -rw-r--r-- | django/contrib/admin/widgets.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index bad4702d92..f9ddf9acd9 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -105,6 +105,8 @@ class ForeignKeyRawIdWidget(forms.TextInput): super(ForeignKeyRawIdWidget, self).__init__(attrs) def render(self, name, value, attrs=None): + if attrs is None: + attrs = {} related_url = '../../../%s/%s/' % (self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower()) params = self.url_parameters() if params: |
