Django Mongodb integration | Integrating MongoDB with Django

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so yeah hi guys and welcome back to the channel and my name is abhijeet ah in this particular video we are going to start um series on um django tv and if you don't know like what's a mongodb let me explain you in a very like a specific manner mongodb is a kind of a database and it's a kind of a nosql database already we have we know like we have some databases called mysql is my sql postgres sqlite and all these kind of database are you can say uh sql database and what's the difference between sql and nosql in sql database it follows rdbms means that you can see all the tables and you can uh the data which they stored in a kind of a table view and nosql stores the data in a kind of a json format uh like if you are familiar with django that's framework maybe you have you know like what's a json and what json looks like it it has a like key value pair and it has you can append all the objects and add is to in it so it's very quite popular database in terms of development and a lot of big companies uses mongodb to scale the application or to back their application it's kind of a very famous database in no sql world and no one is like way behind to nosql mongodb is quite famous and you need to know uh mongodb and let's start the video and before starting a video if you haven't subscribed the channel please do subscribe the channel because i have already a lot of chango content and if you want to become a complete python developer you don't need to go any other channel you can subscribe this channel so let's start and again we have one more very interesting thing so if you want to become a full stack developer in just 6 months and with a minimum guaranteed placement of 5 lakh lpa newton school is just for you and what's newton school newton school is an e-learning platform where you can learn a lot of technologies mutually back in technologies and what they provide is they don't charge you any amount until you get place and the minimum placement they offer is 5 lakh lpa and you can see a lot of big companies hire newton school students like google flipkart zomato xiaomi razer pen all these companies are top order based companies in india and they pay very well and the minimum guaranteed placement they have written like five lpa to 40 lp 5 lp is the minimum placement and you can go above beyond five lpa to 40 lp and uh they give complete back-end development training front-end development training you can say it's a complete full stack course and uh the time span is like something around six months and you get a job above ifl pay then you have to pay fees okay and if you want to become a full stack developer and the minimum ctc with the minimum secrecy you can do check the newton school course and the link is in the description section and let's just start the video so what i have done till now is we have created some kind of a mongodb cluster on the mongodb like website you can go to cloud cloud.mongodb.com and create your cluster it's kind of very easy just ask for a free tier you can check all those things and you need to create one user so that you can access all data which is present from that particular user and also we are going to use mongodb at compass to like see what we have created in the database and what are the tables which we have in the database to see it's a kind of overview okay so to download mongodb compass you can click on mongodb com compass and it will download a zip file anna and after that you can run that particular file okay so it's quite easy you can download all this stuff so let's move to the main part after that you need to add the url which you get over here like you can go in the connect section and you can set up what uh environment you want to choose and we are going to use mongodb compass and after that it will uh give you a kind of a url where you can you you can just copy it and just paste it over here and if you connect you can click on connect new connection and let's just you need to enter the username and password so yeah let's this is it for the video installation kind of thing and let's go to the part and also i have settle setted up uh basic jungle application it's it's totally a basic application you have done not done anything yet so let's install the library which will connect mongodb and our django application so yeah now we are going to install a library called jungo which will help to connect like mongodb to your mongodb cluster to your django application so we can do like pep install jungle and i have already done so install okay and also you need to install one more library called dns python pep install dns python okay so once you install all these you need to update go into your settings dot py and update something so like let's remove this kind of code we are not going to connect with the mysql no sorry sqlite so we need to paste this one okay so this is a setting and uh our engine is gonna be we are going to use drongo and our database name is django we can create database name from here if you want it's like database we have admin drawing or local if you want to create some other database you can create and add your database name over here okay so after that you can you're gonna like add your client date information like this is the host information on the username and the password okay so yeah before running python manager py make migrate or migration we need to install one more library that's called uh pi and the version should be same 3.12.3 and let's install this we have already installed and now we are going to then python manager.pvp make migrate my python python manage dot p by migrate okay now when we run this it's gonna take some time because it's gonna connect to mongodb at less and it's you can see like it's performing all the migrations okay so now you can see we have our tables ready and when you go to django okay so you need to reconnect and uh now let's go to databases django and you can see all the like tables which jango automatically creates when you hit python manage dot py make my create a sorry pattern manager.py migrate for the very first time uh you can see all the tables are being created and let's create a admin user so that we can check our connection is established python manage dot py create super user okay python should be by create super user and we can add admin email we can blank one two three one two and three so the super user is created and let's go to auth user table so you can see uh like our user is successfully created the username is admin and the password is encrypted and last login and all the information that is pretty much clear it's working so this is it for the video in the next video we are going to perform all the cred operations and we're going to create the models and we're going to migrate and we are going to see all the you can say uh third operation which we can perform on mongodb engine and that's gonna learn you're gonna like learn a lot of things so this is it for the video i hope you people have enjoyed and if you have any doubt you can comment in the comment section and please hit the like and me to the next video goodbye thank you
Info
Channel: Coding for All
Views: 19,385
Rating: undefined out of 5
Keywords: django unchained trailer, django mongodb, mongodb django, python mongodb, django mongodb project, how to connect mongodb with django, django mongodb tutorial, django and mongodb, django mongodb setup, django rest framework mongodb tutorial, django mongodb connection, connect django to mongodb, how to use mongodb in django, django and mongodb tutorial, django + mongodb, django mongodb setup using djongo, djongo mongodb, djanog monogo setup tutorial, Django MongoDB Integration
Id: RrjSFVW_t18
Channel Id: undefined
Length: 9min 1sec (541 seconds)
Published: Mon Apr 18 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.