Django import_export lib buttons not showing in admin site
from django.contrib import admin
from import_export.admin import ImportExportModelAdmin
from .models import members
@admin.register(members)
class MembersAdmin(ImportExportModelAdmin):
pass
this is my code in admin.py .actually i am trying to use import-export lib for my project while running in server it show the models i have created but its not showing the button where we can import export.(btw i am a noob in this field)
i need answer for my queries related to the python django library
I create test project and tried configure Django. It works
models.py:
from django.db import models
class Person(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
admin.py:
from django.contrib import admin
from core.models import Person
from import_export import resources
from import_export.admin import ImportExportModelAdmin
class PersonResource(resources.ModelResource):
class Meta:
model = Person
class PersonAdmin(ImportExportModelAdmin):
resource_classes = [PersonResource]
admin.site.register(Person, PersonAdmin)