Chandrashekhar Pantina
Nerd For Tech
Published in
3 min readJul 17, 2021

--

Django

Today I am going to talk about Django and its features. Though Django may not be so flexible but its high security aspect enables it to be used by most of the python developers. In my previous content I had talked about python, now I will tell you how MVT features I. E. Models, Views, Templates enable one to develop a website and also Django Rest Framework by installing library pip install Django Rest Framework.

Diabetes api format in rest framework.

Mysql database being reflected with values in Django website.

Django website

As you can see from above diagrams I have used Django to take user input in Diabetes section of data. Now by using models I have connected Django to mysql database. So suppose a user enters glucose level in Django administration site then or rather all fields wherever changes have been made will be reflected in Web_diabetes table in myweb database in mysql. Also the Django Rest Framework uses a router library to show users and groups implicitly present in Django administration. Also all diabetes data can be seen either in api or json form in Django Rest Framework webservice using that Api.

Backend is python, front end is html with the help of python decorator in Django, database is mysql. Backend + Front end + database = Full stack developer.

Steps of Django(assumption pip install django and virtual environment is ready within which above command is entered.)

1.First of all using Django-admin interface I. E django-admin startproject <project_name> we create a style of implementation in the form of directories, folders and files.

2.Second step is to use settings.py add ‘website’ (<project_name>) inside installed apps.

3. django startapp web(<app_name>)

4.create urls.py inside Web and do the necessary changes like urlpatterns = [‘/Diabetes’,…] this you can easily get on net.

5.In admin.py of website add diabetes as an interface url.

6.In urls.py of website use /admin to connect to Django administration. You can easily get it on net.

7.Most important of all try to get sql migrate working by including class Diabetes and different columns like glucose, outcome etc by connecting it to it.This is in models.py.

I think with this background one will be comfortable with Django. Rest all steps one can get from net.

Wow I have improved as a developer what with full stack on and good recall value. I thank my Guru Amma for all the energy and effervescence.

Om Amriteshwaryai Namah.

Pantina Chandrashekhar

Software developer at Amrita Technologies

Kollam, kerala.

--

--

Chandrashekhar Pantina
Nerd For Tech

I am passionate about python and love working on python related pet projects a lot.Now adays I have developed a passion for java also.