Skip to content

Commit 691baad

Browse files
authored
Update widgets.py (django-import-export#1193)
Example for widgets usage for export doesn't work. It has to instantiate class, and correct namespace is widgets, not widget.
1 parent cd06c59 commit 691baad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

import_export/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class BooleanWidget(Widget):
116116
from import_export import fields, resources, widgets
117117
118118
class BooleanExample(resources.ModelResource):
119-
warn = fields.Field(widget=widget.BooleanWidget)
119+
warn = fields.Field(widget=widgets.BooleanWidget())
120120
121121
def before_row_import(self, row, **kwargs):
122122
if "warn" in row.keys():

0 commit comments

Comments
 (0)