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
This commit is contained in:
parent
d7e37b661c
commit
559c0da7c1
|
@ -105,6 +105,8 @@ class ForeignKeyRawIdWidget(forms.TextInput):
|
||||||
super(ForeignKeyRawIdWidget, self).__init__(attrs)
|
super(ForeignKeyRawIdWidget, self).__init__(attrs)
|
||||||
|
|
||||||
def render(self, name, value, attrs=None):
|
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())
|
related_url = '../../../%s/%s/' % (self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower())
|
||||||
params = self.url_parameters()
|
params = self.url_parameters()
|
||||||
if params:
|
if params:
|
||||||
|
|
Loading…
Reference in New Issue