Build a Django Project Part-1 | Dilip Krishna | Skillshare

Playback Speed


  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Build a Django Project Part-1

teacher avatar Dilip Krishna

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

78 Lessons (12h 35m)
    • 1. Introduction to Course

      6:13
    • 2. #222 Softwares

      2:25
    • 3. L 2 Install Python

      2:43
    • 4. L 3 Installing Virtual Environment

      3:07
    • 5. L 4 Install Django

      2:07
    • 6. L 5 Start a Project

      4:14
    • 7. #223 Fresh Virtual Environment

      3:48
    • 8. #224 Hello

      3:18
    • 9. #225 New Render HTML

      4:26
    • 10. #226 Django Templates

      9:00
    • 11. #227 Template context

      6:24
    • 12. #228 HTML Forms

      14:10
    • 13. #230 Django Forms

      14:44
    • 14. #231 Login

      17:40
    • 15. #233 User Register

      21:41
    • 16. #237 Serve Static Files

      17:39
    • 17. #238 Products Intro

      0:44
    • 18. #239 First App

      5:25
    • 19. #241 Understanding CRUD

      7:00
    • 20. #242 Product Model

      10:33
    • 21. #243 Django Admin

      5:48
    • 22. #244 ListView

      11:38
    • 23. #246 DetailView

      11:40
    • 24. #248 Image & File Field

      17:04
    • 25. #250 Understanding Lookups

      14:32
    • 26. #251 Custom Model Managers

      11:42
    • 27. #252 Featured & Custom QuerySets

      18:23
    • 28. #255 SlugField

      16:52
    • 29. #257 Product URLs

      7:58
    • 30. #258 Templates Intro

      2:09
    • 31. #259 Base Template

      8:22
    • 32. #260 Include Tags

      7:14
    • 33. #261 Pass Arguments with Include Tags

      4:03
    • 34. #262 Reusable ListView Snippets

      9:45
    • 35. #263 Reverse URLS

      11:45
    • 36. #264 Navbar

      13:11
    • 37. #265 Template Filters

      9:59
    • 38. #266 forloop Counter and Cycle

      6:24
    • 39. #268 Bootstrap Intro

      2:35
    • 40. #269 Container vs Container Fluid

      5:24
    • 41. #270 Rows and Columns

      6:52
    • 42. #271 Column Sizing

      8:05
    • 43. #272 Offsetting and Ordering

      9:25
    • 44. #273 Breakpoint

      16:54
    • 45. #278 Margin & Padding

      7:12
    • 46. #279 Navbar

      14:47
    • 47. #281 Prepare for Integration

      1:27
    • 48. #282 Integrate to Django

      10:06
    • 49. #287 Display Query to the User

      11:08
    • 50. #288 Creating Search Form

      7:45
    • 51. #289 Better Lookups with Q

      10:26
    • 52. #290 Tag Component

      7:26
    • 53. #291 Shell Commands for Foreign Keys

      5:05
    • 54. #292 Search by related Model

      5:12
    • 55. #293 Cart Component Intro

      1:13
    • 56. #294 Cart App

      4:24
    • 57. #295 Django Sessions

      12:46
    • 58. #296 Cart Model

      9:23
    • 59. #297 Create Cart in the View

      9:09
    • 60. #298 Cart Model Manager

      13:32
    • 61. #300 M2M Cart Total Price

      19:10
    • 62. #302 Cart Update View

      18:11
    • 63. #304 Add to Cart Form

      12:21
    • 64. #306 Display Cart Items

      11:28
    • 65. #307 Removing Cart Items

      9:41
    • 66. #308 Cart Icon & Fonts

      7:49
    • 67. #309 Checkout Intro

      1:06
    • 68. #310 Roadmap to Checkout Process

      7:36
    • 69. #311 Order Component

      13:29
    • 70. #312 Generating Order ID

      10:34
    • 71. #314 Calculate Order Total

      12:18
    • 72. #315 Checkout View

      11:41
    • 73. #316 Math with Decimals and Floats from Python

      9:07
    • 74. #317 Upgrading Auth

      18:58
    • 75. #319 Billing Profile

      16:31
    • 76. #321 Billing Profile in checkout view

      16:13
    • 77. #323 Guest Login View

      17:47
    • 78. #325 Associate Billing Profile to Order

      14:39
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

57

Students

--

Projects

About This Class

This course will teach you the basics of Django and you will also learn how to build a project from the beginning.

In this course, you will learn

  • Python
  • Django
  • Bootstrap

In this project, you will develop an eCommerce website that has all features.

This course is part-1 of the entire series and this includes:

  • Setting Up
  • Softwares
  • Hello World
  • Products Component
  • Templates
  • Bootstrap Framework
  • Search Component
  • Cart Component
  • Checkout Process

Meet Your Teacher

