From 9848b54c372e3dda0c2d2a0b0b5cb71a370fd0c0 Mon Sep 17 00:00:00 2001 From: Michael Brannan Date: Fri, 28 Feb 2020 16:07:20 +0000 Subject: [PATCH] Django 1.11 fix for `AttributeError: 'GenericForeignKeyRawIdWidget' object has no attribute 'rel'` --- authority/widgets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authority/widgets.py b/authority/widgets.py index fb5821b..807a4bd 100644 --- a/authority/widgets.py +++ b/authority/widgets.py @@ -80,5 +80,8 @@ class GenericForeignKeyRawIdWidget(ForeignKeyRawIdWidget): ) return mark_safe(u"".join(output) + content_types) + def get_context(self, name, value, attrs): + return forms.TextInput.get_context(self, name, value, attrs) + def url_parameters(self): return {}