Open hawk5555 opened 5 years ago
my environment is python3.6 \django2.1 :
when I follow the example of the resource code ,set a field a widget:Select2Widget,
class CustomerComposeSelect2Widget(Bootstrap4Select,ModelSelect2Widget): # Bootstrap4Select, search_fields = [ 'name__icontains', 'no__iexact', ]
But, when i open editable web, some error occur:
File "E:\env_home\contact_env\lib\site-packages\django\forms\widgets.py", line 222, in get_context 'attrs': self.build_attrs(self.attrs, attrs), TypeError: build_attrs() takes from 1 to 2 positional arguments but 3 were given [21/Aug/2019 17:49:36] "GET /admin/sales_contracts/contractschains/add/ HTTP/1.1" 500 768600
IF I remove the Bootstrap4Select, all are OK.
watting for your answers.
my environment is python3.6 \django2.1 , when i add showcase, this issue is :
context = super().get_context(name, value, attrs) File "G:\virtualenvhome\suit\lib\site-packages\django\forms\widgets.py", line 222, in get_context 'attrs': self.build_attrs(self.attrs, attrs), TypeError: build_attrs() takes from 1 to 2 positional arguments but 3 were given [08/Aug/2019 09:08:11] "GET /admin/demo/showcase/add/ HTTP/1.1" 500 700440