Generate Django Rest API and Ionic API services automatically

March 2020
Buy me a coffeeBuy me a coffee

Discover my new eBook and get 20% on your purchase with this coupon code : 6XGMDHWX
Django Admin ultimate guide

Each time i have a new mobile application to develop, i need to create the Ionic project plus the Django project as backend.
It is always a boring and repetitive task and a lot of copy/paste from previous projects. So i decided to create a tool which will generate the code for me and then i will just have to place the generated files into my Ionic project and my Django project.

Ionic and Django CRUD generator

This tool is named "IonicDjangoCrudGenerator" and you will find the code here

All you need to do is to include the package into your Django project

pip install  -i

Then include the ionicdjangocrudgenerator library in your INSTALLED_APPS


and generate the code with the command:

python generateCrud <your_application>

Files will be created into a directory named:


And files will be: The Django REST API views The Django REST serializers The Django REST urls
ionic_apiservice.service.ts The Ionic API service with CRUD methods for your models and some other useful methods
ionic_entities.ts The Ionic entities classes for your models

This library is still experimental but it should help you to save lot of times.