Django import-export choices field
问题 I have a model with choices list ( models.py ): class Product(models.Model): ... UNITS_L = 1 UNITS_SL = 2 UNITS_XL = 3 PRODUCT_SIZE_CHOICES = ( (UNITS_L, _('L')), (UNITS_SL, _('SL')), (UNITS_XL), _('XL'), ) product_size = models.IntegerField(choices=PRODUCT_SIZE_CHOICES) ... Also I added a new class for exporting needed fields( admin.py ): from import_export import resources, fields ... Class ProductReport(resources.ModelResource): product_size = fields.Field() class Meta: model = Product #I