From the course: Building a Personal Portfolio with Django
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Postgres setup for Django
From the course: Building a Personal Portfolio with Django
Postgres setup for Django
- [Instructor] Let's have a little discussion about databases. The great thing about Django is it's made to work with lots of different databases. In fact, you may have noticed, if we go ahead and open up our portfolio project there's this mysterious little file here called 'db.sqlite3' and that in fact, Django comes with a database ready to rock and roll. That's this 'sqlite3' and if we go ahead and move over to Admin here, you can actually see if we go to our settings which is in the portfolio folder and we scroll down here. Let's go down to our 'DATABASES'. You can see there's a little bit of code here to say, "We want to have a database set up with the following name." It should be 'sqlite3', all this stuff. That's the default in every Django project but there's lots of different databases that Django can work with. One of the most popular ones is 'PostgreSQL' so that's the one that I want to teach you because it's the most relevant. And so, what we're going to do is go through…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Creating the models in Django5m 9s
-
(Locked)
Postgres setup for Django5m 27s
-
(Locked)
Connecting your Django project to Postgres4m 52s
-
(Locked)
Make Django migrations and migrate3m 56s
-
(Locked)
Setting up an admin panel in Django4m 20s
-
(Locked)
Creating model objects via the admin panel in Django3m 48s
-
(Locked)
Pulling objects from the database in Django5m 52s
-
-
-
-