Skip to content

Commit

Permalink
fix padding in admin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zenx committed Aug 22, 2022
1 parent 7006851 commit bc91442
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Chapter09/myshop/orders/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def export_to_csv(modeladmin, request, queryset):
response['Content-Disposition'] = content_disposition
writer = csv.writer(response)
fields = [field for field in opts.get_fields() if not \
field.many_to_many and not field.one_to_many]
field.many_to_many and not field.one_to_many]
# Write a first row with header information
writer.writerow([field.verbose_name for field in fields])
# Write data rows
Expand Down
2 changes: 1 addition & 1 deletion Chapter10/myshop/orders/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def export_to_csv(modeladmin, request, queryset):
response['Content-Disposition'] = content_disposition
writer = csv.writer(response)
fields = [field for field in opts.get_fields() if not \
field.many_to_many and not field.one_to_many]
field.many_to_many and not field.one_to_many]
# Write a first row with header information
writer.writerow([field.verbose_name for field in fields])
# Write data rows
Expand Down
2 changes: 1 addition & 1 deletion Chapter11/myshop/orders/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def export_to_csv(modeladmin, request, queryset):
response['Content-Disposition'] = content_disposition
writer = csv.writer(response)
fields = [field for field in opts.get_fields() if not \
field.many_to_many and not field.one_to_many]
field.many_to_many and not field.one_to_many]
# Write a first row with header information
writer.writerow([field.verbose_name for field in fields])
# Write data rows
Expand Down

0 comments on commit bc91442

Please sign in to comment.