Member-only story

Import/Export Files in Django via the Admin Panel

Rajan Sahu
4 min readJun 29, 2022

--

My article is for everyone! Non-members can click on this link and jump straight into the full text!!

Recently, I came across a third-party library for Django django-import-export that allows one to import and export data using the admin panel for files of different formats (csv, json, xls, xml, yaml, tsv). Today we are going to explore this library and see how it works.

import-export

Introduction

  • django-import-export is a Django application and library for importing and exporting data with the included admin integration.

Requirements

  1. django
  2. django-import-export

1. Project Setup

Click here and follow the steps to create and activate a virtual environment.

Then install all the packages mentioned in the requirements.txt file.

2. Create the Project

django-admin startproject importexportadmin .

Note: The “.” at the end instructs manage.py that you want the project to be constructed in the current folder and not in a sub-folder.

3. Create the App

python manage.py startapp app

--

--

Rajan Sahu
Rajan Sahu

Written by Rajan Sahu

Backend and Data Engineer by Day; Teacher, Friend and Content-Writer by night.

Responses (3)