A Django Rest App With Type Annotated Way

There is a lot of Django crud tutorial out there. I was looking for a tutorial which uses Python type annotation but there is no one which I like, so I learn and made one. The benefit of type annotation is its give you a type integrity violation warning if you put any mismatching type there. The benefit is its help you find bug earlier though there is no performance gain or loss. There is a git hub link i put there, you can clone it and run the project.

First you need to run requirements.txt file, And follow the Instruction given in github README.md file.

All this things as usual other django project but only difference is in views.py file.

Here is type annotated django views, views.py file

**This project is developed on python 3.6

How to run the project

** Use virtual environment for isolated local development

1. pip install -r requirement.txt
2. python manage.py makemigrations contact
(Before running this command set database connection properly in settings.py file)
3. python manage.py migrate
4. python manage.py runserver_plus localhost:8000 (For development)
5. gunicorn InterconnectionContact.wsgi:application -w 4 -b localhost:8000 (For production with optional flag)**
6. curl -H "Content-Type: application/json" -X POST -d '{"first_name":"xyz","last_name":"xyz"}' http://localhost:8000/api/v1/contact/
7. # Or use any rest client such as Advanced Rest Client for getting data from rest url

** For Production you can use gunicorn or other wsgi compatible server
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.