Hello, I'm Dilip. I am a Full Stack Developer. I am very enthusiastic about software development and want to share my knowledge and skills with people around the world.

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction to Course: Hey, guys, Welcome to a new course. This course about is about building at Xanga Project. So we're going to use the jangle framework to build a Web application that is going to expose us too much more advanced and, uh, intermediate concepts on how cool developer website More extensively. Don't worry. We're gonna go from the beginner stretch to that once of stage. So you don't have to worry about learning any new things about our any basic things about Django all off the stuff that is from beginner. Tread Branch is right inside this course. Okay, so what are we going to learn in this course? So let's dive into the introductory part of this course. So the first thing is, you're gonna understand the fundamentals of jangle. What are the fundamental concept that are involved in Sango that are very, very important for us to learn when we actually take on this course. The next is setting up a development environment. All right, so Xanga requires us to development in requires a syrup it environment. There is a dedicated to developing this application alone because if you want to develop or create something new you don't want to do it in an environment where everything else is working, right? You want to compartmentalize that part of the environment because if anything wrong, if anything goes wrong, you want you don't want it to affect other parts of your application. So this is very important. And next to designing that pages. So all those angle mostly focus on back in. We're also gonna learn about how to actually designer webpages because part of the developing webpages is to actually designed them. We don't want to show any kind of a big just so we don't want to develop applications that does that doesn't show websites were needy and elegant. You you want to make sure that our pages also display Ah, correct and proper design wardens were gondola. So next thing is, we're going to deal with the database because, ah, part off application development, particularly in Web application development, is very important concept of data bees. So we're gonna learn about it. So what database involved is my skin? So it don't worry about it. We're gonna go trick in this coast rights. So we're gonna learn about integrated Arabists to their project out of run commands have stored their know how to achieve their all the basic operations, all the fundamental stuff that is involved in setting up databases. Everything is detailed in this course, and next, his servant static puts this is staring plans is nothing but the which team It ceases images. So we're also going toe. So study finds in this course. So you're gonna learn about how to actually do that thing also. So don't worry about it. Next days, Bill Project from map module. So this is another concept. There is particularly related to jangle because Django develops APS by actually dividing them into applications. All right, you're gonna learn about this too. All right, So this is a major part of jungle development because jangle deals with project in terms of perhaps you need to divide specific parts off your project into individual applications and then collaborate all of them to make a final project. And next his bootstrap. This is a design framework mostly focused on CSS. We're going to learn very extensively about Bush that, like we have laid out a simple part off her course to dedicated to bootstrap so that we can learn how to develop the upsets that are gonna help us to design them and then integrate search features. Search is a very, very important element in any any, any basic to the advances that sites because search has just to find things very more easily than like a refering inside a book. All right, we can just talk about the key. What that we want. We can find out stuff that we that our insider database are the website. All right, so this is a major important thing. And next is Vega nine degrading due to alleged to complete the project. So I had, I'm sure. So this stage of what it will do is it will bring all the applications super of dollars, dropped the course and build them, integrate them and show the complete and final outcome. And next year's one of the prerequisites that are involved for learning discourse there. Not much prerequisite, but we need a few of them. What are they so basics off fight on? So you need to learn how to write, fight, encore syntax and semantics. What are the variables? How the data types the patent doesn't involve that is because it it ah identifies Darryl is by itself based on the value stood in the variables off that you need to learn what the four loops if conditions all of that and wants basics off HTML and CSS. So not extensively, just basics so that you can actually show some design on the website side threatening understanding how Web goods because we are developing a web application. So you need to know how the Web books or the Internet actually communicates how it actually makes the request. And since their response from the server to the client, all of the stuff all right, And the software start a used inside the scores a Django by dawn J query, bootstrap, html and CSS. All right, so with this, we're closing the introduction part. So this is a major, major, major courts, because you're gonna learn a lot off stuff in this, that you can actually go ahead and develop their need website that you want. All right. This course is an ultimate coast for jungle. While we have said part one because we're laying it out in two parts so that you don't have to deal with a lot of time inside this coast. All right, so with that in mind, let's get ahead, and we'll start learning or course 2. #222 Softwares: Hey, guys. So these are this off? First of you're going to use extensively to develop a project. The very 1st 1 is the language. We're going to use the pipe on language. This language is very easy to learn. Housing you piper language course, uh, inside this so that you'll be able to fight off languages bill and then jangle it is a bad thing. Were developed this in the language fighter. So xango is a main part off our project. And Jacob Jacob is nothing but a JavaScript library. It will help us toe right core easier. Then if you don't secretively have right along and more runs off court JavaScript. So jiggery eases the task. And bush that Bush trap is a design cream which will help us to create designs easier and and more authentically so that our design is is very good for user to attract and hitch de Valencia Street steam and she is are used for friends and languages. And Bush stop is integrated with these language this so that we can create a more designer intern project so that users I'm warning Christian use our project for bootstrapping design from book which is integrated with which, to my tears is great. More dynamic image driver type. So that's it. So these air, this office that we're going to use it is very important that you use it's office very this off. This have to be, uh, compatible. Yeah, because Zankel jesus washings microaggressions law at the time. So everyone in my possible the language Russians so by donors list in many Russians, Zang was released in many versions, These both might be compatible if you don't look offered. So you need to make sure that this border compatible. All right, So by the time of making discourse, the Russians might be different from your time, so make sure that you use the right questions, So let's get 3. L 2 Install Python: Okay, So in this video, we're going to download and install Python. So this is the time where we're going to install pipe down from bite on 3.6 point five. So when the time you're watching Discourse, the installation division of this off there might be abated. You're fine. And village four point. Oh, or anything less than that. But until the major vision, the number three here changes your okay to use with that. So we're here? Don't know. Don't fight on 3.6 point five. So go ahead. And don't worry. If you get down here, we will get the files that we need. So I'm working on windows, so I'll be using this x 86 64 executable installer. So I'm don't during this fight. So before be install it. We need to take off wanting. So if you have only installed python on your computer, I recommend you to uninstall and reinstall it, using the method that I'm going to do in this video. So before you do anything like that installation, so please uninstall your python on your computer and follow along with me. You see, the fight on file has already been dollar it. It's not a very big cry. So once it's downloader, open the file. So here it is. So now we need to do something that is really very important. We need to check this ad fight on 3.62 buck. This is very, very important. So after taking this instead, off install now click, customize, installation and see where the people's checked or not. We always want to check, because people is the very useful to install some other necessary things and autumns angle itself. So make sure the pastry and these other things useful for you or not for our purpose. We're checking Python is gender knock and next. So when you come to this, this part of the installation it installed for all users because we want every user on our computer to be able to use python and then hitting store. Okay, the second most successful, all right after the set of was successful, we should be able to use python from anywhere on our computer, So let's get to the next list 4. L 3 Installing Virtual Environment: Okay, so we have installed fighter. Now it's time to install a good tool in government. What is it? A virtual environment is a sort off a safe room inside a building so that if we blow it up and do something wrong, it doesn't hurt the rest off a computer. It allows to install different persons off things, making much easier than installing them on our main computer. So to do that, we need to open a commend lantern. So go ahead and open command line Doom we haven't here. So what we need to do is we need to install a virtual and rapper. So if the heat big freeze way, we have a list of the things that are already in style using. So if you observe here, the second line sees ritual and rapper so I have already installed it. So I don't need to install it again. But if you want to do it for the first time, all you can do is keep install ritual and rapper That's win for lead us. You see it since requirement, already satisfied because they are already insulted. So after installing it, what we need to do is What we need to do is we need to create a virtual environment. So how do you do that? The command is make ritual in, and now we need to give a name to that so that it creates a virtual environment based on deck names. What we're going to name it is xango Dash project. So you know, it's creating the little environment. Now, if you see here, the virtual environment is activated. How do we know Decide with based on the name here jangled as bad projects, Phil, Inside the parent, this is This is how you know you're inside over to environment. So if we want to get out of venture virtual environment, all within two is practical and deactivate and they're out of So how do we know one other between governments that we have? We can create a bunch off, not only one. So how do we know what other trillion run its present in our computer? So he work on and you get the list of them have already created feel off them. So I'm having multiple between run. It's So how do you activate a single ah one specific between run hit work on and given him , I'm going to give Bangladesh projects. So this is how you getting getting sided. So I'm going to get out of it again. Yeah. Yeah. So this is how you handle virtual environments. So that's it for this lecture. 5. L 4 Install Django: in this video, we're going to install its angle so true that open a browser and tied Sango like this and you're going toe. Get that that site he had xanga project dot com This is the mean them safer, Django. And you can always don't know the lyrics from your desperation from here. But I don't recommend doing that while this one side is great for the documentation poppers and to actually kind off look it from time to time, but installs angles. We're going to open the command line, Turner. Yeah, here is And we're going to in stones angle right from here, not from the website. So to do that, First of all, make sure that you're inside your virtual environment. Yeah, you're inside of a train, Roman. So to install it, I think installed Zandl. Make sure that these captain and he didn't you see, Now it's installing it, downloading this angle. You see, it is also collecting some fizi finds, which it always does. So after this installation will become better, we will have xango in our virtual in grand me so we can play around and complete any kind of project using xango inside our virtual environment. Yeah, the installation is completed. So three type now frieze, You can show all the Softwares that we have install inside this virtual environment. So when we did you see any chance and ask Zankel Bidzina scrapers. These are the versions off the southwest of here install and our listen storms off fears prison in our own virtual and ground. So for this lecture, we learn how installs angle. Thank you. 6. L 5 Start a Project: Okay, now let's start a project. So we're in a virtual environment, and now we're going do our directory. They were going to start a project. So to start our project, just simply type xango dash it Mean start project and then covered with your, uh, site name Bangladesh mean started. And I'm gonna call you my site. Just keeping it to. And now, if you see it will create a directory, and you go into the directly. And now you see two files being grated. Man is got by and my site. So manager pies they filed it, which is used to manage all the operations that we're going to perform. It'll project on my side is the actual degree where we have our project fights. So let's open our project. Using Adam, I'm using Adam. You're free to choose whatever the kind off environment that you want to say. I'm going to open a project, go to the place and open my dear creek. So any got by and many other bunch of files that have been created when we use the command start project. So setting start by. This is the way all database password authentication settings are prison. You're all start by and this is the file way. We're not going to use this at any level, but managed by that one. Victory is to manage. So these are the pages are find that we get after creating her project. So yeah, come here and before you writing it in command here, I'm going to tell you need to stay in the managed by directly so we execute this connect. So when you're in this place, the Derrick River managed our pies present. No type in what I'm going to do. Bite on. Managed by run Sever this we allowed to run a server like white Web server That jangle provides us. So if you run it, it's going toe run the server the starting developments over at that port and that place. So open whatever browser that you want. And after that, hit local host and give the port number 8000 and this will open Disrupt It is the default website which will be provided by Xango to make sure that our installation has successfully worked. So you test and shall work successfully. Congratulations. So head over here. And if you see here, there are 17 on applied migrations. This is, uh, another which is visible and at any beginning of the project. So we don't have to worry about this because migrations our database aspect ing So we're not going to do anything that is related database, but for the sake off understanding were going toe finish off. Does that show we're going to stop us? Ever? And this refreshment not allow? Really? It says the site can be reached. So what we're going to do know is bite on mani, start by migrate. So those of migrations on a played migration. So I'm performing migration. So it's going to perform everything. All are OK and everything is my greater. And now I believe the screen and one the server game. And if you don't know, there are known on applied migrations and no errors and no issues. So now again, refreshed of upside. And now you're good to go with this. So with this, we have created our project the next really over. You're going to learn how to create an app and what is in happens angle. So let's learn that. Thank you 7. #223 Fresh Virtual Environment: Okay, Right. So now let's quit a fresh virtual environment. Federal project. So I'm in the Dre. So what I'm going to do now is I'm going to agree. Oh, great. A new quick with name as e commerce. Yeah, I'm going to going to that Derek re. So what? I haven't done nothing. So what I'm going to do now, Days I'm going to create a virtually so engaged in. I'm going to give the same name as today so that I don't have to remember again and again. I know. What's it worth? What? The true environment. If you see this park, you have completely the process off creating, which may run. So So now let's see. What are the it this big threes command and see what of the library's say nothing. So get over it. And now, cradle, exude this comment. And I didn't see a bunch of thugs. Yeah, see, that's the difference. We have our finds. A lot of labour's installed upside off the botulinum. Here we have our own particular separate from our machine so that we convened a new tool libraries today for it. Any tune necessary finds and everything that is necessary. So we're maintaining its operating environment for our own process. So this is how this is going to work. So if you want to activate the virtual Inman and we're going to come here and work on and this that you're inside the veteran runt, all right, so let's go ahead and start by installing general. So what? I moved. It always is coming. And victory complete, installed. It's downloading. Yeah, it's downloaded. The only thing you know is installing it. It will do by itself. We don't have very much. It's kind of a traditional clients. Yeah, you starting. It is what movie takes a time. Every patient, a few more 17 it completed in gardening to mobilise we're installing dangle inside the which were moving so we don't solution despite outside of which were wrong it So if we know, it frees the last time we have seen and the list After installing this, if they seem you feel give the command could freeze if you a complete list off the, uh, instrument packages. Yeah, this successful instructor. No. Let's see what other packages inside? Yeah, the photos that I've been install a visible here now, all right. So this is over. They're going to start a pie. So in the next part were actually will get stopped. So let's get ahead. 8. #224 Hello: the main reason. Uh right. Even this command, you should've space. Bring the bush and we get the frequent delivering fight. If you observe here, we've got the version 3.0 point five. All right, Even though we did not mention Russian here, that is the reason because you come down here. 3.0 point five is the latest release, and it's got the most support until the April 2021 extend of extender support. So this is the one that has been supporting right now, and it gets It is the latest official version 3.0 point five. So this is the one that we need to install. Even though, if you want to mention it, you can. But if you feel do not want to mention it, we'll get the same vision is so let's go to the command. Are So what I'm gonna do now is, um I'm going to give a command single Rajhi e commerce? Yes. No. So, what is dark? What this does is it will clear depositor here. You should have creating, afforded excited and again. So yeah, the commerce. So what I know is quite on I on So if you give this command will recreate the developments over up and running so that we can access the website. So I do this. So what I'm gonna do, nobody's I'm gonna get command hated or it's going to do is going to give this developments of a friendly and this path which to dp on Sanders in this book. If you have something, Israel in this court cannot satisfy it. So, like 80 it will create a development server. And this right now I don't have anything on comes in. So what? I wondered how you you just come in and it's just go here. 80,000 on the local host and one Listen, Reginald, do about one bootsy. So if you see this part of the vaccination appear on your screen so that it says install were successful. So if you got here, you have agree successfully stole everything and use angle. Got it is up in So from here, begin going. Do whatever you want. Let's go ahead 9. #225 New Render HTML: are you guys? So I'm open our closet using Adam so you can use whatever edited that you like to use or I'm going to do now. Here is do creating. You're fired. Game as use. Not by Yeah. So what I'm going to do is I'm I try to change what we have seen. Uh, website So first of all, dangled our http. No short goods, then you So I'm going to give you Ah, function here. Speaks the request. More tickle. We're gonna fish responds. Oh, work right. Seeing this file. And how come to yours? Look by here, what with under new knees, I'll explain what, This year it's not. Find this later. So right now, your focus more on only one thing. She's changing, uh, design or changing working, assuming the stream of beach off over because so we're good excrement And seeing how Patrick works. So what I want to be here is And what no news import. So here, corporate, this spot. You sure it will not say that your friends will ever see homepage? You sure it is? So you see here closer running the game, your use. So now from God can use book. Who? Which saving? Yeah, I know. I'm using the inch. So what are these? Yeah, you see? Oh, shoot if you see successfully scene. So this is how we can change. What blessing? Here, you can use our heart so you can also see papers This team will be to see you. So opening jag ending unofficial. You can observe there is a changing culture. If you want to see 20 years, you're so this is how you can modify, change and use it. So this we're going to go for that and make some more adjustments and you go to learn some basic point And then after they were going to go forward and ran director html pages insurance which normal lines of strings. So now it's clear that we have the immediate over in the hitch demon, so that's go ahead 10. #226 Django Templates: Okay, guys know that we have seen how to render and hitched email cold to the website. Now we're going to see a different part of it. So now we're going to use Bootstrap, So get to the bootstrap Green website and get about started and play. Now here is the starter templates. This contents called a lot is he desired Cord is used for both. Stop here. We're getting the link for bootstrap and G. Query. This is from Papa GIs and London from the bush up disaster. So these are necessary. If you want to use bush rap and another than you can observe it is displayed. Emitted is the same thing that we're doing, but in a more comprehensive way. So lets you warned us so I'm were copied this thing. I copied it. I came here in short, off this. I'm going to right that your so what I'm going to do. You see html cord and now this. Yeah, I used triple questions because this is a multi multilane string. Yeah, that works. So issue of giving this court, I'm going to write which human in the School Court Seven. I think if this is running? Yes. So I'm going here. If you do, this is a change in the very high level is a present. So this is how it does. So I went to do something else. Uh, what a murder, you know, is insured off this super giving I'm going to do so. Do glass. You could do. I think there's on here. I'm going to close due back. All right. Seven days on the refresh this is Yeah. You see the Bush Trappist book full. This is how you can render Bootstrap pitched him and go here. But this is more, uh fixed. Me. This is not how we want toe you hit shame or cold with our website. So let's do one thing. So get to the city, sort by. And if you come down here, there is a partner. We can use templates. So there is a second for templates here. Excuse Which asked do Chris? This is the most important part for us for now. So let's call it a break on this and start off everything. That so they're us. Does betweens Derek race from the? The templates are being brought into the website. That's called the country Decker. So we need to give a pat two distinct. So how do we get back? If you see here, we can use this part on cropping. Distinct. Um, pressured here. So what it does is how nothing but based directly joins the base. Their current distance, where this collieries located, that is the business. So if you come here, you can see the e commerce. This is where the David our school ladies. So this is the best. So what I'm going to do now is, uh I will greet on your folder with templates. Yes, uh, giving you five. I'm really good. As which team will underscore beach hitched home page. Not extreme it? Yeah. Now crop it is. And I corps and Basit here. You see, now it makes more sense. All right, So what we can learn from here he is. The html page can be. So I'll try the buse. So you should have come here, So let's remove this. So what I'm going to do now is I'm going toe written that beach. The whole beach return in Sure of. It should be response. No. Very good. Use this jungle shot Birendra. So do it. Mender Here we're doing since the question. And now what we're going to send you are going to send the homepage almonds, scott page dot html. And then the context, We can learn it with this condition other things later. But right now, what we need to know here is there's rendering this page and returning it further questions . So this patient being rendered so save it, come to Hitch Demon. And if you refreshing great, there's some Yeah, we need to change this to templates. Templates? Yeah, and I'll Siri, come back here. This is Ryan. So I only need to do now is refresh it. Yeah. No, this is working. So let's change something in a general which now we can close this on here. We're going to write as this part. Hello. This is e commerce, and that's it for food. Stop. Save it. And now come here and refresh it. You see, this is working. So this is how we can really html page from their use to the local website. So what is happening here? Let's take a view. Let's take a view on how these things work. So here we're question for your so this year I makes every question you're asking this girl so many things. Do you want it? He comes here. You see, Sandy coolness you have The ureter part comes here. This is the one. All right, distorting. So it takes the home page as it's reflect whenever this kind of thing is appear so wide simply because local host call in 8000. This is the bass part. Every you are off. This one tip starts from here. Whatever. After this is present, who will take it is a reference. So after it doesn't there is nothing. It is simply so. It will take empty as its reference. So this is empty apart. It will take home page and come to the views and will make the home page view work. And when this is executed so what good Aries will return this part. It will render this whole page about HTML and goodwill, Oregon. This is what is happening here. So that's all for us now. If you did not understand a about a deposit crying, we find it and do this video again and check how it is working. So that's it for That's it for now. And let's get ahead with the next lecture 11. #227 Template context: Hey, guys. So now that we have learned how to learn under the hoods each day my home page Now we're coming to the state where we can learn how to use context. Context is nothing but something. The scent of a general page from this part. So this is a dictionary, but we can send some messages that are individual to each of the home page. So that a particular home page might, sir, our needs regarding to the message that we have sent. So let's do that. So, uh, let's just do coffee this black. So this is a boat bitch. This is contact Bridge. Yeah, all of the Missouri. See image? Demon Beach. But how can we show the difference? We're showing the difference in misconduct. We're going to send it. I do. As whom Bitch. Have you been to copy these basted in every function? So this is the about page his conduct, which have you ever descended here? Context in context. So now that we're sending each the home page with this context tight, it's so each off the context and title keys are saying But the message, it's the value whole page. I would be this different. So how can we show this message here? So now what we're doing here is Jesse. Um, in paragraph. We're going to you this way. They're going. Just give the key title here. So another thing that you need to take care of it is we are serving home page for this. All right, So what we need to do him this you about Oh, religion. Quote them here. Bage Beach. All right. And here. Yeah, but I was going to send some water. Could Yeah, we're sort everything. So when the home page is question, we're going to it to get dysfunction. We're going toe render the home page Just email with this context. And then ever my boat is our contact is a question. You come here. If they about is a question, we're going to render the same home page statement, but the different contact He had the same home patients dreamer with different context. So let's do that. So let's check whether ourselves running on rds is so come here. You see? This stays home, bitch. If you look at the source score now it says home page. This is the part where we have given the title part. So if I repressed about you use about breach. If you see here is that boat beach to see all of the court for these two are saying all right if you see, then Acker court for both of these pages are seen, But only this paragraph part is changed. That is because we have made it a dynamic way We're not setting it. Requesting it with context if I must. Contact is the same, but the contact page is different. So what happens here is the ascending each off their context in a different way. So we can either send message as well. I'm going to e commerce home page rush me first. Who's drunk? I would have called with C message, but I'm going to change the message here on one of the seas. Uh, learn about us. Um, be free to visit our contact. This is he not working. I'm going to do I do, Doug? Yeah. Here. 100 degrees. I'm going to give and I'm going to see message. Yeah, Sandy, if you want to come here fresh it, you free to visit a contractors is about Paige knows more about us and you fix albeit it says it comes home base must be first. So you just maybe we can modify our whole context with the different titles. The thing is, we can put more than one message here. So this is the way we can use context to dynamically powerful website HTML pages. This is where jangles very, very helpful. So let's get to the next lesson and learn more about them. 12. #228 HTML Forms: we're guys now that we have no never context variables and how to use them to dynamically displaced message on our website vacancy and understand the power of xango on how to pair up the websites. All right, so if you want to use this skins to the private saying and show your cool work with users you can put a stop here. But how could you? This is not the one thing that you wanted to regulate such, because there are a lot more things that you must be able to do. So unless you want to deploy it into a server bracketed, you lose us more than this to make them feel that they're working with some kind of software is troughs just displaying some information. You need to learn a lot Muslims than this. In fact, pretty much my dishes were consistent. All right, so context variable. It's very consistent with all of the Xanga website, so you need to use it. So that is the reason we have learned before. All right, so not what we're going to learn. Here is a statement forms and how comparative attempted instrument forms using example. All right, so I wanted to use this part. All right, On lead these two things. I will give it a new address. Conduct last speech. So I knew this and go back to the website and refreshing. It gives an error. Because although we have specified this contacts, a speech started here man, it says does not exist. The template does not exist. Why? Because we're uncredited. But it does give a simple hand. But checking the engines just the throws does not exist, gives a link. And we need to create this like the previous one. So what we need to do is come here inside the templates, greeting you for the name has contact. And inside this contact creating your find, the name is speech. No html. All right. I want a copy of this thing. Mvs it here. And now if you come here and Freshii, this is good to go. So now what we're going to do is we're actually going to build a hitch. Hemofarm here. So let's grant it so this will be off class danger. So right now, stay with me and you are going to do, and we're going to learn about it later in the course. But right now, just do it. I don't really get a good picture off how to write false. So right now I don't agree to do, Dad, uh, called Sendai six and colder struck and inside before on the phone. It's pretty much good to go. And all I need to do is you. More disdain inside the phone number to cure. Did you do today? The class on this group? These glasses are from Booster. All right, so here, the input type is text in this class, please warn Dash can cruel in the name Livy drooling. And we need to get a place with the way. And it could be name. All right, below this, we're going to give a button, which is the types of meat designs off press form, dash control. The name is barren and the labour off, it could be something. All right, so let's just see me and come down to the bedside and efficient ce looks pretty much good. Oh, already into this get a little gap and changed his color off the submit button. So let's just do that. Come here. Uh, I'm going to do it in your glass We didn't dash primary. It will give you a good color. And here I'm going to give it Be up to the degree Clear tradeoff. A small gap, your freshness upside and it looks cool. You're right. If you come here and this whole name and submitted, it's just forbidding why I just see a sort of verification feed. You see, the method of using here is post so posed. What it does is eat something the better through the website. So their confidence one is getting another issue. If you come down here to our commanding and I'll you see it shows get, get, get, get These are the ones that we have repression from the website to show us the phone whenever you give your first button What do you want? I would bring the history have been store apps store Broza So does it get me? I'm getting the data. So think from use a prospect. So whenever the user is feeling a farm and hitting the sub me, it is giving, the user is providing us with That pushed me a posting the dead through the service. So So the floor street most gives us some dinner. So this data has been 10 ticket, and it must move otherwise. Unless you are very confident that the user will do not submit any kind of malicious get because Because militias data is very, very harmful for overtime. So what we going to do here is we're actually going to make the SS? Yes, out of talking, available for our website. So Django provides us with discomfort. So if we miss a series of talking, it will not allow us toe make a question this coming here. Andi it continue. Let's go and secure. Closing? Yeah, I get the John and I submitted. It doesn't nothing. You see why? Because we have said this is a post request. Let's stop it and run it again. No question, it will get a get a question. But if we submit it, it was supposed all right. This is how it works. Like if you change this method to get all right. And now if you give John here, I'm sorry. I'm gonna run this again. He's a get request. Get happen, John. You see? You see some message here. So this is a CSR really talking and the full name. You see, the data that we have entered here is shown here. So the number of using a form it is really, really important which method were satisfying to use, whether it is get or post, because absurdity, if it is a log into question, All right. The user enters his name or email or user number rallies, and below is yours. He's going to give us the password. And if the password is appearing here in the you are, it is a very, very damaging thing for a little bit for the user authentication. So whenever the Ural is passwords, it is not good to go. So it is up to you to decide where you need to tended to post and get so if I changed, opposed, and a John just a commander on this game and if given name John when Chris This. Yeah, If you see, there is no message here. This house here sort of talking in the post method. All right, all right. We know where their eyes when they're making a get request, it is really really visible in the you are. But what is it that are realistically creating a postman So we are going through this matter. So the data is somewhere around here, so let's just do that. So if brilliant, they're inquest doored method equals wolf. What? I'm really spring metta Get the name is fruity. So Syria, you're she said Minute. Wait, I should know because no, I reviewed get but out here getting an attributes of our soul. A scoring chick here. Okay, There's not meant this is pushed. All right, now come here fishing and continue. Let's come here into you. You see it says John, The data that Vince admitted is appeared here. If you go ahead and give you something like leader, submit it either. Here is Peter So Ah, the important thing here is the post repressed will hide the definitely were for visibly. So let's add some things here. So the county beach has female in something else to say. So I'm going here the page and I'm adding some things here. You But this will be here. The name will be the past will be form Dash can cruel the police will be you may next exterior. The name will be, uh, next Syria. The class will be And what this water score outs. Girls place would be my message. Yeah, that's you. Yeah, I know. It looks fine. We'll get any doubt of the day here. Yeah, so let's get here and our justice. But we're going to print all the data that we're getting this year. Um, what others would be this? That's a It's a message. All right. See this thing? Come here. Proficient outside. I'm when you has, um, King. Hello, sir. Of Gina. Dark on. That would be high. This is first. And I would hate to suddenly began. And if you come here, you test the key, the real and the message. The only difference between other function disease. We can't find any errors here all night. If we see something like in Schruff name, we hit like teen at gmail dot com. And you said me there is no enter here, all right, Because we're not verifying whether it is a truly male or prove the name or whatever it is . We have not been defined. It simply say its name and user. It's email or name doesn't make any difference where so the next part where I Children leave with that problem for a nominal for now, let's just stop this part here. Let's get to the next one 13. #230 Django Forms: Okay, guys for an hour were created to form. This is completely ridden by using chemical. Okay, we have the form every time we can create this phone every time we need by writing each time a page. But we we have another veins angle Natural Danamon Philip creative form and put it into the HTML page. It doesn't in your writing hits to my core, so there is nothing but xango forms. So jangle forms allow us to create farms in an easier the an Ansel toe. Make sure that none of the Deva being entered into the elements of the farm are anything other than what we expect them to be. All right, so it's an email it must be naming. It's a character field must macaque ropy. So it checks for the are not, uh, chicks for the mistake data And make sure that the user and it's right better. So, insurance, using this kind off, uh, the we can actually create jungle forms. All right, now, let's come here. And pretty new. Fine. I'm really limitless forms by and here we are going to import xango board foams. Okay. You know what? We're able to these very good. A critic class for the farm's good contact. And inside the parents is we're going to get forms dot form and here we're actually going to give What are they Mr you need. So we're taking a name. What? Miss Meade here. We need the user underneath. So it is a character. So care field. And here in it it must me. And you mean being on the next years, actually, the message. So here it must be also caffeine. All right, this is enough for us to create a phone. All right, So what we need to do is we need to import this form into a view start, but So here's what I'm going through these prime dog forms Contact fall. Yeah. So we're using this form creative form, you know, contact. So here we can actually pass the instance of this conduct home into the context. So here, contact underscore form equal contact from and here, the actual undescended. So All right. Okay. We've got our contact form into the context message, and we're passionate to the contacts left. We started to extreme it. He right here. So what we need to do is get here. I'm going to greet the phone Similar to this right about here. Warren do created right here. Yeah, but this time, what I'm going to do is I'm gonna get into all of these things. I'm just going to see one day underscore. Yeah, that's so from here. Let's get to our website and refresh it. So just Yeah, what did you see? Um, seems like do is some stick? Yeah, my suit. Good. Here. Yeah. This is the Refresh it. Yeah, if you see you got a phone right about those phone created waged in court, but in honestly, this one doesn't really know anything like this one, So we need to make modifications. But dream thing is, we also got some labels for our HTML inputs. So let's do something that will help us. Toe could obtain this kind of feels. So what? I'm window sexually. He's Zankel free classes. So there are some building field glasses for our phones. If you see here, you can know what other field classes that are available have used. Careful here is bullion field on the try Stipe choice. Their date, the time. This will many types of various careful If you see here, we can actually modify our careful by using some distance. Just this different strategic destruction. If you see here the texting group near the building ridge it so he can use down to actually make some changes to what I want to know is actually get here. I am one of the form. Start by. I can hear his forms. Door text fiend inside It attributes equality here. What is the place that you need? Phone dash control. All right, so no, save it. Get your website and a fish. It What kind of reached being his forms? Former text book. Maybe it's gonna work. So the one thing that I forgot to reject Is it going? Go home. The next group inside this we have that. So I think this must work. Yeah, this is working so good here. Refreshing. You see, Actually, this one is as signs off the other thing. All right, so let's go ahead and go see nothing's for them too. All right, So do this in looking into other homes as well. Other includes, so sooner but a smarting gays. Yeah, You're actually using next area. All right. I think this must worker is fine. So I'm also going to give a police with you. Don't need a placeholder because we're actually giving your neighbor here. Since I'm home, she's has no 60. And so that's come here. Okay. This morning. Yeah, this work. So let's come here. And freshness, is he? Our home looks quite good as the other phone. So this is how we can create a form in a dynamically. Now, this one can be used in any place we want. Unlike the previous one that we have a damaged him in court. We can create the instance of a conduct fund by just importing it from the bonds of that pipe ill. And we can create instance off it, and we can put it in in part of the pace that we actually need to do. That's how good it is now that that's how good jangle phones are helpful for us. They're so are. Now we have this phone because let's just get rid off this form that we have written in html. So that's come here, baby started to Yemen. Mm. Before I do anything, I want a copy this and we sit here so that my farm has a button to submit, actually. Mm, yeah, committed on this part. So right now we have a firm that has these elements. All right, good to go. So So another thing that you need to do here right now is actually no. Come here. You see, we have the contact form we have graded. But unlike this part, we don't mention any questions posed because the contact US form can go the way. So let's just say the best. Not cool. Sh r None. All right. And I'm going to come and to start. All right, I'm going to see gris. It's a great start. Coolest met guard equals Who's sorry. I'm just going to say, might have done it if contact on the school funded ease on the school. Valid. All right, then we can bend corn on the phone, clean on the school data. All right, Let's just see here. I want us to see Yeah, just learning. So the first things and now I'm going to do does, uh, my mind and submitted on. Let's see what happens. Yeah, you have the name, email message, everything here. But another thing that we need to make sure is the data is prison, even after somebody in the phone. All right, we need to make sure that the data that we're getting here is curbed. And also, it gets a fresh and else hole. We need to make sure they detect any error in the data. Me too. Short message to the use user. So let's just come here. Go to the form stop. I hear what we're going to do is deaf. Clean underscore. He made here it will. You have the variable cells. So in the similar way we can actually create for each of the elements. So right now I'm here. That's finally frame it. So if all right here what the matter is e mail equal to self. Lord leans underscored. Detto no get here. Oh, demand. All right after that. If not Gmail e mail. So I know we're only writing called verifying whether the email that the user enter is D'Mello. No, we're only going to prove users that have a Jimmy whatever it is, we're gonna breeze forms, dog validation and see only do me is did through Sunday. If not, we wondered nd me. You see This is how the about and let's see what happens now. Andi, if if the data is similar like this, it will be supported. All right? Yeah. Suddenly, did you see Do these here? All right. Ever change something off it like yeah. And submitted. It is only Ji militant group. In this way, we can actually create messages that what are inform uses did actually see under a mistaken data. Let's go ahead. 14. #231 Login: Okay, guys, by now we have learned how to create a form and access to data. All right, we have seen how auto accident and create these forms that can check with any of the data is not correct. And we have also slowed how toe in the context. And also we send some rendering some html pages as well. While we have done some contact page forms, but we and we're actually doing unit in particular, But the data So we're not doing anything with data here just reading it. So let's do something that can help us to learn a lot about hope for handing data when the user submitted. So no. So let's just go ahead and create a log in page where we can actually use data submitted by the user. Alright, What I'm will do now is get here diff long in page crashed and what I'm going to do, you use and chef conduct. It would be this on here. It will be our slash log in dot html and I'll just something similar like this, but he sure flogging register on a school. Pidge, here is the register. All right. I think this works fine right now, so we haven't actually created the speeches. But now let's just see the in this way. We're going to serve our authentication. So logging is firing. Corinthians started blogging and register, please actually read the user for our website. So before we do anything, let's just create a long four come here. Class longing form and parent glass get so the user name that would be form star. Uh, password four star. All right, so this way we can actually get the information from user. And right now, if you're very actually going to serve this pages, so let's just go and create templates on the new for will be inside this. I'm going to create the file long indarti html. Yeah, we're not actually what occurred in their hedge Trim a page, but actually, we're going to copy this form part. Really? This part right? Let's just copy this and you go here and sit. All right, now, this looks fine. All right, but we stood off conduct form. We're actually going to put the longing for that. Let's come here. Here. What we're going to do is it's just really didn't put it clogging form here. A strong equal floggings for similar to the previous one request dot Post or not? Yeah. So if form not he's underscore rallied, then we're going to bring to the data. Dork tuned underscored there. Yeah, and but they actually wanted creamed. The user is authenticated or not? Yeah. Yeah. So let's just copy the same form, and basically, there were gonna be maybe change it. But right now, they're just going to use just all right. As you know, it looks fine. So what we need to do their ease. Um, So right now, what is left of any to create the You are in here, So come back beach and sooner to this, we could create another one walking beach. Yeah, this works fine. So let's just see whether Apple will not So run it. Yeah, it works. Fine. So let's just come here. Works that. Yeah, We got the farm here. Yeah, but actually yeah, way don't see our farm, actually, because here is in contact, but actually really into native format. So that's just right. Know what we can do here is, uh we need to create Sindhis phone to the conductivity analysis. Greedy context equipped room warm. I would say it's from Yeah, I think it works on We ever in descended. All right, so in the modern place is full of conduct from really to change it. Yeah, I know. It looks fine. Let's just come here. It is running, So refresh the page and now you can see this. All right. Ah, so if you Freshii all right, the forms sent me day. And if you see, we see is here falls here. So why does Where does this Air force? Because we're printing it. We are actually asking whether the user is authenticated or not. It says days. It is not indicated this way. We can actually do you mind. The user is not indicated are not all right. We have the form here. So you know what I really need to do here is we need to creating user so that we can see the logic. You see, before we do anything, we need to check this. We have something on a played my aggression. So we need to clear this thing. So card of the sever. Stop this over here and take a bite on many start by my great. Yeah, Everything is that all Migration started flight. All right, now you need to do this state by create super user. Yeah. So what I'm going to do now is I'm going to do a named it. I'm going to give e commerce email address and we believe password. Not much necessary right now. So I'm leaving it. Okay. It's request past women. Definitely. So I'm going to give something. Gets the passport? Uh, yeah. Okay. Does not, actually. I would buy. Yeah. This weapon use it is created. Now go ahead and run the server you don't see. Every city has no honor played migrations. So let's just go to the website on refreshing. You'll see there is a false message because things that is not as indicated. So what I'm going to do here is I'm going to give me confidence and the past world. I give this deceive and you submitted you get the data you get, did it? It just falls. And also the user data is coming coming here. But the North is noticeable. Thing is, we can see the passport here as Brisbane the text for But we wanted to be not if you see most of the websites. In fact, all of the website have the physically off hiding the password with black dots so that the user, you know, the password while intricate, but then another. You just get a sound in the system Might not actually catch it unless there fishing on the keyboard. So let's just do that. But that we need to learn some password field. You come here. I'm sorry. Growing big hits. You can actually see password input here. Yeah, this will hide whatever it is in tow. Password. So let's just go to the court and from Sir Pie here, we're going to give it as rigid Gualdo Farms. Password input, sir. Visting. Yeah, come here. And refreshing. I'm going to press the log in page. What is to say I'm in here, does e commas. If you see anything that I do now, it is in black dots. You see, this is how we can actually make it disappear. So Okay, guys are checking whether the user is not indicated or not. We need to actually perform some operations so that the user can actually log. So we will do this stuff right here. So let me do something. I'm going to bring this thing up here. Yeah, right after greeting the farmer stance on what I'm going to do here is, uh, context form looking for Yeah, I'm actually going to create any stand so that the user is actually actually submitted the day, right? What it will do is it will create an empty form again instead of having the better right there. So let's go ahead and check. It actually works of Mark. So if I do something here submitted dis actually not working because it has saved the data . So if I come here and so logging and if I do something like e commerce on some passport and submitted, it's gonna indeed the thing. So whether have this thing is in private, you can actually get here in your in pirate window, and you can access it. So what we're going to do now, here is we're actually going to make sure that we're performing an operation so that the user authentication is done so you can actually come here and seeing the using the Danglard indication you go to hotel love easier, and we have exact crosses so how we can actually perform in logging operation. We're not going to use this part. You can have all but they're using this because this is pretty much what we are doing here . So copies. So before that, we need to copy this thing. Come here and place it here. All right. So what we need to do here is we actually can copy this thing. Yeah, copy it on. Good. Into the long wooden. And they're actually Would you perform it here and And this part that should be here so that when it happens, these there is distributor. Who? Such a speech. So now let's get the use of new in the past. Where soon All What do you have here nurturing your That wasn't even password. So let's come here. All right, so this before authenticating it really to get the data. So what we have is a name equal of song dot underscore data dog get is a name. After that pass, rule the school bed at all. Get all password. All right. So we can use Theisinger and password here to authenticated. And after that, we can actually print that. The user is that indicated or not right to get. And now they crushed and user really sent to the logging so that we can actually log in the user after that. Okay, Toe, actually reconnect Instrumental showing the farm you can actually read Eric use. So we do. We want to reduce the user. So for now, let's really him to the logging bitch time from here. Blood? Yeah, I think this looks fine. And if there is an ever we want to see Okay, so we have finished the entire loving peach form, and I remember to remove braces after he's in the squad indicated, because that will give you an error. There's not a function that we call. This is a very below or an argument that we can call. All right, so let's test it out. So I'm giving what are what other these e commerce. After that, I'm going to give the password and hit, Submit it executed. So let's come here. It says no crew and it accepts the passports and everything. It is true. So the user is logged in. We can actually going to the Edmund actually see our user. Yeah, If you come here, you can see the user get into the users. If you see the commerce, this is the work. So you can actually create more Users from here are from the commandment of man and also create user database and store them here. All right, so that all the users were gaining access to the database not to change and make images, but actually creating accounts to create and comfort themselves in started in the Arab ace but us So the e commerce here is a super user. It's like the pigment for everything. So whenever you create will use any website, there is one maintaining the website on the back end. And that person is called a super user right now, the other people who are managing a website and a database. So we are the super user here, all right, busy by staff terrorists by super is a service by active status by staff in the sense the Berkus or the employees and organization that create or provided applications to actually function that related to the database and users based super user status. Which means the person who is the number one close to the database. All right, so no one is giving access to the databases unless super user is permitted to. So this is the kind of status it's super user has by active in this. In the people who are using the database, it can be user staffs. Opelousas, Anybody? All right. So, uh, the next video actually want to learn how to create a youth at Richmond's user registration , so let's get ahead. 15. #233 User Register: Hello, guys. So we're finished. How to make a long and use it. So right now, our music is lovely if you see, but really, to create a mechanical so that users can register as well. You see, Right now, all the content on the website, it all. Is there anything? He's visible for everyone. But sometimes you need to show only some things and fuel the information. That's probably to uses that are actually on your database. So blue there. Let's just examine what we're having now. So if you come here and she primary message and you does these things were loving use this . All right. You need to get your coma here. And, uh, this We could be invisible for users who are actually, uh, not loved it. So let's just it's that, But let's just give us with He was just going to see the whole village. The message. I'm just OK, so what? I wanted to know these. I'm gonna give Dag this through, called and here I'm going to give the message as private in the score under schooling message. You sure you can also see private message? All right. Who save it? Come here and finish it. You can actually see the message. This is real users loving. Okay, so let's just go in now. Going to use it, all right? And you can still see the message. This must be supposed to be your only by the logged in users. But we've been still seeing even the real longer. So let's just a baby. So come here. You could get into the views I actually went. Carpet is Okay. So what? I'm under news. If request not use it, you're gonna screw up indicator? No. If the user is authenticated, Didn't look, we're going to do you, uh, convicts with private message on right now. The user must be authenticated to see. But this has come here and fishing. The message is not It's a the private mission. But the message is not so if you come here so I love you. Thank you. I love these days. No, you and I got a little bit and we can see because they are not being able to view. So this is how we can actually money if you guys. But there is another way you can actually do it too. So if you come here. You can see what? Uh, well, private on the school message. And it you come here. Um, part of the loving page. Uh, let's just leveled and see what happens. Well, no, because used job dog, because the user is logged out and we can't actually put this message in the context, so there is no way we can see. And you can also make sure that use it. It's hard under 100 in this way on is, I think, gave the couple fantasies. Yeah. And now, then go ahead and refresh it. No, but loving you can see the message because he was really loved it. So this is Well, you can do it also. So what we do, what we need to do now is really to actually create and finish the use of the destruction. All right, so let's go ahead into that. Hello to the farms. About 55 So similar to this, we're actually going to create something, but you should have longing. We're going to say register. All right. Um, they're actually going to make sure that password is into two times. So that use, um, creates the person that he can actually understand. And very, very password. Christ, make sure he's driving the right, all right? And we also need to do have an email, man. Yeah, All right. And next thing years. We also need a password. Do All right, look at this. So but we're going to change the liver because we need to say different from a password to You're going to say control has worked on right Syrian. And now what we need to do is come here on or what you have created in. They're just a form I come down. I'm actually changes to related to the homepage about next year. What we're going to lose change this to we just took home and similar to hope. Teoh, go send the farm in context. We're going to do a scene here, and yeah, I think it works, but I think you need to do here is we need to actually reviewed html page. So come here. We just got hitched. I just have a copy. What's in the logging? Yeah, on the next thing is, you want to start by so restraints with Paige Compere. You sure? Long interviewed about seven. Justo, you should have destroyed his age. Yeah, along in school Beach. We're going to try to score beach. I think it looks fine now, so let's go ahead and district. Yeah, it comes here, so everything looks fine. All right. So not where we need to do is we need to make sure one of it is getting put into this. Feels looks fine. Let's go ahead and do that. All right? We have finished that. We can actually see the data, so let's go ahead and gruesome. Uh, I'm going to get as John John dinner, dark room, And the password will be something like No. 7 30 And I go here, you can see all the as Mrs Very good. It's not ivory, but you need to make sure that these two years have seen type together. So next go ahead with speech, forms it up high. And here is what we will do is you're actually going to great function. Has South Yeah. Data green. Yeah. Here. Past your equals, not screen. Understood. There. Get our password. All right. And passed through this. It seems like this exit. Yeah. Now we need to make sure that we after the great chicken. Yes. Password not in Quito Hasn't do. Then you can grease see passwords, much match. If not, look in return. The debt that we have got here. All right, so I think this looks. That's great. I'm going todo gather That is not matching so something. Admit it here. Why is Mark Let's go. Smart wants Oh, so let's come here using data you now. What's the problem here? Yes, we can, but I am cross Miss Saigon. We need to change this clean. Let's come here. I want to do something right, John John Adu Jima's brought calm. And here something on years it's his passage must match because these two about matches. But if I do something like sooner I hated it was, you know, a little, actually. So what's we're giving it? So this is how you can actually make sure that the pastor's matching and if it gets But we have already learned this part, but I make sure that you don't miss it. So let's get ahead. Alright, guys. So we have finished. How toe Take the passwords that would path within the confirm password us matching. And now we need to make sure that we create user object so that we can save them. So let's go ahead and look at the xango documentation. So if you come here and look at the Xander at the education system and we had our user object, you can see there is a way of creating users. Django tells us. All right. The most air ready create uses is to use the include a user created industries, their function. This is a helper function which is provided by the Xanga itself. All right, Right now, we're not actually going to use exactly this, but we're going to use dis command. All right, so let's go ahead and good. All right, I'm coming here. Go to the top. Off it and from the contract Art art. I'm going to write get user underscored model. All right. So I'm going to use this morning to create the user objects. When I come here in the register, I'm going to create a user object. Yeah, so I created the news about it. I'm gonna come down here, and whatever it is, I'm going to create the new user here. Yeah, he was their dog. Oh, objects dark. Create underscore user on like here. We're actually going to get details that are necessary for us. Yeah, simply like that. We're going to do it free male as well. Yeah, that looks that looks fine. So we're going to give the user name you made and the password. This looks firings. So let's just print out a new user and see what actually skating. Yeah, I think it looks fine. So check with us. I was running. Yeah, Let's go ahead and get to the richest apart. Yeah. Thing is feeling with the details already, I'm going to go here. Yeah, I'm going to give that John John Deere, jimin dot com Passively, *** learn hips of me. So if I come here, you see, the entire leaders with are shown here and the new users, John, So we can make sure that our user has been created, so let's just do it again. Ones who? So now the rating for the local host? Yeah, there is the matter. Unique constrain thing. Okay, so the user name must be unique for every user. So if it fears is going for a never So this is more often that we need to hand it because we need to check with the user, serves entering a user name that is unique, that has never been used before. So let's go ahead and do that. All right, let's go ahead and make the quite changes to make sure that it is there. The center doesn't. So let's go to the front door pie. And the very body thing is really for Xanterra. Corn cream. Dark off board yet using model. All right, So what I'm doing here is I'm going to create user object. Yeah. So when I come down here, who instead of just form here deaf, clean, underscore, user name said so here, I'm going to change the user name is equal to so door clean and the score data dog, get user name. Okay, so now we're going to do something that we have. No, we haven't done until now. It's the query set. So what is it? We're going to discuss about it in later classes right now. Just do or I'm going to do. And you would see a result happening. Sure, it is in everybody's name. What I'm saying all the top off it off. This works is the user objects of the filter by business using them. So whenever there is a usually matching inside the user objects, it will result. All right. So if result dark exists, okay, then we can graze means dog. The allegation around saying, Here's a name he's ticket. All right? If not gang written. Who's in there? All right, so let's just do something sooner for the email as well, Because we don't want them to use an email that that has been used 10 year. You want a unique email as well? All right, I think different. Fine. You just need to change this. No. Who do every meal as well. Hope? Yeah, I think it looks fine. So let's see our Yeah. How cell is running So fishing the given user and and must be Sepp to right here. I'm really creating new users. This scene I'm willing to give has burned Well, you ever created on the school giving us an emotionally set? What is that it that we're getting here using See, the elderly are finding Here is from you. Stop. I must be Oh so next right now. So I'm going to give the user name John and Amy Really jaw at the refugee. Murat. Calm the password could be anything, he says. The usually mistaken and they really is already used. Even if you try to do it for individually, like user name is separate and the email is not already taken. It will show this ever. So let's just try it out, All right, so I'm going to say John, But it will be John toe the red off Jimmy the passport. It says he was any mistaken if I tried to do joint, too. And John, we'll get anything with the password, I tell you, the email is already used now. The basic principle is we need to maintain consistent in the database so that users do not collide with each other. Okay, so by this little have learned how to grow the user and how to check whether the match with each other or not. So, in this way we can actually create an authentication system, and it's autumn eyes for the users are individuals who have unique account. All right, so by this we have learned a lot. So the main question you might have is where the hell is this. And what the hell is this? So these are pretty sets, and we're going to learn about them. Little lectures. So right now, this is what they have done, so that's good ahead. 16. #237 Serve Static Files: Okay. We have learned how to, uh, show a user registration and learn how to clearly user object and everything. So let's learn how to survive. Study finds. So study fronts as a little bit different from extremophiles like CSS JavaScript or any images, words, anything like that. So a very important thing to note series we cannot so static file seen as this template. So we need a different mechanism. All right, So, uh, jangle does not do the part for us. Really? Perry, that he is in a patty or Amazon Web services or anything like that. But we must make sure that jangle does not do this thing. It is very, very important. So you cannot use their go to serve. Your study feels like dispatched. So unity Keep that in mind. So let's go to sitting. Stop, I And if you get down to the end, you can see this study fights. It's all CSS javascript, any majors. So if you come down, here is the link. So copies get here, go to the spot and you will see here. This is a very commanding study. Five so general prizes with some information. So if you see here There's everything that is necessary for us. All right. So serving the fight So what? We will lose. We're going to copy this time on? Yes, it here. I want to move this. So what is going to say is exposed to space fighter Dichristopher? A study finds will be so my on the school I'm going to give this name as this. So I need to create a directory, This name in the best there. So where is our best there? All right, so this is our base there. So I really creating new folder. Yes. Yeah. You know, this is the Yeah, this is very degree. Yeah. I don't know anything on. No, what are you to do? Is I need to create my SD in part. So this is where um it's about my ecstatic, static Syrian, right? Exactly. Manish? Yeah, What a way to do Here is Stop. Yeah. So you're hysterical? Yeah, we're here right now. So why were these? I'm gonna get Southsea and yeah, not what I moved to Please. I'm going to copy these indicting into that saucy. - So here. I'm going to create static on this course. Cdn has he now? Yeah. Really? Doing with Stamford inside the associate as well. So if you see, I moved my own according to this part, all right. And a static Syrian is here. So what I need to do now here is create the root fire. Who static on the school route You can do, Uh, where is not had. So let's just copy the one that's about here. Yeah, studying in this school. CDO insure base near I want to share. Say path dog Good, right? I wanted to do is it's going to bring the name that is Derek right off this base. All right. I didn't You made clear here. Alright, guys, after you fi sitting of this thing is not a blender for deployment of the party use, as in the general documentation accepts is you see? Come. We come down here, but certainly decided fast is the last step. It says this is not suitable for protection. Lose The jangle condition itself states that so if I have to say it anymore, times have to say it is not suitable for the protection use. So But you still want Oh, see them standing Finds being served and the deployments. Or right now, we're going to do that. All right. What I'm gonna do is I'm gonna carpet on these two things on carpet. I'm not here. I'm going to the You're by. What I'm gonna do is on pace done here, and then a water murderer is I'm going to get this team, Carvey and and come down here. Three things don't debug. So sure are this. Yeah. No, it just fine. OK, second of all these things. So you might wonder, what is this sentence card? If you go to the settings 0.55 and get to the top of eight, you can see there is a debug available with True as its value through the security door ground with diva turned on in production. So when you actually put the project into production, you you have returned this into parts. All right, when this is false, your eurostar pie here convince for, so these won't be in the final straight off your project. So this is where we can limit our static set up inside the deployment, testing, deployment, go out getting into the production. So let's go and see another. So there's not running. So bite on grannies dark by TV. Saucy. And here we have. Yeah, and run, sir, He's running. So what I'm going to is local horse. So now this time, what we have wondered is we're going to do for the ed Me? You see your Edmund mayor exactly like mine. But the thing we're looking for here is what you see. It is looking for the static fights. No, there is the most important thing because you're doing my differ. From what? My knees. But if you actually get these things into your static city in it will be as normalize. It's a zit have done previously. It might have looked for them previously or might not. But all that medicine depleting right now. So what we do know is exit from the server and type this wall in command pipe on manager pie, collect static. And now yeah, study plans copy. So, no, let's go ahead and a pressure. You see, all the static files have been copied. So now the only thing that's doing is this So really the static lights you come down here and if you go to the static cdn, if you see. You see that, man? You see all of the things that are part of this product. Admit, admit. All right. All right. If you observe, you have signifies all on the static points about their it projects are inside the statics again. But we already something else. All right, So let's growing and deliver this part. Yeah, yeah, the part distributed. So what I'm going to do right now here is getting the studies that get to the bottom. Yeah, I'm going to do something here. I would give another part. Static underscore route. All right, because basically, they have something else necessary. What is it? It's the Medio. So all the media five instead of mystery, will you come here early? Media under school? Look, Yeah, I'm going to give media. You are for this as well. Media. You are? Yeah, that looks fine. So go to the yours, but pie and harvesting. Yeah, sure. Static. You're going to say you are starting on school group media. I think it looks fine. So that's kind. So now again, the collect static. Yeah, you're finished it. So if you come down here inside the status quo, Yes, you did So we need to also create a new folder Media on the square root. All right. We'll never be applauding in media fights, pictures or something, Girls, all of them goes in here. All right, all right. We're suitable. Static would. And the video routines of the static Syrian. There's more of, like a strategy server rather than the Syrian. So how in Apache you are a native you soon this months. This is similar to that. So to do that, let's go out and get distracted. My project. So here's the part where our project, Sarah friends are safe. So I'm going to do I'm going to create in your folder CSS and inside it will create, given your fight between me. God CSS So I would have something here. I'm gonna see if this thing see you have this year. But we don't have it here. So what I'm gonna do, you know is come down here. Thank you. From this commander game, it's easy to long, right? Yes. During you see, we have got to CSS and demean that CS is fine here. Is he Warrick? Will do is it will simply a 1,000,000 million features like Apache and Amazon. It'll be a service. What Do what those servers do. They eso the static files. The similar rate distinct. Emulates exactly how those service do. So if you're glad and get a new folder like I am G on, someone does. Yes. And I go ahead and get some unis like I want to get the nebula. Good in. Outrageous. So I was a big distinct. Yeah. Why did you save jazz? I'm going to go commerce. I saw. See, you started my budget images, and I'm seeing here. All right. I didn't say so. We go here, there is individual. All right, all right, we concede, but we don't have it here, so let's go back into our command and my static gonna study. Did you see here? We've got here in the similar. Really? You could relate the futures off his static server. All right, Although we have make sure that the static city and gets all of the started finds of a project in the evening and everything we need to make sure that it serves exactly how we needed. So why are you going to do here? Is let's go templates on Let's see how we conserve them. That's a road on the homepage. So if you come down, this is a template deck mood static. This is a conflict. Argues to load stat. All right, so what we're gonna do here? So coming back here, copy this thing and pissed you so similarly. Yeah. So what is the picture? Stati. And now did you see a slash made dot CSS? Yeah. Similarly. Let's get down to here. Oh, give image. Sassi is a quantum static. You may just slash rating. So his name is a little bit strange for us or why I want to do I mean, we're going to do this, just slash nebula G. Okay. Before we do anything that's been college static to make sure everything was all night Yes . Come down here. Yeah, maybe a g p g. Sure. Come here. And now around the world. Yeah. Go to the homepage. Yeah, I say something that next season gray color and we have seen our homepage here. Our image. So this is how it helps us all right? Connection. So if you inspect this thing you see, it's a static class in its a slash muna Cheers static slash immediate slash nebula. Deputy, if you come down here, go to the euros. Stop No bullet. The setting stuff high. Come here and change. Do it was seen and come back here and refreshing and the source of the static slash b c. There is a reason why it is very body. So this is very, very crucial in the development staff strategies. So this is very important in development park. So development distinct because it depends on what the EU essence are and how we have served. This is going to be really different from the production stat strategy because important changes the whole out of the game. All right, but right now for the development testing, it's good. So that's what are long and do this thing. 17. #238 Products Intro: American guys by now you have a very large example. So the ending, what we have learned in now and get to this next step. So now we're going to start building our projects First company, which is products company. Basically, we're going to display a number of items on the webpage, either list or individual fashion. But underlying thing is you even learn how to store data in a database and retrieve and display them on the page while you're calling. This has a competent off our project, zam, because it is not so. We've been looking to the specifics off hope actually create an app so without anybody, let's get stop. 18. #239 First App: So now we have to learn one thing. The xango. These with replications in the form off APS. All right, basically, what it means is Django device. The bigger application of a publication, Dwight's of a replication In the smaller parts collapse. When it adds up all the smaller parts called ABS, it constructs all off them into a bigger application. So if you see a shopping website or are videoconferencing website or in a social network, eat off. The individual task in innovative application can be divided into an individual, can be divided into in ah, separates Ignat, a separate company, that the term that we have used in this spot so each of them can be divided into separate competence. But in the case of Xanga, we call them acts, so all of them can be clubbed together to form a bigger application. So XanGo follows the same path, same process. So what we can do here is right now we're going to create our old app for our products. So let's go ahead and do that. So I'm coming here. I'm in Madeira free. So let me take a command. So my command these by Tom managed by stock death and right now available to create a product that so we need to name it that that is very suitable and convenient to access it. So one major thing that we need to take care office if you come to the setting, start by and come down here installed abs. All right, these are them after install by Xanga itself. If you see there are month Blatter, if you are clean up the admin his used based in previously test while we actually have a longing All right. And we have used dark in many situations. Like if you come to the view struck by while performing any user operations, like performing a Greeley user or anything like that, we have taken it from the contract Gortat all right. And the sessions and messages started because this always learning coming lectures. But right now we need to take care of. One thing is that we cannot name app with any of these. We cannot name at the A name that has been used by Xanga already. All right, so we need to name it carefully so that it doesn't collide with Disney. So I'm going to sing green emitters products and he tender Yeah, the command is executed. If you come here, you can see the parts app created. You see, use a bunch of files here. It means out by absolute by model, start by test that by view, start by it is a migrations. All right, Whenever we hit a command, Spider Man is that by start up and happening, it creates a set off finds into a folder called Products because we have landed as products . So we're going to use these files, create an app. All right. And another thing that we need toe. Another thing that we need to really keep in mind is that the way the actual structure of rap is very, very important. You don't want to go chunkin, uh, duty so that it's hard to maintain. It's an individual thing, and we don't want to chuck it big so that it's hard to manage. Ah, whole big thing. All right, What I mean by that is right now we're actually creating a parts company. So you don't want to create a products competence on every each category, All right? Or else if you want to create each each and individual category, you might as well commit into a category that is very well complex in maintaining. All right, So you raise I wanna meet then a categorical app if it is complex and managing like I don't want to include the products and the product and the building in the same thing because that can be tiresome from managing. So it should off clubbing them. I'm deriding it there. All right. The products competent is different, and the building company is different. When you come to the products confident you can, you cannot chunk it down into furthermore, because you cannot manage each and individual category like our home appliances, electrical stuff, uh, sports stuff. You can't manage each an individual thing that's even more tiresome. So they are fixing it parked in this way. If you want to Chungking done, you can. If you want to take it big, you can. That's up to you to decide. How do you want to do it? Just make sure that it can be comfortable when you do it. All right, so we thought any delay Let's get to the next part 19. #241 Understanding CRUD: Hello, guys. So now they're going to learn an important concept, so let's get it. So is the concept off Kurt crud. All right, so the basic definition of these current victory up deep and delete All right, these are the four operations that define crap. So what? So these are basically requests made from Groza to the so All right. What is it, Chris? Ah, create request is post and Rick, you is get request. So retreat in this sense, not an individual, it can be an individual item, or it can be a list. All right, are you can be a search MIT Baiyun user, all right? And I did so update is similar. Like our host can be a patches with. All right, Andi leave is basically a village or parish. All right, So post is when we're actually giving that are to the server or dead of its get is when we actually pull up there. And so it to the user oblique object request is like posting pat. It's, like, mortifying and information in the devotees and deal it is actually removing part permanently. All right, so these are the operation straight mainly involved and actually about sober. You can request with browse, which means I use it. All right, we see, let's go ahead and check it, Uh, in real life, So I'm coming here. I'm actually going toe start my server for several reasons. So I'm good night. Yeah. Yeah. So I'm going to the Edmund site. Yeah. So you need to give gather to this here. All right. I may have forgot, uh, password. So what I'm gonna do is I'm with creating this super user. Yes. Super user. Ik almas. Come one The password. Yeah. Yeah. You come here and go to use the spark you can see different off different parts. Like this is the one when we have created in previous videos where we actually could really use the registration. All right, if you come down here, you can see there's many number off. Get requests. All right, So if you see it, this post request it mean long. The Post request is actually when we have given the blogging better, Like the news element passport. So when they kick the longing, but, um, you took the information and made a post request which one sent out that occurred at that server and tallit with information in its database. And when it got tally, it sends the it makes it get a quests. So these get requests will allow is to see this information. All right, eso all of this information is handled and viewed to us because often get request. So if I come here and say equal pickle in the center, right? Hey there. To users. For us, this is a list. Although the request is get all right if you see here, we made a get request which says ico as a such king. All right, we got the result as it get. So this is a list. All right, so So come here. And Fiacconi even then it isn't Get to question you see here. So if a glad and do some data to it like John? Uh, no, no, Carpenter. I'm going to need the I was going to save. If you come down here, it says post the use that please data has been changed. All right, so making a change, like updating some information, is also a post request. Sometimes sometimes it can be put some kinds, sometimes India patch. All right, So if you come here and you can add user, so add user is actually giving an information so it can also be a creative question Friends opposed. Come here and pick on equal someone come down here We have Dele docks, which means we can actually perform a deal it operation, which is a delicate question. So in this way, so you can actually make credit question so that the data miss, including the Web server, can actually communicate with the user. So that's all for this lecture. So let's get to the next one. 20. #242 Product Model: Okay, guys. So now that we're, uh, said about products app So now what we have to do is we need toe, uh, create some markets. So moderns are nothing but similar. Toe comes that we have done in previous suggests. So if you come down to forms, you see the log in from contact form in the recession. From these are the fields of us off form for a hitch team perform these fields act as a reference. All right, whatever we make whatever we build here, like the car feel email food. Careful. These things tend to be the same exact fields that we see on the Hitch Limmer form said in a similar way, if you come down the model struck by the things that we created, the elements and the type of fields that we create here exactly what our databases are medical. All right. Simply put, this is where you create your data basis. All right, so let's get ahead and start me. That's so here. What we're going to raise we're going to continue Arabists with products, so I'm gonna give class product and similar, like forms reform. I'm willing. Mortal start, Marty. All right. The name convention has to be really important because we need to give card products because although you can give it products, but it's make sure that it's the name. Convention is good because whenever we create an item into product database, it's a language item off a specific category. So it's important toe given name that is suitable and is actually matches that with the operations. So what I'm going to do here is give a feel a title for our item, and it will be more to start car field. All right, And the next will be a description for water. Right? And we're putting it description. You could do moral start next food. All right, so let me put some cabs here. So a careful is like has a set off ranges like you can put a lot of texting. There's a limited, but in the text, really, you can put in a large a large amount of text that there is a rising. There is a reason why description. It's texturally in our case, so I'm going to space for the man. Excellent. For here is equal. Do how many good as 30. All right, for text, but we don't have to give anything. It's so know that they're great changes for a product moderns. So save this model start pie and the video thing. Every time you create an app to Louise, we need to link the AB with the project. All right, We have created a rap, but although there plater wraps, we need to link them to project so that they must be included in the final face. All right, go to the settings up. I come round here, Miss Solis. You see, these are all the abs created with xango, and they're included. If you don't do any off them, it won't be part of her project. All right, Come down, Hashtagged. Our own score, abs. So why don't we will be here is products called see? Product is around, so we have specified it. Although we have created products as our app. If we don't pass by it spits fight here. It won't be a part of our project. All right? One way it is more comfortable and convenient because you might have you might have a more number of abs in your project, but no, you're not every off one of them is in the final face. You you want to push the ab that are on the final face to the project? But you don't want everyone on police so you can exclude the ones that are not really from here. All right, so save the setting, start by file. And after you make sure that all all the field So for your model that are necessary for you have bean specified here. You need to come down here. Close this over. You see, this is an important step. Every single time you create a change in your models. Not Fifi. You need to perform this operation bite on men manage dot managed by make migrations and now bite on managed that by my great this steps, these two commands must be perform each and every time you make a change in your model, start pipe. Right. So this is very important. So after you have made changes, the next step is now we need to add prices to the modern. All right, So what are we going to do? Is Price Morin's not This is I feel all right. So this is the actually feel that is necessary for prices because prices are always dismiss drives. So another thing that we need to make sure is adjusting should have some attributes. So let's go. Uh, here mortal fear reference. And if you check for dismal field right, it says if it resumes this small number, he has to quit arguments Whenever it's just required you, we need to specified them. Absolutely. Alright. What are those two Maximus College. It's so the maximum number of digits on our in the number. So the number of digits that that can take the whole value off the price is what Maximus qualities. This will underscore places. So the number off, dismal place sister store with the number. All right, So let's go ahead and specify Max underscore. Digit on decimal underscored places. So I'm here decimal underscore places. Let's get to And Max underscored digits equal. Do let's give 90. All right, so save or more still apply. Come here and may operate make. So whenever we change or make any teen in the moral start, by really to perform these operations make migrations. You see, there is some question here. You're trying to have a non bailable field price the product doubted Defour. We can do that. The database needs something to populate existing rose on right. So it says the price cannot be added to the database unless there is some default value for the price item, because the database cannot be populated if it doesn't have a different price. If the price well is not provided, it must have some lethal value to be inserted into it violates. The database needs something to popular existing rules. We don't have any rules, created it. But why does it see that? Let's examined it. So if you come down here, Xanga does not communicate with the database straight away. All right, Jangled does not do that. What it does is it comes really sparked my gracious and it checks for these things. The initial rpai Missy. This is the initial migration that we have performed while we have created title and description at the fields for jangle comes here and takes what other fields that are being placed previously. It's his title in description, so it doesn't see price in here, so it makes an exemption that the previous rose, although they might not have been created, it doesn't have any price value. So it makes an exemption and say stores that something is necessarily populated existing rose. All right, so what do we need to do? We can Ada created default one off default now. So it says if if there are any existing roasts, it will give, uh, some value with no value to the existing rules. And we're gonna later on more to fight or the second option is quick and let me out of defaulting mortar struck by you. See, you can choose either of the operations, but right now, I think option trees better We can because we have the freedom to make a change, whatever we need to do. So what I'm coming to here is I'm going to give default value as $19. 99. So Daddy's my default value. All right, so come down here, sell adoption too, and now make migrations. Okay. I did not say save this. Come here. Make my aggressions. You see? Now there is no now I need to make migrant. Yeah, if you now see here, the final itself says product on the score price. Now the price has been added. Do the product market. So this is how it works, All right, So although we have learned much in this section, let's go ahead and lend some more to make sure that we have a good understanding about it. 21. #243 Django Admin: Alright, guys, we have learned how to create a model and make it migrate to the databases. So we have learned a lot of good stuff in the previous lecture. So it clearly good foundation to understand how Xanga beans with databases on another thing that we need to understand here is let's get a modern and use our model back to save some items, but is not going to be the kind of it is some like you, the super user. And you wanted to modify something. So are accused work on the database in a realistic way. So what? Remember to Louise go to the admin Got high and in 40 of modern I'm God. Mourners. What? Yeah, And come down here and add site. No, your district on here and say this for saving that. Come down here, buy it on. Managed by on server. Yeah. So get that here and go to the admits. You see the part of beach part Horace previously differently groups and uses, but now we have a product. There's zero partners. Go ahead and add. We're actually creating, creating something. Which was it? See, Creative Credit Operations Coast are I'm going to give it as I'm fasted. All right, Spoon, that, uh, that is a challenge are also quotes my challenging, But I'm just putting it on suit. Yeah, you could project object want. So let's go in and out of one. And if you see if I every time the 91 9 this is the big hole part you can either raising of lower or remaining. Think it's up to you. But the default is 19.9. So what? I'm really good here is I'm going. Ah, head. All right. By this. My hat. I don't know what I'm saying, but I just want I'm with you this 59.4 foot and sit saving. You see, already saying part object someone to stuff like, All right, We can actually do a lot of things here. We have created the actually posted. Chris, Julia, is the post request a post requests on light. Uh, you can also delete something if you select an object. Yeah, you can go ahead and did. Yes, I'm sure. Deleted. You see your bill left. So this is where you can do it. But I did not perform the surgery right now. but this is the way we can actually do stuff. All right? Okay. Although we have a family of your operations, that is, it most likely will be done. We need to change the way the objects are being presented here. So let's do that part. Getting to the model start high here, right? What I would do this is doubling its not a single underscore like this. I'm going to school. Austria. Bradesco's so Rita. Heidi, See Augustine come down here. Get out of the server. No matter. It says number of water, it says you need to make sure that every time you change the model start by you need to do my my nick migrations, make migrations and fight on. Managed by my great It says no changes directly. But until you get good with this, you need toe Follow this prevention measures, or right now, go ahead and run this over. All right? I'll syriza and groaning if you come here and refreshing. It's his best of all. All right, that is cool, because now we have organized the items in our database. All right, so so right now are admin. Cyclops. Pretty good. So the next step that we have to do is we need to make sure that all the items in our database I perfectly organized for that. It looks good for the users, not on the admin side. So this is the administration, but more of a technical side so we can work it out even if it is not organized in a particular way. But you need to make sure that the users are more comfortable to use our website, so let's get to that part and result of issues. 22. #244 ListView: Alright, guys. So with previous picture, we have already discussed about how to prison the objects off products to use it. So let's go ahead and do that. I'm going to the view. Start by inside me products, not the view stuck by on the project site. This is products used that by slash products. So here we're doing something. So what I'm about to do is I'm going toe import a special class from xango dot views about generic import list view. Yeah, I'm going to create two types of yours. What is that function? Best through Another is the class, Mr. You can approach it in either. But I'm going to show your boat so that you can feel comfortable whenever you're doing all right. So let's go ahead and do that. I'm going to say product list view on inside the least. You, dear, really said it's equal. Do I need in court? Yeah, from God Martyrs board product trotted dog objects. Not here. We not feel community. All in this, we have been every object that's inside the product moral and putting it in the criticism. All right, so this is the big class view has been. This is a really good simply approach. All right, Now, let's go ahead and do the function based. Brought a list view. All right, so here, what we about to do is, uh, we rika rancor here with the request. I'm sorry. Yeah, And here we're going to say some hard. It's Nash, part of list Dr Stephen Mo and here do the context. All right, so, contest, will you concede that we have thes as its value? Yeah, let's go ahead, use and register context. And it could be list preset. I think now it's good to go. All right, so this is the way we actually do. All right. So let's go ahead and create what is parts as product started? HTML Because if you observe here, the classroom is much rather more are simple than function mystery All the function based. Your approach gives us more, more freedom. Toe do a lot of things when classmates you is a simpler approach. You could do it either way. It depends on your choice because you if you have some tasks that used to be then simply and yet discreetly, you can go In the past Missed performance if you want to perform away rather close, that is very unique to you. Are you want to do a lot of things inside a single part of the view, Then you can go into our function based. So this is where these boots, uh, different. All right. And about the list for you. These are a part of the generic lose. These are provided by the jangle. So let's go ahead and see some of them jangle Zanetti views you. Come here. You see, there are a lot off genetic views for Yeah, there is a detailed view. It is a mystery. Likewise did a lot of them. Yeah, I think you can go here. You cooperate this way, we can actually use them. Do you actually simplify how whole were actually doing some task? Simply using classless Cruz. So this is how it's going to work. All right, So if you observe here, there is a list view, all right? It takes the context through dysfunction, get context data. You see, we're going to use something similar like this to send contacts data, for our view. All right, so, however, to here And what are we going to do here is first this for the template. All right, I'm going to give us a template of the school. Anamika do, uh, product stash. Uh, Lee started to emerge. I'm going to change this to study stimulus. Well, so you can either create the same thing in the project templates, or you can actually go into the project and actually create a new templates for Low Entirely created you for her with name product. And inside it, you can create a new fight as list The art HTML. All right. So what are we going to do here? Is there going to be the can't context death get context? Did, uh, it will take a cell and then ard's and then keywords. Yeah. So So right. What? Remember toe do here, and I'll explain it later. So you do something like super Oh, calma, so dot Now get context. Start coma key works. All right, So this entire thing, you being context variable and what we're going through the years returned the context. All right, so let's do something. So let's go ahead about the written light and let's bring what is the convicts? All right, so this is what's gonna happen? All right. Dysfunction moved in the context of the template from the product list. You can call the super function, and you could drink because and it will read in the context. So this is the way it's going toe every class. Miss View has a function like this. So it's important to know That's why we have reading it here. All right, so let's go and check whether someone is running. Yeah, So let's go ahead and let's shoot for wait. We haven't yet created your instruct pie. So surrounding us a pie. So here what we're going to use from charter's dark use import trotted, please. You Broad Street. All right, so I'm going to copy this. So this one will be products. This will be parts dash, function based view. So here, we're going to put a part of this few dark as on the score view, all right? And here it will be product history, all right. After the doing this, save it and get back here. And so you are nuts. Yeah, it's empty because our hedge trimmer pay did not do anything. But there is our here is our credit. It says PageNet or nothing, but it is. There's a basketball because we have got it. All right, The query cities we have had despite up. All right, so let's go ahead and check for products. Dash B V. All right, so get here and object on the school list on, like, self this thing. Come here and refresh it. You see the queries, that product, that basketball. So this is home views Can be used in the class. Missed or function Mysteries. All right. Pregnancy, No British result here. So let's go and presented in the form of list. OK, so I'm going to be here. So here. What? I'm the school and all right, so here I want to get through this thing, saying it Come here on a refreshing consider basketball. So let's go ahead and add some details. Story. So number Edmund inside the products add something like, Sure right, Justin, to see I come here fresh it, you conceive basketball and shoes. These designer basketball, brother, individual items. All right, So this where you can actually sure items in a list format that drawn from the database. All right, so the next lecture you can learn something more 23. #246 DetailView: Okay, guys. So we have seen list new under law. So we have seen a list of objects being presented in the form of list or multiple objects. So now it's time to is nothing but looking into the data often. Indeed. You later. If you see these are basketball and shoes to individual items. If you want to see the details off, you need to go into the particular items letter. So that is what we're going to do now. All right, so come down here. So what I'm gonna do is I'm being put now. Depay view all right? So similar to this. And copy it and tested here instead. Off list is going to be Do you get all right. So you sharpness. True. Did have you so a seam here. I'm with great detail Outage Yemen. Um and this will be de de detail as well on. Right? So these are the things that we're about to do here. Okay, So a very important thing to note here is we're actually going toe, get the data individually. So we needed may really a cross procedure that specified a particular item. So what are we going to do is go to the euro step by, so I'm going to create you out. It's now for the detail. You He isn't here. So during a water so water would raise, I'm going to space fairway to recognize each individual item. Severe generators, regular expression. Here, a question mark be and pick it because nothing but primary key off the data that's inside the data. Bees on right slash in dollars. All right, copy the same thing here as well. All right? Yeah, I think how it looks clear. Initial of Ragnar. Least You okay? We need to get it here. Do you? Can you You are detailed route. Yeah, I think you swine. So let's go. Two parts. Yeah, I think if you look spear, gather the details that are required for viewing the product Deed is all right. Uh, I think this is not what we need right now, and we're gonna leave it right there. But here, actually, what we're doing here is we're actually getting the PKK, which is the primary cape. But this we're going down in the front, each individual object. So that is what we're getting here, Petey. No. And we can actually get Pickett either here or actually, like start. Ours are stars. Key works. Yeah, so in the eggs are in the key works. It can be prison. So let's just print it down here so that we can see what are their Yeah, he works, que All right. And here we're going to do something else. Get PK equal to pick it. Okay, So the grace that will be here Okay, the context. So let's go ahead and create the template. So you find d dare that? It's damn it. So what I'm gonna do here is late. So, Mr For Object List, I'm going to say object itself. Got only single object. Is there object are idle. Be a bag on dar description. Yeah, and no object d'art. Price. I think the school said this thing. Come here and let's just go and check what happens if your questions if I asked for for a slash one. Is this page not form? All right. So if I asked what beach to its is if you ask for something like three. No. Four, not phone and let's shake for f b v slash one, not found slash two not far. So there's a reason we're not getting anything here. That is we're actually not getting what we call the daring to here. So let's go and do that, partner. All right? Oh, for the euro step, I Yeah, And abused by. So every time you can request, if you see here Yeah, I think you need to reshape here. Sure. Yours. Here. We can actually said this. Say it. Come back here. Go ahead. Do that. It is. It's not for so one. It's not fun. One. No, there's no in thing that it's hard. So there's something mistake that you have done here, so they need to check that. So get that you. So I head out to the view. Stuffed pie. Okay, guys, small chance that we need to do is insure offspring pad important distance from Cingular conflict. Yours, import your So this is the missing. Could have me so and then. What if it is too late in shirt off? Uh, more thing. Entire thing. What you can do is modify with your audience and put this cap symbol in front of products. This is the way regular expression can work already. After doing this come down to views, dark pie. And what we're going to do here is your sort of comment in this out. Oh, now, let's check for something that's chart a detail. You? Yeah. And then, uh, we're gonna bring the constant within the construct of detail. Alleged family. That's it. That looks good and hear what we're about to be is, so this works fine. But we need a way to actually access. So key walks off. I think it. All right, So now let's come here and check for products and one, Yeah, it's working your ceiling digital data and do no. There is no match for the Critic three. There is a shoes. It is a shoe cycle. That is because if you remember, in the previous, such as we created an item and we have all the deleted an item. So that takes us item number two. All right, although we have deliberate than item number doesn't change. So the next time, I'm sure Stick three. All right, so there is a birth and four, he's not far. All right, so let's check for F b v slash one. It says we're taking it and do no does not exist. You see, if you look for product, it shows a different kind of error rather than does not existed giving this kind of quick. So I think we can change. So come down here. And what we're going to do here is we're going to import something, get object, or for four. So this is the only able to use. So come down here, insure off saying query said, Get all of these If you see if you want to see the data inside these things come down here and go here. You see, the article is nothing but the key works. Convinced data. That person has a primary key on. Right? So that's enough for us. So we would read them. You don't leave. You don't need to print them. But something I need to do here is instance because each of the item is an instance of the parts tomorrow get object or 44 and I want to send the Morton. And then what? I'm going through this PK equal key wogs off peak it and then incense. You know, it looks fine. So let's come here. No parachute, Make sure someone is right Yeah, yeah, if you see interviewing, the whole are interesting patient farm. And if we go, three chills died. So this is how we can actually see the details off each individual instance, the product market. So this is cause these are the concept off detail view and very visiting that we need to check your is. They gotta start by reading for the euro and actually modified these two things on. Right, you statute, let's go ahead. 24. #248 Image & File Field: Hello, guys. So I think now is a good time to actually introduce five hills and image fees. So if you come here and Zang go five feet, you're ridiculous. Five feet there. So five minutes unlimited feels nothing but how we can actually store gather in terms of facts. So image is also a fight, All right? Yeah. Here is the five senses we can have actually store files. So let's go ahead and use this Fifield to actually save some data entry. So let's go here and what I'm going to be, right when we go to the mortal stop, I and I'm going to say image this to quote Mourners. Fine. Seemed Yeah, floored Do products slash. So what it will do is it will say the files that I am going to actually upload to this place. All right, so we're changed our modest by So get out of the summer and do make migrations make migrations. Are you saying default? Let's go ahead and see. Come on. No equal to go on a blank called true. True. So what does this mean? Is we can actually save the record or the item, even if it doesn't have any image. All right, off to see him do it. Come here and not make migrations. You did. And now my great. Yeah, And now we can go ahead and runs over. No, the settlers. A rapping running. So you should have products. Let's go to the ad. Me? Yeah. I go to the product smarter and inside the products. Martin, we're gonna have this bad going to need your item. You can see the images. This but you see it there. Light in color, actually. So why is this? Because we have kept blank quick accrue. If blank is equally false, it's going to be duck. So let's change something here. So go ahead and look for sure images. Why is this taking this much? I mean, yes, I think this is gonna take forever. Yeah, everything. You explain some image actually. Come down here. Let's si unit dress I received in the downloads on Maybe there's shoes. Yeah, close. Distinct. Come here. Choose by. Go to the don't lords, and actually for the shoes save. Continue editing after you, Siri, you can actually see you Sure. Here. Yeah, we're saved. So let's come down here on their ease off actual five here. So if you come down here in the static Syrian, they have the media inside. The products were for her husband. Creator on entirely is the shoes fire. Why did that happen? Because off setting start by. We have specified this park. Okay, so this is the reason why it has happened. Okay. All right. So let's do something to actually What if I hope we can actually upload? They made five. So I'm coming out here, and I'm going to write a new death up floor image, Pat. And I'm going to give that instance. Come on. Finally. All right. So here, what I'm going to do is let me import something here and for Come on, Who is this? I think it would work. So I wanted a new fighting name. Could do random girl, right? And? And it can range from Yeah. And now something like me. Well, extension as well. Here, let me do that. In a way, they can actually modify it, Streamline the process, get finally and extension. And here it will be filed. Pat. Okay. First full of the base name west or bad dog base. Mean fine. That que name comma extension. He could always thought at the next business. So here, I'm going to return the name coma extension. And here I can actually get those things easy. Re The income extension is going to get fired. Me Extension off five. So here actually find him will be appearing first. So I'm going to actually, formerly spite on format functions. You finally extension dot format Here it was a new file. You find extension because the extension now we can actually working and you products smash you filing and then fine final name format. And here you'll find an equal five And then finally five equal to find and find. I think this would work nicely. Ah, yeah, I think I would. Looks fine. See on Come down to here. So let's just run the image Seeing me again. Shoes being fresh May issues choose. Define again. Open it. And Syria Now open the shoes. You see, it says something else. Just pulling some needles and bringing something else into this. All right. This way we can actually modify the final and actually bring something. I think it did not work quite as well. We wanted to do. Okay? We didn't know Senate here, uh, image. But now it's complete. I got that. Here. Choose by said seen file again. Shoes, anything. Yeah. If you see here, the final is completely changed. So this is more rubbish because you can't actually be tricked into fighting, saving the files into sing pats team names. See, this way we can actually save the fires in a bitterly All right. Okay, I think Well done a good job here. But there is some problem here that might not be visible, but we need to be technical about it. We're uploading images if somebody tries to upload anything other than image. So So let's just jump into our foreigner And let's just try to upload this managed by and seeing continue Titi and it would actually store it as dark purified. But it's not an image, so we need to relegate it so that we are actually applauding only images here. So let's come here. You sort of find feeling imagery and se