Last active
November 10, 2020 13:28
-
-
Save godfather68/a238d5f078973863a9f73163b78f4b37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from .models import Customer | |
from import_export import resources | |
from import_export.admin import ImportExportModelAdmin | |
# Register your models here. | |
class CustomerResource(resources.ModelResource): | |
class Meta: | |
model = Customer | |
skip_unchange = True | |
report_skipped = False | |
exclude = ('barcode', ) | |
class CustomerAdmin(ImportExportModelAdmin): | |
resource_class = CustomerResource | |
admin.site.register(Customer, CustomerAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment