jeudi 10 août 2017

How to add custom button for model in Django

I want to create custom button for Django which will allowed importing data from JSON files to database. Is it possible to add custom button in Django Admin, like in example below (Button Import JSON)?

How it should looks like

I have tried this gist, but it is do not work, because i use latest version of Django.

How should looks like content of json file:

{ "records": [ { "name": "countries", "content": [ { "label": "Russia", "value": "Russia" }, { "label": "Norway", "value": "Norway" } ] } ] }

Aucun commentaire:

Enregistrer un commentaire