 Hello, my name is Abishek Shukla, and I have been working here cooking as a software engineer and I am going to explain you the Jango Framber or the Python. Here is the topic which I am going to cover. Introduction to Django, Django as a MVC. design pattern, Django architecture. Why Django for web development. jango modules step to create new project and what jango generates so here is the introduction part comes jango is pronounced jango the d is silent jango is a high level python web framework that encourage the rapid development and the clean pragmatic design rapid development means it's a actually application development where programmer don't need to waste time on the for the gathering the requirements only the prototype that already exists just do the you can say workshop also just get the requirement from the customers and start the development so very less time it can develop the quality level product so it's a you increase the rapid development and the pragmatic design pragmatic design means here the name suggests promote the workers and resolve the risk gathering the all the requirements and considered the work on the to the development team these are the terms come with the pragmatic design the web framework for perfectionist with the deadline and the primary focus jango's primary focus is to create the dynamic and database driven website and second one the content based website so these are the example these are the website washington post ebay craig list and google app engine they are currently using the jango framework so these are the examples and jango is a mvc design pattern actually it is not the mvc actually it is the mvt architecture mvt architecture is nothing but the model view template model actually model that describe the data structure and database schema so you don't need to create the SQL table only you need to just create the table through model dot pie file so if you want to means you can create the table and the schema in your model dot pie means control what a user sees means view is the total handling of the business logic so whatever the user request and response are all these things handles with the views dot pie and the third one is template template means how a user sees it means template is just doing the rendering part in your web page so template is handle the html pages so whatever you see on a website so templates just taken care of it and the last one is controllers so actually it's mvt and mvc you can say the controller is url parsing url parsing means url actually views is the collection of functions so url decides which function is going to call at the same time so all the controls that has been taken care of the url dot pie files so here you can see the architecture so request browser user sends the request to the from the browser so it goes the url config so url config means that selects which function user going to call or which type of request user sends so url decides which function we are going to call so it goes to the views view is the collection of functions where it has get and post both of the methods so according to the request views decide so views actually if it's a post call so it goes to the model model is nothing but your database schema so it means insert the some data or retrieve the data as per the user request and it also whatever the request it's also respond to the template so here is the Django architecture to response you can see through the html page html page is nothing but a template files so this is the Django architecture and why Django for web development actually divide the code module into logical group to make the flexible to make and we design better it is a flexible because all the things are means different here you can see view view is different here you can write your business logic url piles that controls over the which function you are going to call and here is the template file here is the model means your database so it's a flexible you can change as per the requirement second is a provide auto generate web admin to is the web website administration but actually it also provides the web admin where web admin administration where admin also taken care of the so many things which user is going to make super user AI staff so these are the things are provided by the Django and pre package equip by for the common user task so it's also has some so many packages and module you can say so it also provides so you can use that package and use in your program so provide you the template system define the html template for your web page to provide the code duplication actually code duplication means DROI principle do not repeat yourself this is a principle is introduced by the nd hunk do not repeat yourself means if you want to same thing again again again so in Django framework you just use the same thing on a different way and there are the one more concept is wet wet means WET so that concept was write everything twice or waste everyone's time so they are this is the difference between dry and wet so always use the dry concept because if you are using a wet concept you have to write so much code again and again using the same database so please use the dry principle we allow you to define what u r l should be for and given principle usually coupled principle means define URL coupled principle means is totally based on the URL so URL is the controller which controls all the function which is already exist in your views views file allow you to separate business logic from the html as I have already told business logic has been all the code has been written in your views.fi so is it separate from the html file html file only for the rendering the rendering the content so it is a totally separate from the business logic and everyone everything is in python schema and settings so all the things are in the python Django modules here are the some modules actually Django provides lots of module I am going to explain some modules here so first of all administration interface as I told the Django is providing the administrator interface where admin have the crude interface where admin has the crude means create retrieve update and delete so these are the permissions Django admin have so as per his permission he can add user delete user whatever he wants so Django this is the one module second module is the authentication system authentication system means actually there is a auth user table which is the one class so in that class authentication means every user you can make super user so all the means user name password and his email id all the things have been saved in use auth user table so it also provides the authentication system third one is the command system fourth one is the form handling form handling is the very important feature that provides the Django form is basically you do not need to write everything in your html file html file if you want to text box so you just need input type text or these are text box select box and multiple checks so in the form handling Django provides the form dot file and form direct from module where all the text file integer type you can define in your form dot pie file so where whether it also handles the your traffic on your web page because if you are when you are defining your form in your form dot pie and you said it is a required field and when you are some submit the button so it does not go to the server side it checks the on the client side this is why it is very important feature and again is session session is the much you have heard means session actually it stores the every website it stores the users data and users you can say everything on your server so when user gets login so it checks the all this authentication and authorization through the cookie and cookie does not contain the whole the information about the user only the session id until or unless you are not using the cookie based framework if you are using cookie based framework so cookie also has some information about the user but normally if you are using a simple session so only cooking through it generates a means retrieve and the getting the response through the session if session id is not the same it directly goes to log off and the other one is a syndication framework and RSS atom field RSS is the rich site summary rich site summary is nothing but a website that changes the rapidly on the same point of time means here the example is a any news news website you can say means yahoo dot yahoo news yahoo times of India where you can only the reference page and currently what is going on in India or in world you can see the home page you do not need to go to the particular page or particular thing to these are the things RSS is the module where if you want to rapidly change the content so you can use the RSS module and the other one is a caching caching is the just to prevent the traffic on a particular site catching is if you are user requesting the same thing again and again so the request doesn't go to the server all the time sometime it stores the thing in a in a caching caching means if you are requesting the same way so it does not go the request does not go to the server it pick the your according to the response it picks your response from the KJN it shows you so it is reduces the traffic on your server site so caching is also very important and internalization and localization internalization it is the framework which you can develop your application in a multiple language multiple language is that and means you have to write your code in Chinese or something you write your code in English but the sting whatever you are you are going to use in your template file so just means convert all the string into the particular language or Chinese Marathi and Bengali so it will render according to the according to the language selection so it is so this is the internalization and localization so here is a demo part this is the main main part and all the things I have explained it's basically just the basic thing of the Django but here is the main part to step create the new project so listen it very carefully because without you cannot create or new app or new project so these are the things you have to follow first create the project start an application create the database mysql define database settings in settings dot define your model add plug-a-gall write your template define your views create mapping test step deploy okay these are the steps so first here I am going to explain so first of all you have to install your Django I am explaining you on I am actually I am using Ubuntu so I am explaining your in Ubuntu so first of all pip install Django so when you install the Django then you you have to I mean you are going to create a start here is a start project is my project so you have to fire this command Django admin dot pi start project my project here is the my project my project name so you can use your project name so Django admin dot pi start project and project name okay then you can CD my project means go to the dead directory project directory and when you are going to create app you have to run this command python manage dot pi start of my app my app means your app name so here you can see the tree my project contains two one folder my project one folder my project there is you can see the settings dot pi and URL dot pi URL dot pi is the controller and here is the your app my app which created and my app there is a views dot pi so views dot pi that contains the function or your my app second is the model dot pi model dot pi is the schema and your database so you can create as many at ju one in a same project so here I am only created one project so this is the tree and here is the db dot sql light I am using db dot sql light so here my sql Mongo db any database you can create so when you create app so in a setting dot pi you have to mention your app name in setting dot pi file so there is a install installed app this is the tuple so in tuple you have to add my app in the last row as many of you you are using so you have to mention here and add your app so here my app I have I have added and this is the database and that database is that I am using sql light three so here my sql name engine username password so this is the database so all these things is in settings dot pi now here is the models dot pi model dot pi is the database schema so here class profile is nothing but a the table name is a profile so table contains these are columns so these columns in name which is care field maximum length is 45 row number in teaser field experience text field email here you can also specify the primary key and the foreign key as per your requirement so when you create the model dot pi so this these are the two commands python manage dot pi make migration or here is your app name my app so when you run these commands and second one is python manage dot pi migrate so when you run those commands so it will create the database on your app so if you are using my sql or sql light so it will create the database and create the table the third one actually I have a I have created database and I have some values database so I am going to explain you how you how you can retrieve the all the values from your database so here is a code on views why views dot pi here I am imported the profile profile is nothing but a model so profile is a table name so here is a depth index and profile is a profile dot object dot all so this is a object relational model so I am fetching all the values from the profile table and context is it is a nothing but a dictionary here is a key and value value player so key is my profile and profiles here all the values so that contains in dictionary this dictionary and return render to respond index dot HTML and context I am sending this dictionary to this HTML page or this HTML page is going to display all the values so here is a view dot pi now is the URL dot pi it controls the function which function I am going to call so here I have to mention this is the regex and here is the means your home page home page I am calling the index function so when I hit the home page so it will call the home function so home function it goes collect the all the information which I have saved in my database and send it to the index dot HTML file with this context dictionary so in setting dot pi I have to one more thing I have to mention here the template so template is the directory I have I have to mention the directory which directory I am going to use so I have to mention the directory path name so this is also important thing so so template I have mentioned the template or here is the index dot HTML in the index dot HTML page this is a table table and here for loop I am I have sent the dictionary and for loop I am fetching the values from that dictionary so here the profile is a variable and profiles is the dictionary so I am taking one by one values from the dictionary so here profile dot name profile dot experience because these are the column names so I am fetching it profile dot name experience email here or here is a follow so these are the syntax you have to remember when you are using Django so here is not the simple you have to close the follow by this these are the syntax you have to remember so after that you have to run python managed by run server this is a default server name if you want to change it so you can change it python managed by run server or here is your means port number and the IP address so this is the default name so if I run the command python managed by run server so here this is the home page and this was this was the default my IP address and port number so here I type IP address and port number this is the index page and these are the values which already saved in my database so here you you can see all the values which I have stored so you can see all the values on the index page so that's all about the Django and I hope you are doing well good luck for your future