Skip to content

Commit 6ec6c2f

Browse files
admin documentation
1 parent 7a4c88b commit 6ec6c2f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,21 @@ from .models import FileModel
382382

383383
data_wizard.set_loader(FileModel, "myapp.loaders.FileLoader")
384384
```
385+
You have to add a custom Admin model to add the Import action in the admin panel for your model.
385386

387+
```python
388+
# myapp/admin.py
389+
from django.contrib import admin
390+
from data_wizard.admin import ImportActionModelAdmin
391+
392+
from .models import FileModel
393+
394+
395+
@admin.register(FileModel)
396+
class FileModelAdmin(ImportActionModelAdmin):
397+
pass
398+
```
399+
386400
You can also set the default loader globally:
387401

388402
```python

0 commit comments

Comments
 (0)