Python Django | Build and Deploy Full Featured Web Application Using Python 3 and Django 2 | Samir Phuyal | Skillshare

Playback Speed


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

Python Django | Build and Deploy Full Featured Web Application Using Python 3 and Django 2

teacher avatar Samir Phuyal, Python Developer

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

51 Lessons (3h 42m)
    • 1. Course Intro

      3:29
    • 2. Demo of Contacts Manager

      3:24
    • 3. Getting the resources

      1:31
    • 4. Setting up the Development Environment

      6:13
    • 5. Learning Python for Django

      1:52
    • 6. Python Package Manager PIP

      1:19
    • 7. Virtual Environment

      7:22
    • 8. Starting our django project

      6:22
    • 9. Making Django App

      3:20
    • 10. Understanding MVT

      2:18
    • 11. Including Templates and Static files

      2:50
    • 12. Displyaing web pages in django

      7:03
    • 13. Template Inheritance

      7:19
    • 14. Working with Django Models and Media Files

      8:08
    • 15. Accessing Admin Site

      5:04
    • 16. Customizing the Admin

      6:52
    • 17. Sending data from template to view

      2:01
    • 18. Jinja 2 syntax

      3:07
    • 19. Passing all contacts to template

      1:33
    • 20. Displaying contact objects in Template

      6:27
    • 21. Improving our models and template

      3:15
    • 22. Partials

      3:19
    • 23. Getting an individual Contact object

      4:23
    • 24. Displaying individual object

      6:27
    • 25. ListView for homepage

      3:18
    • 26. DetailView contact page

      2:16
    • 27. Adding url and view for search page

      1:49
    • 28. Passing data from template to view

      5:17
    • 29. Showing search results in template

      3:22
    • 30. Doing Complex query lookup

      2:59
    • 31. Intro to forms and Tweaking template

      9:13
    • 32. CreateView

      6:14
    • 33. Crispy Forms

      3:14
    • 34. UpdateView

      5:35
    • 35. DeleteView

      2:58
    • 36. Login

      3:00
    • 37. Logout

      4:16
    • 38. Sign Up

      3:39
    • 39. Mixin and Decorator

      3:28
    • 40. ForeignKey

      8:14
    • 41. Filter Contacts of logged in user

      3:29
    • 42. Fixing vulnebarilities

      6:27
    • 43. Creating message partial

      2:32
    • 44. Passing messages

      4:22
    • 45. Styling Admin Panel

      6:12
    • 46. Import export

      3:52
    • 47. Setting error pages

      3:28
    • 48. Pushing our code to github

      3:23
    • 49. Deploying our project to pythonanywhere

      5:30
    • 50. Managing WSGI and Static files

      7:04
    • 51. Managing Media Files

      1:37
  • --
  • 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.

608

Students

--

Projects

About This Class

Welcome to Python Django | Build and Deploy Full Featured Web Application Using Python 3 and Django 2! In this class you will lean to use Django to create Contact manager web application and deploy it into online easily! After completion of this course, you will have solid idea and confidence to build any web application you can imagine!

In this course, you will learn the following things:

  • Set up development environment to work with django

  • Work with Django Models

  • Work with Django Templates

  • Work with Django Views

  • Set up Static and Media files

  • Work with Django Admin

  • Customize and style Django Admin

  • Passing data from views to template and vice-versa

  • Function Based Views

  • Class Based Views

  • Implement Create, Read, Update and Delete functionality easily from the frontend

  • Implement Sign up and Log in functionality

  • Work with Django Messages

  • Use external Django Libraries

  • Deploy your Django project

  • And a lot more interesting topics

Any questions ?, feel free to send me a message here on SkillShare and connect with me on social media.

What you will get from this course?

  1. 50+ Quality videos

  2. Python slide reference to get you started with Django

  3. Notes to work with Django and to get along with the course

Meet Your Teacher

Teacher Profile Image

Samir Phuyal

Python Developer

Teacher

Hi, I am Samir!

I am a full-stack web developer with a specialization in python for the backend. I have been using python for web development, web scraping, automation scripts and more for more than 3 years and now I have built up a strong python programming foundation and I am currently teaching python technologies in online platforms. 

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. Course Intro: welcome to the jungle to for beginner scores. Would you learned to walk with general confidently building and deploying off fully featured Contact manager Web application Hi, my name is to meet and I'm a freelance developer. I work with the signal. It's like a stammel CSS JavaScript, Bootstrap equity. Beauteous, fightin and off course. Stengel singles the Fightin Best open source Weprin Mark, which is the creation off complex database. Stephen Website and I have been working with Django for more than two years and used it in almost every back in project throughout that time. Lots of Xanga topics and I want to see it was normalised with you through this course, which is perfectly tailored for beginners. But you gradually learn more advanced about equal input in Sango topics. In this course, at the end of the course, we'll have enough good knowledge to be anywhere relegation you want. This course is structured for beginners and slowly move up to more advanced topics presented in easy way. Also using slides to expanding, put in concepts and yes, all the topics that will cover in this course post a plaque setting up the development environment. Working with Django mortals abused in temblors, sitting aesthetic and media files. Working with Django Airman Customizing in is telling admin site. Fox Invest Abused Last Best views Implementing great functionality from the front end and Jenga messages. Authentication. The PLO main in a lot more interesting Xanga topics, and here is what you'll also get when enrolling to this course. So you'll get 50 plus quality videos to help you learn Zenga, and you'll also get a pretty if north to get along with the scores. Plus, you'll get interactive fight and slides, which covers every fight in topics you need to know to work with Django. So if we are beginning to tango and new to fight, and then you can just in a fighting to get into tango with development, if no will to fight and then you can official fighter knowledge using these bite size but effective Buyten's life, you learn about right and data types, condition, ALS loops, functions and object oriented coming from here, and you'll also get a 30 day money back guarantee. Plus, you can expect to get support within 24 hours, and the ideally student for the course is anyone who wants to get into Django. Web development and photos want to learning pertain concept about them, going easily in a short time and get along with the course. All you need are computer with Internet connection in the desire to learn. You don't even need to have invited programming experience. As you get Interactive's life on Titan. Feel free to look a course description and we look forward to seeing inside, so let us get a glimpse of this course. 2. Demo of Contacts Manager: Now let's see the Web application that we're going to be along this course. So we'll be building a contact manager Web application where you can save your contacts or people you know and will be deploying this website to patent anywhere. And it is deployed on Xanga Gore Start fight on anywhere dot com, and whenever you try to assist this web obligation using this link it last year to log in and you can log in using this form. But if you don't have a musically did, you can go to the Santa blink here and keep the new usually conference this place. So let me complicate. A new is a contra mere, and when you see the sign up, it will actually create a new user account, and you can log in with that account so the logging and it will take us to the home pays, and it will. So the list of contacts that do you have in a profile in courage, lewd and I've been is really saying you don't have any contacts yet, but if they had contact Wharton, it would lead us to contact race and form, and you can create a new contact from here. So let me quickly create one new contact. And if you didn't sell it in the media is for this contact. It will use the default in the image. So, for example, I'm creating ah male contact here. So when they get the great what a luxury. So the male profile icon birthday. The female ups near you do so the female logo. So far, this case let me select mill into the create button here. When it is created, you can see we're getting a message saying your contact has been successfully created and you can close this messes. And we can go to the individual contact that we have on our home page, for example, that let's go to John Brown and you can operate its value from update button and it'll take us to the update for more. You can actually update the data belonging to this contact and again into so the message. Your contact has been successfully up the date when we have updated that contact and you can also delete that contact from here. So in that village, Wataniya don't Augusta deal place. And when I click this student, Barton here to lecture, delete that contact from our database. And now let me complicate one's off different contacts and for the sake amusing damage data to create this contact, as you can see, have career the ones of contacts from this account and is all our domain data that I created. What this lecture powerful and one of the most interesting feature of this contact application is that if you click on any of the phone numbers here on your mobile device intellectually, open up your own application in type that number automatically so you can conduct with that people directly from here. And you don't do the same for emailing. Also, for example, let's click on this email and it'll actually open your default email. Client it up on the device, and you can send message to that person directly from me, too. So that's critical and will be making it together in this course in the future under So is that you can actually so store your contacts. For example, let me start singer any feed inter. You'll get the result that Maciste, the storm singer in this case, still of sweet. So that's all for the front end and in the back in when you beat our Edmund panel can see our defaults angry admin panel is styled with a new color, and we have also since it's heading, and when you go to your models begins, you have customized a lot of things. For example, we have a did this importer expert option, which had just to back up in Easter. All this contact object in Rebel stated a filter obscene ear last week, but it asserts filled here, and we have also customize this object stable year. We also have this presentation here, and we can implement crowd funks 90 from the back in tune. So that's what we're going to build together in this course, and it'll be super fun to build this application, and I hope to see you inside and build this application together. 3. Getting the resources: welcome everyone. And remember, we're going to create a contact man is a Web application along with this course, And I put all our court that we're going to write in our application into this G W budgetary, and you can get it by navigating to get up dot coms. Last Summit Field as Espace, last single contact and Ali posting is link into the courses, so system. So if you feel in trouble, are getting stuck somewhere, you can actually go into this repository and see it scored and find out how it is actually done. So this may be very helpful, for you didn't get along with the North in the next year. Source. Under Siri's this not for then go to for beginner. And this might also be helpful for you to get along with scores as you'll see the different comments to those different operation and different moral fields in that two syntax in the once more so I'll also be providing its link to download be sorted. Take it out while going to this court. In the most interesting thing undersea are this slice and this slash will teach you fighting. You need to get into the single Web development. You know there's anguish build upon the Buyten's, so you should actually have a little bit of fighting knowledge, and that's what the slash will help you to do. So it has covered all the measure essential patent topics to get into the single Web development, and I'll make a dedicated video on how to use dislike the common Let's start. So I live posting all these resources in the course description, and I'm sure you'll get much benefits from them. And if you feel stuck it in moment, ask your question in the discussion forum and May are the students will certainly help you . And remember, it takes consistency to run anything, and I wish you a very good luck and hope to see you. What's the condition of the course? 4. Setting up the Development Environment: Hi, guys. I'm super excited to teach you, Django. And in this video, we're going to set up our development environment. Now we need a few different Softwares. I'm going toe. Put the links in the description. Now open your browser and go toe fightin that arcs last downloads and download the required fight. An executable file for your operating system. If editing Mac Linux us, you can download it from here. And since I am using Windows, I'm going to download fightin cheapen soon when you're that is the loudest person off fightin. No, I'm going to save it And the next software I want you to download is bizarre mystery code. Now what is it? It is a corded eater that is very lightweight and extremely productive for the Clippers. This trade as great support for extensions. In the best part, it is available for every system Beat the nukes Windows are McQuay's in depending on opening system. Download the required executable files. I want to save it. And while it's downloading, I want you to go to this website that is gets as SCM dot com. It is a common land told that works with the limits command. So whether you were using MapQuest windows leaners, we can do basic cooperation in the same command. So you won't have to do any extra set up to go with this video. Our discourse. No, I want you to download. The required is a beautiful fired for reporting system in this case, Windows, and I'm going to download it. Let's come back. After all, the very softest Mr Already is, you can see our software has finished downloading. All we need to do is to install them. So go to the downloaded, fuller installed beytin. And while installing, please make sure toe take this pipe and 3.72 part. What will you do? Is that it really stole the fightin comment? Global meaning? You can run fightin in any off the fuller in Yogendra fight the interpreter right in that cell in click install. Now you know the automatically news. Still the fight and finds for us. You can see that set about success food and now close this step. No. We're going to install bs scored. We can eat it. Next. I accept the agreement. Next. Next. Next in click, Create a next step. I can and take both of these options in this third option. Two. Now click next and install it since I have a leading starlet. So I'm going to skip this step, but I encourage you to install it in the next. After that, I want you to install Is the kid in it next? Next? In here, there's used the use. Vigilance to record is against default editor. Next it next again, beginning next, next, next, next in need insta. And since I've already installed eight, we skip this step would please doing still it on the system. So with the same comment throughout the course to make it super easy for you and me also, no, I'm going to cancel it for now. But these install it on a system known. Let's explore all the software is that we have installed together. So we haven't start fightin pugilist record in the gate bath. And if you want me Jewish to do court and you'll find something like this now let's set up some settings and extensions. Individualist record toe walk with Django. Now click on this I can year, which is the extension there in here. I want you to starts for dissing go Sorry and installed this extension What will you do is that it provides some template ing language helper in the template layoff Sango It will be super easy when we're loving dango Abe and I'll show you how you can never get to eat and use it better in the course Now in the next Stinson, I want you to instill his beytin Now go to dictation in type item and he stole it. Also, The next thing I want you to teach it some sort tapes. Example. If you press control plus being, then it will talk of the Explorer tab. If I press it again, it'll open it again. If you want to open the terminal inside the visuals to decode all we need to do is to press control, plus back take. You know, that sounds weird, but back Take. He's usually about the tab key on the keyboard. Press control plus back take. You need to open the terminal in here I have set up the default tunnel is best, but you can change it by using common salad to a sister. Common valid press control plus saved plus being in year they seal in under a terminal, select default link on it and sell it. Get best. Remember the good best we have been stalled previously. It is that same terminal where you can use our Rhenish common land it. And now, whenever we raise Contra plus back, take you to look on the get best, but another begins to record. Do you remember that we have a part it and set up. What it will do is that if we fightin from anywhere in the terminal, we can. He says itself just like it. I thought the course. I'm going to teach you all ins and outs of the visual studio code and you're gonna walk efficiently. We did. If you follow my guy islands, so that's it for now, let's meet in the next lecture. 5. Learning Python for Django: And now, in this lecture, I want to discuss how we can learn beytin from this light. And the thing is that Bangui's build upon the beytin and you need to know some of the beytin to completely understand the anger. And that's what the side was made for. So it covers things like data types in beytin Bay Levels operators and in boot building functions and methods. He strings in numbers and Bytom lists in Brighton dictionaries and how to work with them, the Bulls and said and using conditional that this event is the statements and you also learn about the look. So you learned while and for Luke in us a lot about the functions so I can work with them and what it actually is. You can launderers from the slides, and you'll also be learning about object oriented programming from this light. So I want you to go through this lives and have a look. It is off them and it right, And whenever this type of Coartem is appears, I want you to try them in your pipe, and I don't so when we apart uninstall go to a stuntman and thoughts, idol and nobody need so the slightest easing to give the input from the user. And I want you to do do the same toe example. Let's tidy scored and you can see the changes directly from this fight and sell. And I want you to experiment with this court's nippers and definitely check out all the slides because they would be helpful while looking with younger. 6. Python Package Manager PIP: And in this lecture, I'm going to give you gentle introduction to the PIB. So what is being BP's a practice manager for fightin back is is But you may be wondering water packages well, back in this are simply fightin gold that you can, including your present, where you can find those packages usually at this link link in the description, too. In my packages, I mean, they just like general flasks. Nam by Scrappy Kivi, Open city These are all packages, even jangles. The package in tow used this package. We have to install them to our computer system and we usually installed them using pig. So there's a specific comment called Peep Install Django due east on the Django and you compare system. And similarly, there s paper on Stone Tango the place of Django. You can install any off. The fighting back is is by using its name. So this is our peoples in letting the course will use the people to install Django. So the next video will be about virtual environments. We can work with them and will install fighting packages in a natural environment. Let's see you in the next lecture 7. Virtual Environment: Hi, guys. Welcome to this lecture and we learn about virtual environment in this lecture. So let's get into the next life. So what is virtually merriment? Well, it is a saluted fightin containers for menacing our dependencies for our project. So there's understand it by a simple diagram. Suppose we have a computer, and whenever we installed by the packet is reeling, people meant it will install all those packages in the same directory. Here, this is small white boxes are competitors. But the problem is, if you tried to install, then go 1.9 in Jungle two point or it will cause a problem. What I mean to say is that lost when you install Django one for nine. You do need started in this directory, but when it actually still general 2.0, it will replace that 1.9 and it's tallied with jungle two point. Oh, but that can be a big problem. When you were working with to project that do this different wasn't off jangle. So that's reward. So environment comes in in the problem that courts environment solves is that it could ass elated environment for menacing all the patent packages for each project, meaning in one watching environment, you can have jungle 1.9 orders and go to window. You can create its minimum, actually, merriment for it. Project in my default baton comes with a model that absolutes to create about your environment. And we're going to use that in the coming lecture. And one thing I want to mention is that when would we use a budget environment? We need to activate it in Mr Packages. They're this way. When we're developing Project. Well, inside that bottle environment will have a system that Pakis is not. The packages that install out of that environment. This will also very in full for the deployment forces off Django Web application. And they're just two men is our, I think, dependencies off packages, you know, present. So let's see how you can create our own budget environment and how can walk with it. Oh, let's create our natural environment for Contact Crozet instead. By making a folder, we'll name it Contact. Open it in right late and select. Open it good. This will open visit list record in that directory so you can walk on it now, Tobias told me now, using controversies back, take to see the fighting practices that I installed on the system. We need to type people frieze now, depending on operating system, the common might be different. If you're using Mac OS Salinas, you might have to need. But I peeped because Patton two is already installed by different under system. Never tried to use only people freeze. It will be using fightin. Do not patent three. So to his baton threepeat manager, you need to do it. Do this by telling people t freeze. But since it is Windows, I'm going to remove the three. And again our I'm putting the comment for both We knows in my quest Lino in the note below . If you didn't, it's all the pattern packages that instead on a system. But, you know, contact, close it. We may not want all these practices, so what we can do is to get a natural environment and have a separate practice manager for it. Now let's start regulating our butts on environment. We need to do this by tapping fightin and again varies in Mecca. Certainly nukes. You might have to type Iten tree, but since it is windows. I'm going to type fightin. That's M It's best B and B. Now this v e N b is the name of the modern which will help us to make watch environment, and this is providing to the heightened by default this space and hear the name off the watch environment that we want to make. In this case, I'm going to call it Ian being. No, he didn't and Italy stole a bunch of environment in this stack tree. Now it is going to take the time. So I'm going to skip this part, as you can see, does made our environment for us. That's exploded against it. There are lots of full this year, particularly we're going to work with scripts, inactive it number. I have told you that we need to activate doubt, but my men, before we start using it and depending on opening system, this Fulham might be different. But I'll point out the differences in a sort note, which really provided below this lecture now to activate this westerly merriment we need to source. That's last NB go into the end before Leah, and it's craved class activity. And what will you do is that it will activate the natural environment for our project feed . Inte can see that is the small DnB takes appears on the time now. Didn't against that. What environment has been activated And remember, you always need to activate the butchery merriment before walking on the president. Now, if we don't be, please, you can see that nothing has been the start because it has created a separate bite independency manager for our prison before he gets going on this back of this in start. But now they are no packages installed. And one thing I want to medicine is that when I'm about your mom and is activated, you might not need doing it. We see what we do know that fighting trees installed on the system and whenever you use fight on only our people, only you will execute fightin three. So that's very cool. We're going to install the required dependencies for our conduct. Was it busting when you instill jangle so type install Django and in to install the latest wasn't off the anger that is available. As you can see that dangler has finished installing. However, we're getting in warning, saying that we're using the word was enough being, but we can install it using this comment. I'm going to skip it for now. Now let's clear up the time now by pressing control plus tell No. But now, if we don't be freeze. So the two packages I installed before you got showing no packages. But now, since we have been still languishing, peep it. It's going to package this within done anyway. But environment. So this is vehicle and will be using the buttery mamane throughout the project. Remember to activate the botulinum aren before starting to work with it. And that's it for this video. And in the next lecture will finally start making our contact project using Django. So I have We're excited. Let's move into the next lecture. 8. Starting our django project: Welcome back to the course and in this lecture will finally start making jangle project for our contact application. And let's struggle the terminal by pressing control plus back tick. Now let's activate our natural environment by diving Source Dirt Last nb Last script. It's less active, it clear of the terminal now if you remembered we had already stalled Django using people comment in the battle environment. And when you install Django using Peep it had also installed are Common Line tool, that exhaust security angle project. And that comment is jangle airman. And whenever we start our project, we need to type jangled. That's Edwin Space. We start project space in the name of the project and in this case, I'm going to do keep it contact and dot You know what this dot do is that it indicates then go to create the prosaic in this tactic. And if we didn't er you can see that it will create ah conduct statically No Jenga has created opposite for us. Let's explore what we have here. So these contact directory is a continent for our project. It convinced wants off different files. First of all, this any dirt by it is an empty file that there's fighting that this directory should be considered a heightened packages. Medically, we're not going to walk with it, so let's close it, and the next thing is sitting start by. So it is a configuration file for hours, angle prosaic. Let's go through it now. There is a sacred key. One thing I want to mention is that you should never, ever reveal your secret clean because it might make your application very easy to hack. And whenever we were deploying it, you should keep it didn. And don't foresee to the get a brief visit very to the next. Thing is Deborah equals true. This is actually meaning that we're currently Deb loving this project, and when we're done with it and ready to deploy, it will usually don't it too falls and turning you two true well, so are some helpful either messages when developing tango project, usually very and full for the working purposes and Allah host it contains the area off the dome. Any names that do you want your project to be assist form? The There is the area of the stall f by default. It comes with different, perhaps off. And whenever we create an ape, we have to register it here. And the next thing I want to highlight is the best value. So by default language this escalate database. But it supports buried here for the stool, and it's glad three is very easy to use, so we'll be using it in this lecture, but it is not suitable for enterprise application. But since it is, our basic jungle course would be using Escalade. Three. That of S in letter will be aiding and editing different settings configurations. Then the next file is, um, I'll start fine. So this is where we will set up clouds for the application. For example, you have to mention that what happens when no user visits shortened barrel? Your default barrel is the air inside. Remember our user busy your domain names Last eight mean you'll go to your different Edwin Side in letter will be cleaning. Our separate were will file for our IP in this WC A. That fine is an entry point for WXIA compatible Web servers to Serbia predict. Basically, this file deals with the deployment off the anger prosaic. But when I'm going to toss it while development. The next thing is this man is that by actually it is a rapper for the languid, mean common land that we used earlier to create our single prison. With the help of feet, we can create a Jenga, aprons arbor and do so magnificently stops in our since we have explored what our dangle forensic fathers look like. Let's run our Sorber using the fighting Man is dot by Iran. Saba earlier were using the Anglade Men common land. But now we're using Beytin Man, is that fine? And if you eat inter, it would run the Sarver in a local development environment in the local west. So if you copy this link and go to it your browser, you will see Ah, walking jungle site. It says that the install worked successfully. Congratulations. But one thing I want to highlight is dead. We are getting in warning, saying we have 15 on a flight migrations. This actually deals with the migration files. And if you don't know what magazine files are that usually these are usually deals with the stables. When we created our project, well, we know that installs already off apes by default in these every choirs from database table . And since we have not applied that that I was stable, it is telling us to apply it. So let's do it. Let's close our server by pressing control fallacy and cleaning using control plus l you know you have to type Iten Man is dot by make my conditions. And when you said Ron make Magnuson command is that whenever you kidney mortal for inside your ape or make some tens is in the model u Sudan make my prisons which will create mice and filed for that model and since is our first time, it is saying that no team just addicted now we already have the magazine file for this EP, so we have to apply those and create database tables. And for that we need to type item Manet's dot by my great Now we do live light does that every stables. Let's clear it up and run our server. And if you're eating the you will not get that warning again. And if you go back to it, are summaries is still walking. So that's it for our this lecture. And in the next lecture, we're going to make our own Django air. And we'll also point out the differences between the tango project and then go ape. Thanks for watching. Let's hear in the next lecture. 9. Making Django App: Hello, everyone and in this letter will learn how you can make on air bends angle. In the previous lecture, we created our project for our contact president, but recruiting in a. So you may be wondering what ifs are so in a pizza Web application that does something. For example, when we're developing a block application, you might have a separate day per common section in different a part that I cut off a block post. And in this case, we're going to make a name that will hold the details off off the people and the project is a collection off configurations and F's for a particular website. Ah, project can contain multiple it. An ape can be used multiple prosaic, too, were killed in a pit and use the same in different project. So that's the main benefit off herding an apron that Sango. So to get an eight, the Sendak's looked like this. You have to die vitamin Manny's dot by study tape in the name of her rape. In this case, I'm going to simply call it and And if you didn't, I didn't create an a polar, and now, when you really recruited in April, you have to install it in the install a playlist. So to insulate, simply re center and that the app name in the goddess mark this case itself and remember, since it is the least its value, should be separated by a comma. So let's explore what a fuller hasn't it, and the first thing is indeed dot By and again, it is an empty file that there's fighting that this directory should we consider the biting back years and the next thing I want resources mortal start by. So this is where you will create your models for the model who can say objects in our databases and, in the case of our president, will be creating a model for people which will destroy the details off them in their contact detail. Letter will use it to make our contact manager, and the next thing I want to discuss is admitting that by whenever we kid immortal and if we wanted to be Ministro Minuteman site, we have to register in in the admin side in this fan and in the next file is the bills that by so this is where you'll read the court and do so me stuff within the database and it under are put to the template. And if you know the student, aws that by file, So let's create it for now. Let's go lead us that by and whenever we cleared the Ural file in in our dangle a Puea between from men prosaic Barrel that we have ah, you arrested by file in our to. So let's go to the many arrests that by file in inside the neural patterns at another, Ballew called. But it out in this case, Liberty Blank and I will discuss what it does in the common Lecter's. No, we have to dive. Include mistakes. A bad Lou. That is a string. It said they sting. You have to point out, do this fan. So to go into it here to tap a dart barrels and if you know days we did not imported this include function. So let you voted from Django that year. Els that save it so nowhere Ready to walk on our Zynga lets you in the next lecture 10. Understanding MVT: Hi, guys. Welcome to this later and we'll learn about mortal BUE in temperate. Expect off, then go. And this is a very important concept that I want you to remember, because this is how Zenga walks. So let's move into the next light where we learn about its off the component. So if you don't know what model view our template is, so let me explain it first. So model is a database how you stole the databases. The model classes is originally in the model company in the next thing is view. So in this bill will write our business logic. It will get the mind what will happen when certain neural is passed into it. And this template component is actually responsible for the visual appearance off the website. And it actually convinced the ice team all files and front any stuffs and this really is dispensable for the rounding off the website. So let's understand how these three components work together. For example, whenever you should resist the home page and that don't beds will be the main navigation Yaron And on that we are alone, it will have the specific beauty it has to it you'll go to that certain you under the view it might be classed best. Build off funds. Invest View who's interacts with the database, expects off, then go and fittest data from the model if necessary. And send those data to the temple earlier. And one more example that I want to give you is that what happens when a user post a block post? So let's say way in the front end. And whenever you use a radar block post, it'll send those post into a sort any barrel and that you had a really, again go to the abuse. And in that bill it will get the data based model in which the block post are defined and to restore that block post in that database, and it turns the template. And now let's take another example what happens when you lord the Blocked and you see a list of blood? So let's say you busy to the many marijuana and that you were like in points to a certain view and in that bill, and it'll faces all object finding the block post and passed the collection off. Those objects are blocked post in this case and end us it to the template to it in the temperate layer, and we actually work with the template to display those post by living through them. So we learn more about it in the common lecture. Thanks for watching lets you in the next video. It will finally display our home base in Sango, and we'll know how this view model, intemperate layer work. 11. Including Templates and Static files: we'll come back. And in this tutorial we're going to set up our skeptic and template files in Sango. So if you see now, present directory, we have two new fullest aesthetic and templates are replacing both off this in the course resources. So be sure to take it out and place it right on the present directory. And now, if you explore the Templars Dag do we're going to find three men. Five. So this really the fast that will use while making our contact project so inexorably the home page where we'll see the list of contacts that we have and it'll be the individual pays for contact details, and the subspace will be the template where we'll show the sauce results. And now, if you see in the next aesthetic, Fuller will see the aesthetic fells false. Like CSS images in JavaScript are called aesthetic fast in Django and inside the CSS directory. We're going to have the distance it for our contact application, and images will have too many Mrs One will if a boy in in a little bit girl, that will be the place solar for the conduct Ryzik. Now let's actually loan. We can sit up those start again Templar in Sango. Now open up your visuals to the cord and go into the project settings. And now, to use those templates dream from jungle about those templates. So how can we do that? We just have to go to this templates. Balu in inside d I arias key when Intertype os that pot that join And now this joint function takes two argument won the doctor where our template Fuller is located. So in this case, we're going to tie best. They are in the name off the template stacked in this case, the template itself. Save it. Now we're ready to work with the templates files, but we still need to set up our aesthetic files. So let's go down to the settings Fell and Willow A study on a score, Ural type static files the I arias innocently a value to the triple that will again be containing the Derrick de off our aesthetic files. No, do it misfired winter type. Oh, yes dot But that doing And since your place static files in our best directory, I mean that active where our men Pacific is located, we need to pass best the I R in the name of our folder where our strict felt are placed in this case aesthetic itself. Now we are actually don't with setting off the Templars and aesthetic files in jungle. And in the next video, we'll finally display our templates in jungle. 12. Displyaing web pages in django: welcome again. And in this lecture will be walking towards displaying our home page whenever you should be . Just mainly rattle. And we have already don't set up our template and aesthetic files. Now let's go to the abduct views file. Let's write some court to display our home pays. So let us define our function called home and by default, all the functions that defined in the abuse will take Request perimeter. And now we need to render our home pays. So to do that, we have to type return in the, uh, request. In the name of our template in this guest, we have a file name in Dexter. That's Demel. So we're going to re noted by tapping Index start S T Emma and noticed we didn't after type templates. Last industry s Tamil is because the ability you notified Jungle that we have these all these templars, you know, actually called Templars. So let's save it. And what this function is medical doing is that whenever this home beauties assist, it will return this template and all their set up the U. S. Route for our home page. Let's go to the Euros that fight and Now, when you do define some mural battles here, and to do that, we need to import the part from Django Dart barrels and define neural patterns list. And in this list, we need to define the list of flowers for our application. Now let's define the men on base, and you can do that by part. And since it is only based, I want to leave the question mark blank in the next argument when the past is the home punks on that would define in the abuse that time. So let's important abuse from that input bill was So what this dot is doing it that from this core indirectly, where young girls file is located. Also important abuse that by foul that's located in the same directory and loneliness. Name. Get to our organ function. Let's give it a name. We'll call it home. Save it. Now let's activate our virtual environment and run our solver using by 10 minutes dirt by runs harbor. But now we're getting in here here, saying that aesthetic fast they are setting is not a pupil, at least absolutely Mr Trailing comma. So whenever we have only one value in the to Pearl. We need to separated by a comma, so we're less buried and the euros in the development process is usually normal. We have to delegate and find a solution and save it. And now our suburbs should be running no copy this link and let's go to it. And here is looking very ugly. And it's because we haven't loaded our aesthetic fast. I mean, the season's file that were Britain. So let's import it is going to our men indexed artist email file and total of the time, you know. And now, whenever we want to import our aesthetic files when need to load our aesthetic times attack , and to do that we have to have two caliber Asus and 2% Tasers, and between them we have to tap Lord aesthetic. And so, using this lorry static gold, we can actually use the aesthetic fast that I am ecstatic. Fuller's Previously our dangle project wasn't rendering this main dirt CSS file because whenever we would try to navigate to the aesthetic fast, we need to do that by the is static template tag. So just remember, whenever we try to aired by static files, we need to do that. So wannabe Carly Brasses and a two person to sign and type is static and on it, the name off the aesthetic fans. In this case, we're trying to import this main Narcissus file, which is located in the CSS static Tree by default this aesthetic tag we look into this aesthetic directory so we just have to pass CSS class main dot CS is now. It will lured us SS file that we have created and if you re lured to apply those styles and for the testing part balls I had included this image placeholder and now let's send it to our default image. So let's go into it. And here we have the image source attribute Now bless it with the aesthetic file. Seems the image is also a static When Intertype is dedic space and single Kardashian Mark. And yes, since it is a grown car detail, we need to air. The problem is in. Our image is loaded in the images directory. So too is this it? We have to type you mean this slash girl dot p nz and you can also do That's last images Last World R P NZ And now let's do the same park. The boy I'm is here. The boy meets from the static images file static space, Single question mark images. It's last boy, that billions e no, save it. And if we re lord us again, you'll see those images. So this is how you can work with static files in this later weapons is in jungle no less little bit Explore how this really navigation walks if you remember in our daughter whereas file evaded the single Kardashian mark. Now, if we change, you do something like people and last and now go to our browser and the Lord the pace. We will not get that face because to get that we have to type people now because our index one based is not by our abuse and that beauty is located in this you barrel. And one thing I want to mention again is that in our many where will start by, we have also aided the empty single Kardashian mark to include our girls pile of it. But if it sends it to something like home and refresh the pay's well, I can get the either, because the starting point off this view is our local lost's last home Last People. And now let's go back to the changes we have done unless you move the people and you know this again will have the ear, because now the home base isn't located at this people, you have to type. Um, so let's get into it and hear your home pays. So I hope you have understanding off how this hero's navigation walks and in the next lecture, we're going to reflect that this file and make it more readable. So I hope you're excited. Let's begin in the next lecture. 13. Template Inheritance: welcome back, and in this lecture we're going to effect her our template. So if you explored these estimable files will find three commenting, one is a restructures and never gets in bar in the Footer. And since the would not say if we can create a best fire in Django and use that best file to renew our home pins detail, Basin Suspects. So that's the main concept off template in Hayden's in Single. And to do that, let's go to the temple Stacked indicate a file named Best Art STM ill. Open it. No, we're going to pass the contents that are inside in extra testicle file into the best artist Tim Miller. You know, I'm going to remove the men section here cause will have the index file, too. In that it no wonder the title tag lives clear it and into the block tack for template ing system. And usually if it does be and remember that Stinson we have installed earlier you provide this quarter snip aid automatically for us. So if we didn't and it'll create blogged, that leads to the title for our each places. So let's give it a name title save it. And we're going to do the same for our main content. Less scared. A block template tag here also, and give it a name content. So this will is to our men content while this block title will ease to our the idol for our each bases Save it now and inside our index start a stable file, you know, just copied the midsection off our our index fell. And now the move all the cord from here because we have those gold inside our best estimate file? No, save it. And to render the Lord we need to type specific, what's Lippard? That is open your caliber assist and food to person did sign inside it in the year type extents space and Kardashian mark. And inside these, you have to provide a name for the rest loud file in this case based artist email. You know, if we're wondering what it does less runner or server and go to it. And if you go to our home pays, you'll see nothing year, but just allowed. And remember, we have nothing inside here, but when you go to the index file, we're seeing this. I'm guessing bar and Fouda. So there's how layout works. And if you notice there's nothing inside our title off the tab and we contains it by using the block title that we have defining our best, it's demon file. So let's define it. Using with luck idyll and give it the name my contact. Save it. And now, if you re lord the Web browser, you will see its name updating the brother time. So I hope we have now good understanding off how tablet extending walks in jungle. Now let's display our men cards you need to create the block and Pap content is you have defined need here in the best of the stable fun. Instead, the block contained based the carpet fell. Serve it and the Lord he dug in and we got a near here saying that Invalid block tack on line 15. Aesthetic expected in block. So what this basically meeting is that we have not lordy study in our index tried a stable file and if you remember, we're using aesthetic fast in the next artist able to lured the girl and boy means this year and whether we're extending it in the temperate and which has Lord Aesthetic Templar tag. What? We still need to use the same time template tag in the file where the abuse aesthetic fell . So since we have used aesthetic fast in the industry, festival falls to we have lower aesthetic again. And so do do that. Open up your colleague brasses, which condensed it wasn't the sign and type lord aesthetic. Save it in. Refresh the browser. And there you go. We see our contacted us And now I want to change this year old to go Klosterman only. So go to our men Contacts project And it's whoever was filed and leave England. Now save it. And if you go to the home, you, Errol it alone display our context filed here. So this is how template extending walks. And if you're still not understanding how it works, let me explain it quickly for you here in the best file, we're creating a block content. And what this will do is that whenever we create index toward a stable file and bless content on block content here, it will render all of us that are located in based or this team will file. And but inside the block content it will render these courts. So that's how it works. No leads to the same poor sorts in detail. Go to service and copied the main section. Create a block content impressed our men sought scored yet, and let us define block tighter in the year. Let's call it sorts results, and also you have to extend the best estimate file and Lord aesthetic. So let's do that by typing. Extends Vest artist Eamon. Let's Lord always testicles by tapping Lord aesthetic. Save it. But for no since we have not set up the Ural imbues for the sorts function, we can see it in the tangle template. But let rule set up the sorts in detail functionality. But for the sake of this electoral, it'll just use the template inheritance in those fans. Now what the detailed at this table and do the same. Just copy those men sections. I'm going to copy the court from source that it's table fells invested in the detail. It s damn ill and no, we're done with those layouts and template in a tins 14. Working with Django Models and Media Files: the guys will come again. And in this lecture, we're going to finally sit up or that of a stable for our contacts process. So we're going to walk with the motors that pie off a directory. Open it up. You know what models are is that they are the separate tables in the database that will restore its values. So, for example, in the case off our president, we want our product to store the name of the contact, their email phone number in the information in the gender, in the many images. And we can basically do that by creating a separate out of a stable which will hold those values. So to do that, we're going to use a class and call it contact. Now, I'm studying the name off our model with a capital later because this is the convention off writing your mother's name and suppose you have towards, like, contact people. Then you'd capitalize the first letter off its word for this case. I'm going to call it only contact, and I want to extend models mortar. Basically these models that model at the properties that all the models in jangle should see a bullet in every date. And now for this project, I won't restore the name, their email phone number in their info. Also, their gender in their image. Letters also is toward the date that will record when we have added that contact what that we're going to call it. Did you did? Now we have to send the should ever feel for all those properties. For example, in the case Off name. We might want it to be a car field, which is in port, which is just like our input I because to take in a stable felt. But let's assign it by mortals, not Garfield. In this car field takes an argument max length with stills, Jenga morals, the maximum number off character that it can be stored. In this case, we're going to store 20 characters and for the email. Single has our default email filled. So to use that, let us create email filled right having mortal start e mail filled. Now, this may feel is basically a rapper who are careful that has the specific validation. What's taking order? Vendor pollution, email bullets sanded Max linked for this case, it will be 100 characters and for the phone. We're going to assign it an indecent filled. So let's call it model. Start into that field and for them for were again going to use the car field in to elicit the max length argument, which will be equal to 30 characters for this case and now, Father, Gender Property. Who? Let's assign it, Let's give me the max length off 50 characters And for this gender, we want to drop down. That was so the list off the endurable level in this case will have, ah, male and female. And to do that, we have to pass a choices argument. And this I remained accepts a Trooper Natalie Store the ballots for our choices Ever executed our first Bellu? When he starts in a spoon bracket itself, let's give you the name male and its value to be a capital men. And for the female, let's create another Bellu that it starts again with this bill. Black it with the name P meal, you small F and a value to be a female with a capital F. No, I have decided to is an extension that will automatically show us the available model field in this file. And to do that, let us install an extension or jungle. And it's so late you can see that it has finishes stalling. So let's get back to our models that I fell and now in this image filled fruit, died. He mades year. We'll get the option off immense feel so it is provided by the extension that we stole earlier and click on it now. It will automatically include the quarter snippet for the image spill and inside immense for Let us remove all those arguments in the here we have the specify applaud to argument. So this is where the uploaded images will be stored in our project. Let us call it images and basically this would be dealing with the media fells, which will learn to set up. Just remember that will create our media files in our project, and we'll have a tactical images in the middle directory and you list all the user uploaded images in this polar, and also we want the image to be absolutely for this. After include the blank equals two, and for all those feel they are required to compulsively and if you want them to be absolutely. We can hear the additional argument. Lanky quest due to be ups in A For this case, we want a user toe include this detail. So let us to move this argument from here and now. We'll also have a did a field, which is sauce the date it went. That contact is headed to the database and for that will create a debt filled and click on the snipper that is provided by the Stinson. And if you notice we have two arguments here, that is, or to know it No, no, no. By default there, what's it too, falls? But what this order now will do is that it will set the date for that contact observed automatically whenever we edit that file and this order. Now it will say the date automatically. Whenever the conduct object is created and by default, Jenga will take either one off them's argument. In this case, we will want order now, so let's say they do you this way. Whenever we create in contact, object it a lot of medical, said the debt. Whenever that object is created now, save it. And one thing I want to mention is that whenever we use image spilled, we need Ah 10 packets called pillow because it's filled. Needs pillar package to work properly. So let us install it by tapping people in stone belong. You can see that below as we need stole successfully. Now let's clear of the terminal by pressing control bliss till now were set up the media folder where we store the operated files. I mean, the images now predict and to do their less create off Fuller called media in our best directory. So little squalid media and in an immensity is file were going toe in from Django that we're going to store all the user uploaded files in this tactic. Now let's go to our mince. It is final and blew it. And now, inside the settings file little scared the common telling sitting media FAS and inside the vigil ist record. If you press control plus backs last automatically commented and all of state the settings for pulling our media fans to do that, we need to we'll lose that These media you are ill in media route. So this media on the score you, Errol, will point in the year a pattern for our operated media fast in this case will call it last media class in a stream in for the media route. Want to ascend the folder where we're going to store made a fast in this case, the made a fuller that we just created, So to indicate it, let us type West art. But join in the best directory using based on the scores they are in. The second argument will be the name off our middle folder in this case, me date still. Now save it. And now we're ready to work with the media fans. So that's it for now. And in the next lecture, where we'll all salon abdicate the super user dresses angry at me inside, where we will explore the angry and mean. So I appear excited. Let's move into the next lecture. 15. Accessing Admin Site: Hello, everyone and in this video will be navigating around the admin side that is provided by Django by default in our sovereign has been running. And one thing I want to show you is that if you visit the men perspective, barrels off contacts will find these barrel patterns going the en route. And in this video we're going to visit this route and finally explore the admin panel of anger. And if you are new to, then go into the most interesting lecture for you. So let's goto this in mineral panel by going to our local server in typing and mean here. You will find the admin side for a single project and get into it. We have to create our super user. So let's go and do that upon you. Appear next. Best inactive, actually. Merriment in the area after type fightin man is dot claim Great super user. Now I do ask for is a name to logging. In this case, I'm going to call it Dale itself. I'm going to skip the military's in the password. I'm going to call it. They'll also get the password again and saying that passages to sort you can see do some validation even when creating a user from the common line. For this case, I'm going to skip the valuation. You know, it says the spirit has been created successfully. And if you know, go to the ATM Insight in Loaded. That power is a name and password it, Inder. And now you're finally in the Django administration site. You will see the default models it has to eat that are groups and users. You can see the decent accident panel in here. You can see the abuse side off, son, since plastered in LA got off soon. So this is always engraved with looks and we're going to register the contact model that just created in this languid mean. So let's do that. Now open up your mean file off a directory. And if you know what these are, models file is also in the same directory where we have defined our context model. So let us import this contact and it started to the admin side. And to do that, let us import the contact mortal from Edwin file. So from that mortals import contact. And if you notice we have already imported the admin from San Goddard Con Tip and using this airman function, we can actually restore our contact model to the admin side. So let's two days by telling admin dot sight not register in Bastar Name off her contact model. Now, if you go to the end in sight and the Laurie Duggan you will see, a new model has been aided, and if you visit our contact section, you see that we have zero contact. So let's create one contact by clicking on it. Contact Solar's Easter. Our first contact. I want the name to be Joy Brown and email To be Enjoy Brown at the Reds email dot com. Let's assign him a number and involved. That's a jury's elephants or will type of friend. And in the gender, I'm going to select the mill notice tree about drop down, saying male and female recorded a personal field are lighter than compulsory fields. Well, since this image field is optional, we're going to skip it there, safe in the air. You can see that contact object. What successfully aided aired in other contact, let's say and save it and notice that it says in the Arab led milliliters and if you remember where they signed the email filled Aaliyah's so it takes the Inter Bellew to be a email to Let's collect it and let's give her last name we would and save it. So whatever as a two created, they will released its contact object in the idea of that object. And to do that we have to goto our moral start by file and inside the contact motor. Now it is the name off our contact objecting deadman panel. We need to define our Cecil function called double underscore str double on the score. So let's to find it and we're under defined str and remember the extension we have installed earlier. It has floated the court snippet for str function. So into this India, we have this estate function set up automatically and noticed that were double on the score before and after the last year. In here, we have to return on name for our object. In this case, we haven't done the name of the contact and we have to do that by self taught them because we're assessing the balloon that is inside the glass into assess it. We have to do that by itself dot name to save it and let us go back to our admin side. And if Estevez And there you go, we have their name appearing instead. Off contact. Object one toe. Any fair, not family with what it does again, we can send it to email and see what happens in here. It will saw the similar lanista definitely worked for knowledge, has actually done the name. Save it. So that's how you can assist them inside and never get around it. We also learned to create an object using our than panel. And we have also, since that different object name in them in panel. And in the next lecture, we're going to customize this contact had been pays a little bit, and we're also going to change this default jangled distressing taste. So I appear excited lets you in the next lecture 16. Customizing the Admin: 11 1 Welcome to this lecture. And in this lecture, we're going to customize hours anger, admin area. When we open our Edwin side, it has a default anger administration tasting the header. So we're going to sends it. Open up your B A score, and inside your Eurostar tie off men contact prosaic. We're going to change the Citatah. And if you notice we have already imported the Adrian functionality from then Goddard Country and we have that out for me navigation in this year old file. So we're going to customize our M inside title next from this file. So let us cite a comment customizing in text. Now do things that may NATO you have Don't tell the value of Whitman dot side dot citatah. No, for our project went to call it contacts. Save it. And if you re lord our browser, you will see that all conducts text appeared is ahead. Only this Also since these site administration in the battle off the end in sight. So to do that open up a bia scored and type and mend outside. Not in next item. So a little seen this value to welcome to Brazil. Save it. And if you go to our admin side, indifference it, you'll see that outside administers and extends to welcome to project. Now we can also change this Jenga side. Edmon, using the site title to do that type, admitted outside that site Dida and said it to control panel Save it and defensive browser and you will see that our index title inside that'll a bread correctly in our admin panel. And now if you notice we have these groups and users mortal inauthentic ation in authorizes in part off me inside. But we might not want this groups mortal so we can on lister it from Dad win side. So let's to it. Open up your airmen file from Abe directly in Let's import that group model from Zeng go dot con Trib. Not at that models foot group in our below headwind outside the resistor we had on his stern in the group motor. Now save it. And if you refreshed the admin site will find that that group model is no longer here in our less busy contact six. And here it is pretty plain, and there's nothing fancy about it. What we're going to customize it in our Edmund fan, So let's go into it. Let medium of this comment you know what we will do is that will create a class for customizing or contact model and this I need to eat. So let us create a class for customizing the contact model. Let's call it contact Edwin. Any delineated the mortal enemy from in Minto? Let's call it from Edmundo Model and men. Now I quickly want to show you that we have only contact names going in the contacts section. What we want. They are in for gender, any well to be appeared side by side. So we're going to customize it by creating ah list displayed her body and setting it too. Name their Zenda email in four and phone No, save it. And how to apply this customization we have to pass that. Contacted him in class is a second argument for our is to function. So pass it. Yeah, save it. And now if we difference our ATM inside you will find that were the list of the names in the email in foreign phone from the conduct object. Now that it's Western medicine, I want discusses anything them from this place. So by default, when you try to update any off them, we have to go inside it and edit it from here. But we can change its behaviour by editing it. Daigle from this place. So let's to it and said the next property called least devil now. And I want only in for property off our object to be detailed from the contact list. And now, when we only have one ballerina to pull, we should put the tailing comma here. No, save it and go back to our Indian panel. And if receipt now, you can see there to get an any table in. Fulfill here and you can eat it. It from here to, for example, that since the friendly status off joy Brown toe brother and we can save it. And if you visit it's detailed view, we can see that it's really has been since the year two. Now will it pagination to our contact list for that? Only specified number off objects will be so near the pace and other pain we'll be able to view through a presentation. And to do that, we have to assign the least port place property. For the sake of this video, I'm going to send it to the one and defensed up is and notice we have to conduct here. But when a difference. It was only one contact because we are assigned me to so one contact poor place and tow you in the contract. We can go to its next place, but for no less is any to the 10 now. We also might want a source field to saw through our contact objects in the single Edmund, and we can do that by creating in sorts field property intelli to sort the names Inder email in four and phone No, save it. And if you're the first appears again, you will see that we have a sort field appeared and in whatever tapping it will sauce to the names Inder email info and for number off the contact object. So let's trade by thing. Let's say joy in 32. So the messing result and no one will implement our list filtering figurines and government , for example, we might one all the object with a cinder female. Then you can just click on it and it will filter out all the female objects. So let's assign the list. Filter property. For now, we'll air that's end up saving. And if you reflects the pace again, you will see awful during option on the side. And if you get any off them, for example, female, it'll only show the female object. And if you click mainly to solve the object with a male gender, and since we have the dates aided property now we contact model. We can also use the filter for data did. So let's edit. Save it. And if you reflects the place again and you'll find a filter for your objects according to the date. So that's all for now. I'll see you in the next lecture. 17. Sending data from template to view: Hello, everyone In this later, I'm going to teach you how we can pass data from abuse to templates to open up your men because fell off directory here, you can see that home function is turning the index plan. But from this bill, we can pass data to our indexed or esteem a file. So to send data through the index file, we need to pass another argument in the render function. And it will be our dictionary. So inside that dictionary, we can pass in data, for example. There's parts instead US and its value to be working on the project. Save it. And now against this despair, Lou, from our index fan. So there stood goto our main index file. And please notice that we're sending this Bellew in the name off instead us. And to call that Bellew, we need to pass from Expression Year that we start with two caliber asses. And inside the college grasses will call the name off the value in this case status. No, save it. And if we refresh the browser, you can see that that values the spread on the home pays. Now let's see factor our court a little bit. We're going to court this dictionary and sne toe variable context and passed. That context is a hard perimeter. Serve it. And if you difference the brother again, you will see the same result. And you can pass a lot of different doctors to examine bullets. Pastor is Beldham. Three of the key called is innocent into value to Will and inside the next artist email file we have basis to that is well you to. So call it by putting days in the double caliber asses and sister brother again. And you will see that this is where it was displayed on the whole bets too, and was in the same way. We're going to face all the conduct, all the problem, that at the border and send it to the next artist able file using the context dictionary. So lets you in the next letter 18. Jinja 2 syntax: Welcome back, everyone. And in this lecture, we're going to talk about that singer to Cindy. And now, at this point in the course, we are finally ready to dive deeper into the template component off jangle and ginger to is a full fits or temporary leans in for a fighter. And it's what jangles who uses toe. The key component off MBT architecture of Django is actually and abides in there, too, and before moving into any depot into it, I want to discuss omits basics intact, and we have already used soffits, fits us like tempered extending block and then placing, sitting there a navigation and loading it sturdy files and assessing the values that were sent by the Context Dictionary. And it does a lot more beside in these and will be exporting some of them in the course. And I want to show you the basic configuration for its injured, too. And I'm pretty sure your family with these college brasses in person did sign so they are used for writing. Things are do statements, so things like looping conditional lording aesthetic files and setting up Carol routing, then really falls on a statement in this double curly braces are east for printing out the output in the template. For example, when you past data from Butte to Template, we used these double college brasses to assist those values in this double caliber asses in the assign between them is used for common. And if your family, with any programming languages comments, are usually guiding language for developers, it helps us to write the devil cord and dozens at a temple eating anything will not let this comment in the template output and throughout the course will be using to mend in the two feature that these conditional and looping. So I want to discuss them here. So the first thing is conditional enduring. If you are family with any of the programming language, you know what it does. Basically, we have been expression, and we take that expression using, if conditional, and do something that we will have an expression, and we think that using if he statement and if that condition is met, then we run a certain court. But if it is not mad, then you'll run the court. Inside. The is blocked are the good grace to our head by implementing a leaf with text. Another expression if the able expression is not met, so Indians are, too. Whenever we use the if conditional, then we need to close it using the end If and we'll be using this conditional rendering to take if the context is actually passing the data and do the looping is stuffs below. And you'll also be using me to take whether the contact object is male or female to apply diaper pretty styles for it. Inzunza. We can look to the list of items using for look so far logo. It starts with the four in the individual item in the Adam list, and it should be indeed wit in four also, and for every item in the items will run some court inside it so that would the men fit that often That to that I wanted to discuss with you and in the common lecture will be using a lot of them in the temperate layer. So for now, if you're still not getting any off, it, don't worry, will be implementing it and see live. So thanks for watching lets you in the next lecture 19. Passing all contacts to template: Hello, everyone. And in this lecture, I'm going to teach you how it can fit all the objects from your contact model in Passy to index file. So to do that, we're going to walk with Django Adam. So by default Jungle, where Primark includes our object listening mapper, that is org um whose can be used to interact with the public isn't data from various databases. So it is sq light, post grace and many more. So to do that, let us import our contact model from dot models in contact. So we're going to send all those objects in the name called contacts. And now everyone defeats all objects from contact model. And to do that after type, contact, that object? Not all. So using this recon fits all objects from contact mortal and pass it with the name of contact in the context dictionary. No, save it. Now let's go to our index file and instead, off instead us and his expression. We're going to pass contacts, Civet. If you go to the browser and depressive, you're going to see that we're receiving a query said, contending its object. So in the next lecture, we're going to look through its out this query search and display a card that belongs to eat off this content. So I hope they're excited. Let's get into the next lecture. 20. Displaying contact objects in Template: Now we have basis to this. Contacts object in this index file and now we're going to look through its off them and display the respective card. Now, inside this class container, I'm going to take if there are any objects in the conduct model. So to do that, let us right. If condition No, I'm going to take if they are any objects and the contact model. So to do that type if contacts then only will use our four look. So if they are not any in contact, I'm going to display no contacts. And now, inside the if contacts, we're going to look to each of the contacts object. So to do that, use a for loop and I'm going to call it off them contact in contacts. So inside this for look for its contact I'm going to take it. Ah, contact object is male or female. And if it is male, I'm going to display the male card. And if it is female, I'm going to display female card. So let us take the gender off the contact. We have to use the if condition again in time. Contact dar Gender is equals to mail So if it is male, we're going to display our male card. So copy this male card from below and tested here and now we have the access to the contact object. Now we're going to dynamically display our contact properties. So in the place of zone would were going to display the actual contact name. So to do that, we have to pass an expression called contact dot name and do the same for the military's. And you can also pass the same expression toe the interviews, too. There's do the same for the phone number. Save it now for the miss part. If the user has uploaded any of the Mrs, we're going to display that images. But if they haven't uploaded any Mrs, we're going to display the different boy or girl limits. So let's do that. We're going to take if any emails has been applauded or not. So we're going to do that with the condition. So let us say contact that emits, and if they are not any midgets applauded, we can simply pass the default boy means in this case. And now, for the applauded emails were going to say contact that team is dot barrel, and this is important that we aired Dr Carol after the images, because it will are put the recording battle for that uploaded images. Now save it. And if you go back to the browser in the Festa pays, you can see that drive around car has been displayed, and we're going to do the same for the girl card. So let's do that. Copy the girl card. Remember, we're take whether those injuries male and if that's so, it's displayed the male card. And if it is not, we're going to display the girl card, an organ for the miss part we're going to take if the image has been provided or not, and if it is provided, we're going to use that emails. But if it is not, we're going to use the default. Grat limits were stood that contact dot emits contact. Dot aim is but a barrel in expression, and if it is not provided, I'm going to use the different elements. Now let's do the same for their name contact dot name, and you repressed one off. The similar Pechstein mutual is to the court and selected Be Escort also said, like the similar text. So in this case, to select those similar text, we have to press control plus day and it will select a similar text now can it? But off them using one typing and update disease status with contact thought starters. No, save it. Go to a browser and fist the pace. You'll see that girl cut has also been applied. But this is status is not suing, so let's fix it. So by default we had the moral aim off in force. We have to use it instead of instead us. It's visited any district successfully. So now, for every objects who posed in this contact model, it is. You saw them dynamically in their own pays and always test that image functionality was just created, go to our contact objects that panel and heard a means for its off them. So in this case, I'm going to hear the female images, save it and do the same part boy, So have it now. Go to our contact base and defecit and and in this case, it is not displaying any of the images because we need to tell Jungle to stop those media files. So let us do that, Go to our men Project barrels and the around it as those media. You little in Mida Road that to defining our settings fell earlier these settings. So let us do that. Go to our many barrels fell. I mean to delete those comments for now and now Inside it, we need to import two things. One is a steady Kingston and Settings configuration bill. It is important that from django dot com import settings and also important aesthetic function from thing go dot con dirt you RL's not a static import aesthetic. In our day off the general patterns we need to aired aesthetic function inside it. We need to hear the media. Errol that is defining the settings dot midday were ill, so they just do that. Settings dot media burial in the four lower we upload our media fans, so let us specify it. Using document root and the jewelry, the Ballew seem to sitting start media route now. Save it. And if you go to our browser and if receipt, we're going to see those images. So we have learned now we can displayed objects that were passed from, Macquarie said from a bill. You things in that? Houston, Texas 21. Improving our models and template: halibut want. And in the previous lecture, we forgot to it. Contact out in four to our boycott. So we're going to edit in this lecture and just the brother. You know, you can see that it has been applied, and I know that I put off making this video was to improve our debt filled. And if you remember that, were buried all dead, filled in debt aided model. And you do it. We're able to be with this list filtering. But when you go to its individual contact detail, we cannot see that dead feel. So we're going to change it, and we're going to use our their time freely instead. So let's do that. So we're going to use a dead time pills and click on the first option that the extension source and here I've been declare all those arguments and we already have to contact off this credit in the database. So we're going toe set up our default date Time field. So So we'll get a needle while making migration in this contact model again. So we're going to save our default daytime for all the contact objects, and we're going to do that using that their time function that is, every level in django dot You did dot time zone import that time. You know, in the daytime pill, we need to pass our default argument and it said it values to daytime. Don't know, save it off another terminal and upon the next best sell here, we're going to make our migration file, and you can see that we're Boulder that dated it filled on contact model in order to supply does migration file using my great comment and let's go into the and Fester pays here we can see that did it it field has been applied and you can see that we're getting you are 5.75 hours ahead off a silver time. So this is actually to do the times on setting problem we have in our men settings fell, and we're going to solve it. I'm going to it as our least off database off time zone off your country that is available on the Wikipedia. So I suggest you to visit it and apply this required time, John setting for a project. So I was pointing to this Wikipedia article and year start for the country. I'm going to such for Kathmandu and copy this fellow and basted in the settings Fan in Time , John Settings instead off your d. C. Now save it. And if you go back to our Edwin panel and deficit that there is no going. And if you press this study and now button it'll daughter medical, it would the current date and time. So save it and let's do the same for joy. And from now, whenever you ate a new contact, it'll automatically leave here. Go, Corrine, date in time in the date and it filled. And also, I want to point out that from this lecture we're going to use the chrome browser instead of Microsoft is to work with our projects. So thank you for watching. And in the next lecture, we're going to use the jangle parcels to load our card off contacts 22. Partials: All right, everyone. And in this lecture, I'm going to entered issue to the concept off parcels. So passes are like components that you can use in different Templars. For example, we're going to use this card competent a lot in the sauce pace in the little pace and in the home page. So it would be a good idea to make it a component is a partial and use that parcel in those templates. And that's what we're going to do in this lecture. So let us get into it. So instead, our templates folder, we need to create a fuller called parcels in create a parcel called Card and going to the convention. All the parcel file should start with the underscore in the name of the parcel. In this case, I'm going to call it card inside this card at a stable. I'm going to paste the court that is inside the for loop, got it and saved those details on the arcel. And now I can load those card company inside the for loop by ah including statement and to included. We need to type include in the location of a parcel in this case, parcels last on the scorecard dot esteem in Sibi If you go to the browser and Vista pays, we're getting a needle saying that women Lord is studying in our passers file So remember I had previously told you that whenever we have Lord aesthetic fast you know, template, you need to lord aesthetic at the top off it. So that's what we should do in the parcels to. So let us include Lord Aesthetic. Save it. And if Esther plays again and now it is working perfectly fine. And I just noted that I actually missed one closing date while copping those cars. So let us hear that dib serve it and removed from the card parcel. And one thing I want to do is that to change this no contacts takes too. You haven't said any context yet in apply some Busta pistol onto it light m I to that place Marzen on top and bottom. And so I'm costumey style that I mended, beheading And now what did that mean? Site And it a bunch off emitters contacts. In this case, I entered the dominate Our famous people go. We ever did email Watson in and mosque Don't help trump in a lot more and you can see that is only swing 10 resulting one person if you want to. So in the result, we have to do that in the presentation. So I encourage you to do the same. You can hear the detail off your family members, Friends network, you know that. But for this course I have included that I mean that off these people let us build the site . And here you can see our conduct is displaying perfectly fine and I'll be providing the images off them at the course resources. So that's it for no. And you have hopefully learned about the partials. 23. Getting an individual Contact object: welcome everybody. And in this lecture, we're going to make our individual pays for all of this context. What I'm meaning to say is that whenever you click on it, ending went to go to individual place where it will only saw this is Mr Vick card. And let us discuss how we can do that whenever we click in heading. So we will send its I D in the Ural Navigation and in our view will capture that I d from the Ural Pattern and get the object with the respective i d and pass it to the hotel template. So that's what we're going to do in this lecture, And I will, and I want to show you that I d for every object its unique. So i d I also call this Primerica our peak. Let me show you their i d. So inside the least display working to aired I d. And by default this idea that it automatically win a new object is created and will be unique for every object. Save it. And if you go to the admin panel and Mr Pays, you'll see that every object here has a unique I. D good to our card Arsenal and inside in contact were entertained its navigation to go into detail You and we'll also pass it I d to the area. So let aside our viral eastern mint and give it a name detail. By the way, we haven't created this detail you Errol pattern yet, but we'll get it soon. And when to pass its I d. So we'll do that we use in contact dot i d And remember that we're basis to contact object in this card. So whenever we call contacted, I d. You didn't go to this Did tell you have a pattern, but at the same time, you will also send its idea. So they just do the same for gold card. Save it and go to our director you Errol's. And here I rescued a girl pattern for to tell you I'm going to call it detail. And remember, we're past and I d to this detail Usual pattern. So we need to cast that idea using this year old dispenser so we can do that using appointed bracket. And since ideas and Intissar we need to type into and the named we want our I D to be in this case, I'm going to call it idea, and it will go to abuse that detail. We haven't read it currently, but will create it soon and give the name to detail, save it and go to the abuse that by an inside abuser time we're going to create a detailed people. And remember, we're past an i. D. Inaugural application off detail. So our detail, we will take the request. I remain by default but also need to take this idea argument because whenever it tries to assess abuse the detail, it will pass this idea argument to So we need to pass idea. The second are amending its view, and using this idea can also get the required object from the contact model. Let us define our context. No, let us sit on that detail template in the template name is detail that esteem. Ill and I were in the past the context. And now in this context, we're going to send our contact, which will contend the object that belongs to the particular idea. So we call it contact, and somehow we need to find a way to get on object that Mattis a particular idea in this case, this idea argument. So in jungle we have in function called get object are four or four. So what it will do is that it will try to get an object from a particular model that belongs to a particular idea. And if he doesn't get it, it would throw off for four years. So let us use it. And it takes two argument that is the name off a model in this case, contact and primary key value in the member Primerica and idea the same. So in the primary key argument, we're going to pass the bell off. I d now save it. You know, inside the detail it as table we have they, sister, the contact opsec, and we're going to set up the template for detailed view in the next lecture. 24. Displaying individual object: Now we have basis to this. Contacts object in this index file and now we're going to look through its off them and display the respective card. Now, inside this class container, I'm going to take if there are any objects in the conduct model. So to do that, let us right. If condition No, I'm going to take if they are any objects and the contact model. So to do that type if contacts then only will use our four look. So if they are not any in contact, I'm going to display no contacts. And now, inside the if contacts, we're going to look to each of the contacts object. So to do that, use a for loop and I'm going to call it off them contact in contacts. So inside this for look for its contact I'm going to take it. Ah, contact object is male or female. And if it is male, I'm going to display the male card. And if it is female, I'm going to display female card. So let us take the gender off the contact. We have to use the if condition again in time. Contact dar Gender is equals to mail So if it is male, we're going to display our male card. So copy this male card from below and tested here and now we have the access to the contact object. Now we're going to dynamically display our contact properties. So in the place of zone would were going to display the actual contact name. So to do that, we have to pass an expression called contact dot name and do the same for the military's. And you can also pass the same expression toe the interviews, too. There's do the same for the phone number. Save it now for the miss part. If the user has uploaded any of the Mrs, we're going to display that images. But if they haven't uploaded any Mrs, we're going to display the different boy or girl limits. So let's do that. We're going to take if any emails has been applauded or not. So we're going to do that with the condition. So let us say contact that emits, and if they are not any midgets applauded, we can simply pass the default boy means in this case. And now, for the applauded emails were going to say contact that team is dot barrel, and this is important that we aired Dr Carol after the images, because it will are put the recording battle for that uploaded images. Now save it. And if you go back to the browser in the Festa pays, you can see that drive around car has been displayed, and we're going to do the same for the girl card. So let's do that. Copy the girl card. Remember, we're take whether those injuries male and if that's so, it's displayed the male card. And if it is not, we're going to display the girl card, an organ for the miss part we're going to take if the image has been provided or not, and if it is provided, we're going to use that emails. But if it is not, we're going to use the default. Grat limits were stood that contact dot emits contact. Dot aim is but a barrel in expression, and if it is not provided, I'm going to use the different elements. Now let's do the same for their name contact dot name, and you repressed one off. The similar Pechstein mutual is to the court and selected Be Escort also said, like the similar text. So in this case, to select those similar text, we have to press control plus day and it will select a similar text now can it? But off them using one typing and update disease status with contact thought starters. No, save it. Go to a browser and fist the pace. You'll see that girl cut has also been applied. But this is status is not suing, so let's fix it. So by default we had the moral aim off in force. We have to use it instead of instead us. It's visited any district successfully. So now, for every objects who posed in this contact model, it is. You saw them dynamically in their own pays and always test that image functionality was just created, go to our contact objects that panel and heard a means for its off them. So in this case, I'm going to hear the female images, save it and do the same part boy, So have it now. Go to our contact base and defecit and and in this case, it is not displaying any of the images because we need to tell Jungle to stop those media files. So let us do that, Go to our men Project barrels and the around it as those media. You little in Mida Road that to defining our settings fell earlier these settings. So let us do that. Go to our many barrels fell. I mean to delete those comments for now and now Inside it, we need to import two things. One is a steady Kingston and Settings configuration bill. It is important that from django dot com import settings and also important aesthetic function from thing go dot con dirt you RL's not a static import aesthetic. In our day off the general patterns we need to aired aesthetic function inside it. We need to hear the media. Errol that is defining the settings dot midday were ill, so they just do that. Settings dot media burial in the four lower we upload our media fans, so let us specify it. Using document root and the jewelry, the Ballew seem to sitting start media route now. Save it. And if you go to our browser and if receipt, we're going to see those images. So we have learned now we can displayed objects that were passed from, Macquarie said from a bill. You things in that? Houston, Texas 25. ListView for homepage: Hello, everyone. And in this lecture, we're going to see a different way off displaying our templates after now we're using function best views for our home, and it'll pays, which seems a little bit longer and might be difficult for beginners. But Django provides us a different way to write our views that are class best views and using those class best views we can easily make our home pays in detail pays, and that's what we're going to do today. Generally, class pissed abuse already implements most of the functionality we need and follows. The single best practices will be able to create a more robust least view with less code and less a petition. So we'll be implementing the class best used to so our home pace and detail pace. And to do that, we have to import list view in detail view list. We will be used to sew our own pace while it'll be will be used to. So our detail pits and they are located it django dot Butte Door generally import least bill, and it'll be now let us create a class based view for displaying our own pace, and we're going to call it home. Paez's view. And now this on based view should inherited our properties that all the list view suits here and it is targeted at least view. And inside the home based view, we need to type some properties forced. You have to define it. What template went to rent out this content? So we have to do that by the template name, please. Nor that it is template on the score name. And we have to define the part of the template name in this case Index, start esteem ill. And now we have to mention the model from where we're going to say the least off object in this case contact model. So where to do that? Using mortal property in city to contact. And we have configured our home based by giving it the name contacts to all the face contact objects. So we have to tell Django to call those objects in our contact model to be ah contact. To do that, we have to type context off nickname and it sent into the name contacts save it and to implement the classmates views we have to set up, you are routing. You know you have a start time. So a little set up the UML pattern for our home pace. I'm going to copy it and coming out the first Briton. And instead of abused autumn, I'm going to call our home Paez's view. And since it is a class view, we have to call the class based abuse mature called isb you. And this is we matter does all the work of creating instance of class and set up our class . Best beauty for you, Errol. Routing? No, Save it. And if you go back to the browser and re fester, place our own base, will it still work? Notice? There are no changes. What? We have to ride competitively. Very less court for our own pace, Bill. So we need this function. Best home. You and I'm going to come and see for now. And in the next lecture will be implementing class missed you for our individual contact plays. And again, usually super easy to work with the debut. So thank you for watching let us you in the next lecture 26. DetailView contact page: Hello, everyone. And in this lecture, I'll be teaching you how can implement class Mr Used to display our detail pays so little Start by creating a class Missed you called contact details view And it is going to inherit the properties that I defined on the detailed view that we just imported and inside it it will also need our template name and they sent me to detail. That s Tamil, since it is where will winner our contact plays and model to be contact And we want the individual object to be returned to our template with the name contact. So we're to define it using context object name and said it to contact Now save it in now Let us set up our we're all route for the tell you. I'm going to come in about this pattern and create a new one and inside Buddha detail when to call contact the tell you. And since it is a class first we were going to call it with s Bill And one thing Our dimension is that these routing for classmates detailed view will expect to find a PK in the UK release better. So instead of passing idea. We need to pass speaking so that when you call the detailed view, it will face the object that is in the contact model with the primary key similar. Do this. You're really Spitzer, so it's a bit. And if you go to our browser and difference, the pays too little sleep on any outfit, and it is working fine. You know, letters coming out that detailed the function for now. So save it again. I want to clear out the confusion that we're not getting in. Object would get a bigger four or four with a given I d. Just like we did here in the Bronx. Invest Detailed view. But what we're doing is that we're gassing up primary key on the Ural pattern, and that key will automatically be used by our class based view to get the object of contact middle class that matches that primary key. So that's how it works. And so I hope you're getting a little bit family with dangle and let us you in the next sector 27. Adding url and view for search page: Hello, everyone. And in this lecture will set up your oral and view for our sports functionality team. So what we want to do is that whenever replaced submit Borten We will wanted to send to store space inside the best artist aim and file. You can see we have a formula. Men, where we have the Sarsfield in infotech, you know, to make ourselves function. Walk whenever we click on our segment water. No need to goto such space So let us define a UL for it. We'll call it sorts. So from now on, whenever we click this summit Wharton, it'll send us to salts. We what? We haven't defined it in our neural patterns, neither in abuse files. So we're going to do that and also let us sink without mineral in the website aiding. We wanted to go to Euro home, save it And now let us define our neural pattern for sort space. We wanted to go to thought and we'll have Ah, thanks and best views Guard starts and we'll give you the name starts save it. And now only final box and best views for our such praise. So inside it will get a view called Sort. And since it is a function best view nearest request abdomen compulsively and we're going to return our template. That will be our hearts, spades, And let us also define a context than ever in Passy Tear. Okay, now go back to the browser and infested phase. Now, whatever results here, you don't take us to the sorts place in the year. I'm just placing ah, vessel Larry Meal. But letter will display all sorts sizzle dynamically. 28. Passing data from template to view: 11 1 and in the sector. We're going to pass the data from Champlain to view and we do that thing get request our post request or toe. Specify those requests were toe incident that may 3rd that route in the phone. Tech by the scales. We're going to use the cat request. And when we enter the data in or in protagonists omitted, you do somehow get the data from that in foot field. And you can do that by giving a name today fulfilled. And whenever you just saw Mr Value we get we can get the value from that in protect using the name off that input so little skip it and name it in college. That stone seven and I go to the browser and Mr Pace here. When you said anything like friend, you'll see in the Arab are we have a name cards. What storm in the Value friend. Any swing the expanded because we have defined the better get. But if we are defending to be posed, do not So the vandal. So let us tried again using the post metal, and it's just up is, and no one will put any value And so I said Foreign lady, saying that ever CSR Ferguson filled or what it is doing is that it is protecting us from cross side to pass a port city. So it is secretly maser that Xanga text to protect sensitive data and whenever use a metal post, we have to include a yes out of talking in the form element. So let us do that. And inside the formula made, we have to include CS out of talking seven. Now let us what's the time again and again Notice that we don't have any value here and that's because we had is we suffered that made a request to be posed, not gained. So the post request doesn't so they are dying. What get you guessed does. And we can use the get request in where we're not entering any sensitive Listen. But if our enduring something like our passport then definitely use the pasta quest. But this case I'm going to you can't request save it. And whenever we submit Assad's visit it since I get request containing its name in Belgium for in our views, we need to get the value that is in turn and get request. So they just do that in obvious that by saying if there anybody in the requester kid, we can do that. If request that get. And if there are any Bellew, we're going to get those battle from the gate request. So you to get the sort stone I'm going to call the arrival of South Stone and get the value from get request is in request dot Get in square bracket in the name off the intraday that you're having your I'm really mean in this case sort system you just defined here induce so that we have actually got this hot stone on going to pass a context that again will be called SWAT Storm and will send his value to the sort Storm David and inside our subspace and we're going to actually see that system this place are not. So instead of sorts, users far I've been detained, the strain and whatever that you do so in the sauce pays. So that's how you can get the data from template of you. It is also our put the first time in the day to day, but we have a good problem here when you only try to believe or local hosts last sorts meeting the source because when I usually haven't passed any value in the sauce fear, the sauce tone can be a sane. So we have to do a few tricks. Now this file for that when you only try to visit the sorts without get request and redirect it to our home base. Let us do that. Now. Who's that? I find it isn't border read Eric Johnson and whether do Indian the contest and written you were here and it will be done already directo our home page when they are no source quality of mutated, save it. And now, if you only tried to go to the sons into relying, tow us the home base. So what this function is doing is that whenever we get a get request, that content sometime we want do is that come from the request and pass it to sort storm and this pay our first template with that context. What if we're not getting any off? The get request? Went to redacted to our home page. That's it for this lecture. Let us you in the next one 29. Showing search results in template: Hello, everyone. And in this lecture, we're going to filling out the objects that Mattis starts Austin so we can display Our sources are effectively in our template. So let's do that. I'm going to create a parable called Sorts Results. And now what we're going to do is that we're going to get our contact model and select all the objects and fill it out. The object that Mattis the system. So in this case, we want our sources all to be displayed. That Mattis the sauce query that is similar to the contact name. So to do that in the filter function, we have to pass an argument that is the name of the model we have in the contact in this case, the name in double underscore and I contents. So we're into a sentence value to system now. What it will do is that in our contact model, it will get the all objects whose name actually convinced a system. So let us pass our sort. Caesar's in our context, and we're going to use the same component we abused in our index page. So, to ever any extra sittings were going to pass. It also is contact and said, You do sort, sizzled and separately to the comma. And now we have those sorts results in our subspace and let us copy the template that is similar in the index fair and vested here, you know, save it and rescue dog browser in San Statham. In this case, I'm going to call gyms, and it'll solve the result that Mattis the name James this case. It is suing the contact off them. Spoon now little sauce, another term called the Tailor and is suing the result for the tailor keyword but current luke and only filter the object that Mattis with one model in this case name. But if you try to sort something like the email, little say, when sauce this email address in SOssetia, it will not. So any result, because we have only sauce are contact object in the name, not in their email. To sauce into email, you have to type email and sorts it again. Now it is ring. The sorts is all based on the email, and in the next lecture, we're actually going to learn how can filled out. The sort is based on the multiple moral field and defendant getting the template I vested in the source space. What it actually doing is that it is going to take if there are any contacts, object passing it and if they are not any contacts, update it is going to. So you have no Syrian contacts yet, But I'm going to edited toe no such results. And if there are any object, we're using a for loop to look to, every contacts object and its object will be called Contact it. It's look and we're going to include our card, Far cell. So there the contact of that can be soon effectively using one god company say b And if you type any random results, it is when you so no such results. 30. Doing Complex query lookup: Hello, everyone. In this lecture, we're going to filter out the results based on multiple model field. And to do that, we have to walk with a few objects. So let us import it from django dot davey dirt models. Importante que. So are this cure object actually lets you to do is that it applies to filter an object with can be combined using end our our operator. So that's what we're going to do in this lecture. So insightful their argument We're going to pass a cure object that's hostile than model filled name that contents the sort stone and when to commend are returned objects that Mattis the name with the objects that also matches the emulator. So to do that, we have to use the vertical bar pipe sign and do next que object equities. And this time we're going to sauce to email, and we're also going to use contents, and we're also going to sauce the in for moral field. We are going to sauce throw for number and in this time instead, off I contents queries and window starts, I exact now save it. And in this case, the sorts is also will send us a contact Objects with such Tom is containing the name model filled or email border filled, our informal filled and in the last line we have actually mentioned in for. But it should be fun. Sarid, in this exact query, passes the objects that are kind of like exactly the phone number that we pass in the SWATs . Tom. No, save it. Any notions, brother? Little sort celebrity. That is the value that is in the informal field in the year we're getting in contact that contains the celebrity such stone, and we can also solves the phone number. So let us sort it, and it is showing the phone number of Take It in. But it is a dummy data. Let us arts for actor, and it is going to results once they respond. And Sara Khan and you can do lots of such storms. Example. Trump and it is going to solve the conduct of Donald Trump. Let Assad's politician and it is suing their two politician Contact observes that we have in our database, So this is pretty cool by getting in object from our database that matches our source, Tom. So I have you, like did and let us here in the next video 31. Intro to forms and Tweaking template: Hello, everyone. And after now we're actually making contacts from this. Edmund pays, But what we're going to do in the 16 is that who will actually great contact an idiot it or and even deleted from the front end. So you don't have do logging into our Aaron panel again and again frustrate contact our to eat them are even deleting them. So this really super easy, So we'll be doing it with the single forms. And while Xanga forms actually let us to do is that we already have this text failed email feeling for number field in this image select option and this drop down in our contact between panel. But we can actually get those input fields from our contact model in displayed in the front end. So we're going to use energy class based views that will automatically create these forms for us and so that you cannot put them in our template. And those genetic last mysteries makes walking with from super easy. And you do amazed how easy he's to implement that. So to do that, we're going toe, do some drinks in our templates so that we can implement the front incurred That is a great read update and delete, which is very essential for backing developers. And we're going to do that from the front end. So let us prepare our template for funding crowd inside the best artist. Ayman, the first thing I want you to do is that instead of type because testing our sourcebooks, we want to include the type because sort So this is the default attribute value that we got to the estimable in protect and using this sort attribute we don't need this Borton And when America licking title automatically submit the form so we don't need this burden Let us move it. And if you notice in always tells it where is telling this sauce from using its as Demel input element? But we're going to do that. We're using glass name, so having to call it starts box subete a now, um endorse. It is fun. Let us put our search box instead off input and we're building these trees does And also we went in linking the navigation bad that to liberate us to a place where you can eat our own contact. So let us create a bit Dag here and we want to give you the name feature link in there somewhere Strap is telling that will be Mars in zero in parenting. Also set to zero in respirator encouragement that will go to a place where you can get our contact board, let us create it even t for this lecture and you got in a fund. Awesome. Plus, I can so to it that I have to is I class and said it if a s f a plus and we need to indeed no, only the non breaking in space and have a taste it contact. And we'll also give a custom is selling our air tag with her The Marzen Ford Well, it outside and assign a text right is telling no, save it. And if you go back to a browser and deficit, you'll see that it conduct wouldn't has appeared. And again all the statements were doing in close the front in court, writing an different family with the fronting Just bear with me also you what you should do And if you know some front any stop, it will be super easy for you And if you know dissident, haven't I can in our contact ab. So where did an icon on that have to do that? I have a name is called Contact. I can you have to copy Toe Aesthetic folder. It is this invested here? No, in the best artist Evil file ever the title tag when you declared in over the link Women and you don't be our real attribute and you have to type title I can in it. And they say narrative at jute in here will actually placed the location off our have icon that we wonder display on the browser tape. In this case, it will be It is static and contact. I can dot p nz Save it. Go back to a browser in your Mr Pace again and it is not displaying. Let us fix what happened. Oh, actually, this contract I can is in the images Fulla. So after a specified and now save it and go back to a browser and fester face. And there you go. We have our icon appearing on the browser tab and it seems like that this telling is not being applied in all sorts. Boss. So let us picks what happened? We have actually died S E. R s box. What? It should be sorts box. No, save it. Go back to your browser investor base and always still has been applied in. It essentially removed the Borden element here, but it's gonna defect the function idea of this place. For example, weaken tape actor and hit India didn't so our conduct that measures the actor text and one thing I understood is that when you reset your browser, we want a little bit of Mars in a bulb and below this contact text. So we're going to do that in our mid equity. So let us get up this class and it a margin top and bottom to a five pixels in marzen bottom. Hi, picture in save It reflects the pay's and they are only starts a plan because it might be worried it by good stop Custom is telling. So we have the specified is an important property, you know, it's tells it using Islamist mark and important. Now we're investor base again And you see that that in this has been a pledge successfully and when we're in the detail place, we want to so edit and delete option where you can eat it or delete that contact and let us set up that in our details file. So we're actually going to make an off son in our detail pages that will let us to eat it or delete that contact. So instead, our container class will kid a filament and ascended to the class text center inside the building when we're going to create Inc attack. So it's ending the class BD in in Beauty and in four and give you the bedding off my bean left and right side inside the anger. Dag, we're going to have a fun. That's American again. Indira Gandhi in the class Name F A r F A. Did give you the norm dicking in space and it will contend that text update We're going to create a delete button to so copied and instead off got an info. We want to make it denser and give you the text Daily AIDS Fund. Also, Maiken should be f A S f A trust. Now save it in our browser if Esther Detail Page and you can see that we have two wardens appearing in our detail phase. But we went them to appear below the card. So let us fix that problem, and we'll be doing that by creating a new container in giving a margin. Top off three investors. Corbett Candente Save it. And if Esther pays again and there we go, we have the outdated in the read option. You know, work, little place. And I want the text light. If that's the pace and all those texts are down into the white color. And if you remember, we also have a date. It feels in our contact model. So we haven't to display the property for this contact object and above the attack, we have to include in S five women that so that our debt aided option and will include the contact dot dead headed property. This isn't some is telling for as five billion into. We want the dish to be cinder in the play. Amazing to top in Burton m I three and its front way to be like no, save it. And if Mr Pays, you can see that we're having in depth statues. The dead were created that contact. So this is pretty cool. And I know this we need a little bit off. Is facing in the operate in the lead warden. So let us do that and creating a bonds off non breaking spaces. Meeting this and Caltech save it and the festivities again. So we have all the templates set up for starting to make a friend in card for our contacts project. 32. CreateView: Hello, everyone. And in this lecture, we're going to create a functionality that relate us to air object from our front end and letting clear off my explorer in a bun of abuse that Siphann our Web directory and year we're going to walk with great beauty. That is the very class best view that is provided by Django, that absence to create an object from our front end. So let us import it from Zynga that builds Dar generate that it did import, create view. And now we're going to create a class that needed from create Bill and we'll call it contact, create view and into late, you know, the properties and function from create view and the spirit recordings, all mentors and properties that is required to make an object from the front end. And we're doing all this using genic glass, best you. Otherwise, if we had to use punks and best views were to do a lot off set up about this great view actually simplifies a lot of things, and inside it we have the means in the model that we want our object to be stored in this case, contact in all soon means in the template name that we want to gender the forms for creating contact object. In this case, I'm going to call it created esteem ill And now I haven't created this finally eight, but we created soon, and we have to mention the field that will be displayed in the template based on the different moral field we have under contact model. So do that using fills and you take a list off values that will include the form input that will be rendered in our career dot estamos template. In this case, we want the name email phone in four gender, and it means now what it will do is that when we're enduring forms in our template, the farm will contend the input field belonging to this model feel that we have defined in our contact model. And we have dimension where to go and object is successfully created in this case, went to go into a default homepages and we can do that. You things last only. So that's it. We're all set up for creating beautiful, clear daughter steamer in all its creator, Ural Parton. But it so the ul Abedin looks like this and it will go to abuse that contact great beer. And since it is a class first, you have to include Israel may 3rd and let's give it a name called Career Save it, and it will extend the loud from our best artist email and give it a title, create on new contact and now inside block content. And then, and to speed up the process, I'm going to paste accorded snippet that will actually have a container development whose container heading and I was in the line under it. And then we have another container with its only still. And inside that container we're going to base our formula mint. Now. The action attribute for this family mint should be blank because it will be managed by creative you itself. And it's mature should be post. And since we have a emits field where you can upload a name is we need to include extra attribute that is in type that lets us to upload files from the former element and its record in the value multipart slash form data. And since it is opposed to grace, when you doing good Osias out of token and most importantly, when you made a create view that we would medically gives us the home context that they're close to render all the in protects automatically and that in protects are the values that we have defined in our filles property. So using that form context, we're going toe get the in protect that convinced the name E mail phone in Ford's in the end, emails off the contact models from where we can create our new contact object. So let us tasted and include are stressing that convinced the home now save it. And inside the best of the stammel get contact in car element. We need to give it a you Adeline that goes to Carol create and I'll go back to the browser . And if esta pays, Antley gone ahead contact here. You can see that we have all these input, feels it. It automatically, and we don't have to do an extra set up. It is done automatically musings and goods in Rick class Best view. But if you notice wouldn't have a summit water near so a little scared it quickly, you know, created Estimate file ago indicated another input element that will have its type to submit and we want it spell due to be, create and also give you the custom is telling to with 100 text White and Dexter Center and also give them as into top in Britain, using M Y desk, too. And also saying the pistol off Bt in in between destined for save it and these all of the bootstrap pistols and go back to the browser and fester pays. You'll see that our Craig Borten has been applied. Now from this form, we can actually cure the contact object that will be study. Now that it is so, let us quickly kid a new contact raffling off home. And if you eat, create, it'll automatically create a new contact, object any street into our database. So let us create a new contact and it would really like to our own pace. When he does finish creating a new contact and if you scroll below, you can see that our new object has been created. So that's very cool, and you already know that our form where new contact isn't looking great. So in the next lecture release tallied using our dangle packets called this pre forms. So unless you in the next Lecter 33. Crispy Forms: Hello, everyone. And in this lecture will be Stelling, our form using a crispy pommes and in the course resources, albeit does in the link to the history from documentation where you can find more information about it. So from the recommendation, it is saying that it is a younger application that lets you easily build customized induce forms using our favorite seizes framework without right intemperate court and without having to take care off entering details. So we're going to use it. We still have a contact from so little since started using this commend. Go back to a vigil is to the court and total up your time now I'm going to upon the next time. Now inside it. I'm going to best this comment more to remove these justice upgrade. He didn't and we still the then go crispy forms and let's see the next set up. So it is sending that we should kiss performs to our install f's in setting start by. So just do that could be this line of court and basted in the sitting start by fell so pissed it here. Same it in the next step. It does also specify the sittings with letters. Tutu's damn pull it back for is telling our form. In this case, we're going to use the bootstrap for more latest copy. The sittings here at the end of the sittings fell and best it. And we're going to use the booster poor. So instead, off you need on a scale from we're going to use bootstrap for save it and to use the crispy from we need to Lourdes kissed reform Stagno, our template fans. So copy this line of court and press it in our create daughter statement vested here and now to use the case, perform in our form expressing year when you do that Ah, vertical bar in the world crispy. So that's it. And if you go to our contact plays and if you see it, you'll see that it has automatically style our contact nation pays and it is looking super beautiful. So practices like this makes the development process alert easier, and you can find them on the bikes and Pakistan victory. And you made one the newly created contact off to appear on the forced. So we're going to do that also in this letter and in a moral sort by file inside the contact last, I want you to define on next last that will be called meta, and in this middle class we can actually see the ordering off the contact objects in our model. So to do that, we have to type ordering property and said to doable off list and one the loudest object to appear it for. So you can do that using minors I d. So save it. And if you go back to our browser in the Fester pays, you'll see that our newly created object is at the first medicine. So that's it. I opium enjoyed the lecture, and I was soon the next lecture. 34. UpdateView: Hello, everyone. And in this lecture or wearing the leading functionality for our contact. So in our village don't buy let us import update you with also available. It's angered abuse. That's a trick that he did, you know, below the file will create another class called Contact Update view and in green aid the properties from the object you. Now it's like the same properties. Is the great views running in the cockpit doors invested here? The only things were going to do is that instead of creative s t m o in the dem blurred name, we're going to it update or this team in and save it. Now let us sit up while you were a navigation for updating our context. So our president will look like this in one very important thing is that when member using object view, you must have ah, primary key in a barrel. So we're going to set up our Primerica in the rural dispenser and said he'd do the picket and this any to contact up, Did you and give it the name, mobbed it, Save it. Let us is fill it correctly. So again, when they are using the object view, we should compensate. It'll provide this Primerica so that it knows which object to it it from the given motor. So let us save it. And inside our tablets folder, let us create another file called update dot esteem ill and it will be similar to the great face. So I'm going to copy the content from it and vested here and in this opted at this table, it is coming from our update view, which gives us assist to the form context itself. Tomb. But this time it also has Isis to the object that we're trying to eat it and we can insist that object with the name off the mortal name. So in the case off our contact model, when you call the expression that includes contact in the sort lower case, it will actually done the name of that contact off sick, you know, instead, off did anyone to used up debt. Now save it and I'm going to link this update template to our detail pay so it can edit that object from them to tell you. So inside our detail template inducted, wooden went link it to our update view. So it doesn't s effort to go do it and we'll go to our update bill. And we should do that. Using you have listed men. And remember, it also needs an idea an issue. Also, let us pass it using contact that I d save it in in a browser your first abated. And whenever you click an object Britain, it will take us to a former. You can update that contact. For example, let us update it's email to be John Doe, idris zimmel dot com and great, You can see that the emeritus has been updated. And one thing we need to update this Ballew from create to update Save it it a sub deity, Dakin and 10 eczema Durian John and I did it, and Abbott has been applied successfully. As you can see here now, again, up Did any of these contacts, just like we did with the joint to a contact. And now, if you know what is, whenever we update our contact object, it'll take us to our home pays what? We didn't want it. We wanted to go to its detail pace instead of going to the home base so we can do that by overriding a mature called form valid in. What we're trying to do is that when Django says the form when you have submitted and after serving that film, we wanted to redirect to the detail pays so it takes an argument. Cells in ah form argument and inside will create an instance that would have the contact object that we're trying to update and let us say that former object here that we have updated the balloon using vom DOT said. Now we want to redirect it to the same detail pace instead of going to the home pays So you can do that using redirect and Goto detailed view. And now remember, we need to pass in PK to our did tell you so we can do that. Using instance that became no save it inarticulate doublet burden and, for example, in this later, I'm going to choose the emails for this contact object. Now, look up dead. And instead of returning to our own pace after finishing updating, it really light asked to its own detail base. So that's pretty cool. And in the next lecture, we're going to implement that delete view which will lead us to delete the contact object from our database 35. DeleteView: Hello, everyone. And in this lecture will be implementing on the lib you which have sauce to delete contact object from the conduct list. So let us import the delete view and below the fire Little street in the class, which will be called contact Lakeview indeed delineated the properties from on delete view now in this delivery of a new dimension from which mortal we wanted lead objects from. So in this case, I'm going to a specified our contract model and Newell's arguments on the template where well, so our delayed confirmation pays. So in this case, we're going to call it the leader of this team ill and we have dimensional success. You have Dylan that will tell us anger to go to this rural when it has finished deleting that object. In this case, we wanted to go to our own pace, so we'll have to aid us last in a string. Save it now, go to the rest of my family and they rescued about what? The village. You I'm going to copy it, and instead of fobbed it, I'm We wanted to have a delete save it and remember, just like an update Buisness to ever primary key of the object that you want to delete. So you have the past speaking in a perilous better In the Ural pattern not only rescued I template for lib you, we'll call the daily dot estimate. Now we're going to copy the loud from opted out the steam ill and bested in Delinda this demon. So instead of update here in the block title, I'm going to use the deal it and use the same here in the summit in for attack when to have the bad luck to be delayed and instead of what an info wanted to have a button Danza No savings and no lettuces saying that bility viral in our detail pays. And inside that deal it in car tag Let us, including its refugee would that will go to our deal. It is in also passed the primary key of the contact Save it and I figured to our individual contact and he delete it will take us to a delete phase for the confirmation off the delayed action off this contact. So if we delete it will actually delete that contact object from our database and it directly to our religious tested, like the delete. And you will see that we don't have that conduct object any longer in our room pays. So our delivery functionality is now working. 36. Login: 11 1 And in this lecture, I'm going to teach you how can aired. Log in from in your template. You know, dangle makes it super easy to without indication in a site. And if you notice in our installed abs in our settings file, you can see that we have this ought. Yep, Installed by default. And what it does is that it has its beauty, and you are automatically set up for authentication the stuff. So to use it, we have to include its you rural women process file, go to it and below the abduct you eros. I'm going to include the barrels for out indication and you have to included. And it is looking at a jungle dot con Trib that odd dot you RL's now save it. I am doing this. We have this system logging logged out and may move authentication fitzer, meaning that it has its only barrel and boost it up. For those that indication is stuff. And to use this authentication forms, we have to make a folder in our templates directory. That would be called registration and inside the restriction get a new foil called Logging Doctor, Steam ill and now we never user visits our local hosts last logging you to Lord this logging that estimate file automatically. But before these, we need to have a few shit up in our meetings fell below the sittings file. I need you to a few settings for at indication. So the fascinating I want you to areas that log in You are ill and said its value to log in in below It aired Log out to handle and said the spelling to log out. And we also need to provide log injured directive, Errol that will be used to redirect toe a certain template after logging have been successfully completed, so aired log in the Director Barrel and said its value to home save it. And inside the logging, that s t m a. We're going to render the log in from I'm going to copy the template from credit esteem and file invested here bought in the title. Dag, I want you to display log in and to the simple heading and it's Bellew said it took logging . Save it, we'll do our best of the steam will file and I'm going to copy this contact in contact and get a double. Get off it And instead, off contact. I wanted to So log in and I want to do the fund. Awesome. My gun to be affairs f a signing old and inside off Ural create. I'm going to depress it with logging, which you have defined in our settings file. And if Mr Pace and I figured it, the log in you react also are logging from. So that's it for this lecture. And in the next one, we're going to implement a log out, determine our 37. Logout: But obviously we have implemented a log in form for logging. And if you don't know what it does again, I'm going to clear it out. Member Web set up all you, Errol, for that indication in our present. You Erin. And what it does is that when you go to the local host last logging, it will take us to this template. And in this temple to have this is to the form context which Indust a form for user name and password in it as automatically set of the log in functionality for us. So we had rendered the form using the crispy form tag here. And in this lecture, we're going to implement the love out personality which you log out the user from the logging, the status. So to do that, we have to cater. Another file in our rest isn't folder and it will be logged out dot Esteem in in member. The following should be exactly the same because our jungle default. What indication do you use this same file name for log out option. So what this locked out absolutely do that I never use a visit. Our local o slash log out a lot of medical log out the current logged in user, and it will be split up messes after lugging out. So we're going to implement it and I want you to copy the logging that STM allowed invested in our locked out fine. And instead of flogging, I wanted to be in log out and move this form tack because by default they do not sow any form element in this space and also removed Arkestra from stack. Since you don't need it in this lecture and inside the development, I want to create a bad ref element. It will have the front weight light class and inside this class, I want to display the messes that will. So you have been logged out and along with this mess is I want to give the log in the barrel to log back again. So I'm going toe create on new line using the brick lemon in here. I'm going to give the barrel for logging back again. So type you can log in using this link. So instead of using this link, I'm going to cover it in the ink attack that will go to the our logging in vester content here. I'm going to stay lower in contact. Using some good stab is telling Save it. And now I'm going to it as the lockout do Aral in our base file. But here I want to solve the log in the barrel if the user is not locked in. But if the user is logged in, I want to solve the lockout barrel. So we're going to use an iffy statement here and I'm going to copy this logging in ca tag and get a new if element here I'm going to take if the user is logged in. And if you remember, we have bases to the request expression in our template. So I'm going to type request that user not and to take whether they that is logged in or not, we have to type is on the score, authenticated. And if the user is that indicated, then saw the links inside it. But if there is, there is not what indicated. I want to display the log in your battle and if the user is not indicated, I want to display their log out. You had a So instead of flogging, I went to soar log out, save it and go back to the browser. And first up is in here. Since the user is not logged in, it is showing the logging option. So if you click on it India, you can see that our luck inform has been displayed. And if you eat the logging, you can see that our logging option that seems to log out since we have already logged in it is showing the log out option. And if you click on, log out to write us to locked our template, where we have set up our message when the user has been locked out and it did swing that we have been locked out, you can log in again using this link, and if you click this link, it will send us to the logging form again. So that's critical. And we have implemented the log being in Logar option and we laid the more at Indication is stuff in the coming lecture 38. Sign Up: Hello. Everyone in In this lecture, we're going to implement the sign off functionality for our project. In using the sign up, we can create a new Asia from the sign a poem. And we need to clear the sign of foam manually in our views. Bar Django has provided us is a creation from from which we can easily create the usual in our krasic. So let us important duty creation from from Jenga, the country dot r dot forms import use a creation from and from this user creation form can create new user automatically from our template. So let us implement that to the Christian form in our resort by in below it rescued in other class, that would be called sign up view. And it eliminated the properties from create view that were imported earlier. And it takes a new property called from class, and it is going to take the Bella off, use a creation from and earlier we have used the model A. But for this case, we're going to use the form class because the user name and passport in put out in the creation form and let us specify the template name and really street on our registration. It's less sign up for this demon and we need to provide a success. You Adul. And we're going to re directly to our own pace when it does finish creating a new user from the template. No, save it. Now Let us conduct this view in our view, Barrels. So I'm going to get a new path for it. And his aggression form would be available to sign up new discarding T to our views and give it a name. Sign up, you know, save it and said our wrist isn't fuller in the tempest tactic. Your new file called Sign up dot STM ill in the disputed temperate from logging that s demon and pastry inside the sign of files in our little dad going to display our sign up text and using that ridiculous inform when you lured our expressing inform particle bar, crispy it to Lord the user creation from that as the default user name and passport in Padilla men and install it you in the crispy form tag of save it and instead our best of this team and friend. We went to show the sign of home when the user is not logged in. So along with the logging barrel, we're going to give the link to sign up copy invested here and since one of the links to sign up intends Photos Maiken to affairs. FAA does user best plus seven and go back to the browser indifference, the pace in our saying of burden as it appeared. And one thing I do is that we only want to destroy our it. Contact Wharton when we have logged in. So let's copy and president of the If block and save it. Go back to the browser and difference the face, and you can see that our Sina Borden has appeared, and if you click on it, it goes toe a sign of template. Currently, it has the Ural set up to go to our logging view. So let us unity and very do our sign up. Save it. And if is he dug in? Now, when you go to our sign up, blink, you don't take us to assign a template where you can actually create a new user from here 39. Mixin and Decorator: 11 1 And in this lecture, we're losing logging. Required mixing are logging required decorator to make sure our user is logged in before using our project, because letter will be implementing a feature that will let users to create their contact. And I usually can only manage their contact and will also need a user to be logged in before creating a contact. So to ensure that we're using ah, mixing or decorator that will force us to log in before using our project. So inside of booze that by we're going to import a mixing called logging required, and we can import that mission from zeng go dot con Trib dot art dot mix ing's import log in required mixing. And since we have imported the log in the car mixing, we need to pass it along with the list you so copied and in our own best view, will be testing it. And remember, it should be the first thing in the bracket, and after it we can pass our list view now save it. And now, whenever we tried to look at our own pace, it will take if the user has been locked in or not. And if the user is not logged in, it will take us to our log in temperate. And remember that we have entered the logging or log out Carol, now sitting. Start by fell, and you'll also be used by our log in to cut mixing. Now let us go back to the browser and the fist up is, and if they use, there is no clogged in. It'll sauce are logging pace, and now we can only this is the home page when we're logged in. So that's why we could walk and let us do the same for other abuse. We want the same thing to be a pleasant and when they tell people and did Bill and also adopted view and the same thing for the D Libya, but not for the sign of you, because we want 10 of you to be able able when they there is not locked in. And when you log out in such something in our source bar like actor, it'll actually so the result. But we also don't want to sort the result if they there is not logged in. But the logging required mixing is all only available for class based view for the punks and best view we ever Tom called decorators, and we can use that in our function. Best views. So when it import that logging liquid decorator from django dot country dot art dot decorators import log and required, and to you, the logging required decorator every bar spokes investors view we need to included using at the red sign and logging required. Now save it. And when in tight races outsource place when we're not logged in, it will also be right us to our logging pays. So that's pretty cool. So let us Sargon again. And wanting on to implement is that whatever you just waltz in here, it'll automatically keep its Pelloux without giving it blank in the next short space. And you can do that in our best of esteem and fell and in place of thoughts in port, we're going to sit. It's Bellu. Do that sat stone, save it and go back to the browser and defense. The pace Now, whatever we saw, it will also bear in Salzburg, for example, let's start celebrity and if it inter in the next flat space, it will not the straits Pelloux in preserve it by saying it in our thoughts input. So that's it for this video 40. ForeignKey: 11 1 In this lecture, we're going to implement a lesson see between a contact and logged in user or the men was that we're going to eat our model key that is foreign game that establishes lesson. See between the user in the contact Foreign keys a minute to one. The lesson seat, which means that usually can create many contacts and many contacts can be created by our users. But that's what we're going to do in this letter. And before we begin, I want to mention that inside the belly, attribute off our topic all sorts input when you do it, since Thomas person inside I string. So let us select it in accordance in money. Save it. If you visit our him inside and said to contact section, you can see that we have to will contact sport. None of the contest contender is a field, so we're not actually sending the contacts to the user. But letter will be implementing off functionality that relate us a user to control their contacts on Lee. So to do that, we have integrated for inky. You know, Morris, At that point, I'm going to hear the Mendizabal level and set it to foreign game on the field. Now the first time in this pouring kitted is a more down which we want the lessons to be established. In this case, I wanted to be the user motor that is, from django dot country that are got more does import use a Now passed that user model inside the Frankie and what this under lead. Everyone will lose that whenever a certain you that is diluted it also delist the contact associated with that user. And we should also pass into the eye woman called default and said its value to none. Now all the contacts in our database doesn't have. This man is a model filled, so if you take to apply it, it'll sauce in either because they don't have for inky listen seep inside them. So I'm going to come into it out and save it and go back to the context and did all look on tax objects and also really the demeaning ones. Now we can finally a play the new migration to have a contact model on commented in of another time, you know, and get a new bass ill. It also activated what? Your environment here. Now we're going to make a migration find. Since we I did have a contact. Mortal not only played the maids and friend that we have just created using Beytin Man is dark by my great and you can see that all medicine has been applied and I go back to our Erin pace and you it contact. I didn't see that we have a new model filled appeared on you and it shows the list off user that we're going to ascend to the contact. So far, this popular let's create a new user Let's look out and sign up a new user misuse and when to call it user one and give you the passport in the sign up. But here we're seeing that is not found. So let us fixed what happened inside out we start by In our sign of you, we have defined a success. You able to be whom? And what they did was that it went toe our local host last sign offs Last home. What? We didn't want it to be a black These we actually want to go to our own base. North slash sign ups less room. So what we can do is that we can import a reverse lazy function from Django that you areas and go to the Europe pattern based on their name. Let us import from Deng go dot That is import the worst, Lizzie. And now you the past These for me string inside our US Lazy Johnson, Will it discarded and stayed in the US Lazy is an argument. Save it. And now let us create another user in here the sign of burden. And I don't actually the gusto home pays got our home base across slugging us is. So it is doing the logging pills. But if you go back to our ed contact six and in Adrian panel indifference the pace you'll see that we need to log in the user that have the super uteruses. So I'm going to log in with the delicate And if you see in the manager, moral failed is suing a drop down off the list of futures that we have kidded. So you have the Zahran used to and then so when we loved into our hunting, it is something that we have not saved any contacts. And when we had contact. It was so a form to it. The contact. And now if you know this, you know, Contact Review, We're taking all the mortal feel from the contact, but in the front end, warily displaying these 600 feels. Or do you also have a manager? Moral field? But we also need to wear the value to the men. Is a mother fail in our creative you bought in our fronting? I don't want to sort the list of dark downs. That's what the user instead, what we can do is that we can override the from bellied May 3rd again in well before saving that contact object, we went to a sentence. Man is a model filled to the current logged in user. So let's copy the form valid method from contact after it built and tested here. Now again see that we have a formal women and was having on the home they lose in the sense forever. What, in this case, I don't want to say pathetically, but what we want is that we can get all the values that you have entered and save it to the instance Parable board don't save to the database yet. So are you convinced that inside the safe Johnson began past comet argument and said its value to false? And now what you can do is that we can say the man is a modern filled, using instance that many there. Instead, it's valid yourself dot request, not use a. Now we can say that instance whatever using instance, not said, and we want to do it back to our home bit. So instead of detailed view, just go do our own save it and defensive is. And now, if you died, you had contact from a fronting Lett's. Now, if you feel love home in the create button, it will actually create a contact off the that as the logged in user is unseated in the Men is off moral filled. Any does very directing us to our home page. And if you go back to our contacts mortal currently, you can on this Is that contact object like leaking on its I D. But we also wanted to be assessed when we click on its name. So what you can do is that go to our admitted by fellow and another property that is least display lings and said, this volatile I D in them now save it and difference the biz. Now you can see that the Guinness is the contact object directly on its name on So and we're creating the decade 10 contact object were loved in his deal. So it is automatically is saying the logged in user to the man is a model field. And this way I want you to create a few users and care the bonds of contents. Innocents is of the contacts. So the specific user and now I'm going to do that quickly. So I created a ones of contacts and its other contact in this incident with specific loved in user. For example, if you didn't have the contact, you can see that they associated with specific user. So in the next lecture on to create a functionality that will so only the contacts that are created by the current logged in user this way, they can only control their contacts 41. Filter Contacts of logged in user: Hello, everyone. And in this lecture, we're going toe create a functionality that will. So the contacts of the logged in user only currently when you go to our room, pays you to. So all the contact object that we know database in our room pays. But since we have got indications hit up, we wanted to solve the contact that belongs to a specific logged in user only. And we're going to do that in this leg, sir, in our own base is controlled by this one place view. And by differ, it interest the properties from list You in this list view contents, the get credit shit method which returns all the contact objects. And now we're going to override it so that we can only show the contact off. Their start belongs to our logged in user. So laters. Override the get quickly shit method. So I started death. Get on the score. Great. Is it? And since it is a method, it will take self argument and only to scare the although contact objects that would have sent to us when you try to visit the our own pace by this get queries admitted so let us save all those contacts in the contacts forever. Now let us call this or isn't on. May 30 are using the super keyboard and call the get quick reset. May 3rd. Now what it will do is dead. It will get all the contact objects and say we do the context wherever you know. Let us sit on those contacts off six, but will filter it out so that we can only solve the contact objects that belong to according logged in user. And you can do that using the filter method in this field. Emitter takes the name off the model field in this case manager and said this value to the current logged in user in this case, self dot request dot user. No Sebi, no, we're done with our own pace. And what it is doing is that wherever writing the default get, Corey said, May 3rd, who is by default, used to return the contact objects in our contact mortal so in our contacts. But I will believe we're actually calling the orginal get Cody said method to return all of contact objects and instead where you don't know those contacts object with the filter applied to it. And from that filter we're getting the contact off. There's that belongs to along the news only. So let us save it and go back to the browser. Currently I have locked out, so I'm going to log in is our del account. And in the home base, I only see the contact objects that belongs to Adele Account year Seems like I only had three contacts in the Dell account and now let us slugging again with a different account. Now I'm going to log in with the user on account, and when I log in, you take us to a one pays and also so the contacts that belongs to this account. So let us do the same for they used to. Now I'm logging in is a user to account in when I log in? It will take us to home base again. But it was so the contact that belongs to the user to a count. And now I figured it contacts and fill up the form and it Great Britain. That contact will be soon in our room pits two, but only so do they use it to account. Do not so in the user one our daily account. So that's pretty cool, and we're very much done with it and in the next lecture will be implementing some security stuff in our project. 42. Fixing vulnebarilities: Hello, everyone. And in this lecture will be fitting some security literally in that our contacts project have the fasting and faces in our sides of you. If you tried to start another thing like friend, any day enter it'll actually says our entire database and it does the result. And you know that this drive around doesn't belong to the daily account which I am currently logged in, but it is to swing it, So I'm going to feel that this sort sizzle so that it only does the sort scissors that messes the logged in user. So let us do that. Inside this house view, you can see that very done in contacts in a context is a sort result, but we're going to fit our The sorts result is in the field of May 3rd, just like we did in our list view. And we're going to filter out the contract objects that were created by the logged in user so little sauce to our model filled and said its value to request dot was Ah, and since it is not a glass best function and already has the Chris perimeter so that we don't need self door de Crestor user on like the class based views. No, save it and go back to the browser. And if you replace the pace, it is displaying no sorts results. And another problem I want to face is that when we go to detailed view, for example, whenever we go to any of the contact, the pattern, it's simple. Meaning it is just local offs. Last details. Last seven board Using the simple barrel pattern, we can actually assist the contacts off another user. For example, if it is the seven to t any tinder, we can see the contact off Emma Watson. But it doesn't belong to our daily account, so we're going to fix it. And whenever you to try to visit contacts off, it'll not so their contacts. So let us fix it in our detailer the steam on file. Cover the content from LA content and place another. If statement here and we're going to take if the contact dot man is, ah matters the current logged in user. And if the honor of the contact met is the current logged in user then so the contact are is well, just so you don't have a sense to the space for this letters. Copy this code snippet and best on the block. Intense the contact dot name expressing to you don't have assessed to the space and demand this was in the room. No se bid. And if you go back to the browser indifference, the pay's Sorry we haven't here. We actually had to use the comparison operator, not by sentiment operator. So let us fix it in the block. Die if contact Darkman is er is equal to and is acquittal and save it indifference the pace . Now again, see that distilling You don't have access to the space. But you can see that in our brother Tablet is actually suing the contact name. We also don't want it to be displayed. So let us fix it again. You can actually go pitter court from block content and based it in the block tighter. And Gabi the contact our name expressing invested inside Dave Block and inside the office block. I want the best. You don't have a sister that pays. That's a bit. Go back to the brother in defence Tapie's and it is working perfectly fine. So we have secured our thoughts and to tell you now we're going to secure our update and delete. Be, for example, who can update our contact and, uh, local host. Last contacts last up dirt last seven. What if it tied to busy opted view or four by getting an object from from another user's contacts? So let us say, But it also go to the update, our test email and inside the block content, we're going to place that if block let the leg intake contact dot menzah is equal to it crest dot user. And if it Mattis, then so this content. But if it doesn't matter, it's so that you don't die basis to the space Upson. Now we're going to do the same for our title. Save it and first up is again and you can see it is displaying. You don't die basis to the space and we also need to remove this this default title text, so remove it and it should be working. Now we need to do the same to our delete view. Copied of locked content include a new block. A statement that was a if contact dot men is er is equal to request and I do za then So its content What if doesn't matters? It should sauce. You don't have assist to this place. Let us copied that quote from update rds Tamil and placed it under deal it place. Now let's do the same for title bag. You know, if you go back to the context and lived on any contact object and when I click delete option, it really goes to its deal. It pales. What if we tried it in its i d in the Ural, then it'll so that we don't have access to the space. Now what we have done up to year can also be doing in the vision by foul board to make it easier. I'm doing it in the templates. And again, if you guys find out any new bill and everything, please notify me and I will make the video to improve it. And now it would be set up, were actually done without Indication section and in the next section will be learning How can we use the message? Freemark their jungle prevents us 43. Creating message partial: Hello, everyone. And in the six, um, we'll be learning about Django messages and jungle messages are usually the message that shows the user action when something has been done. For example, when it cleared our contact, we can create a jungle message swing. Your contact has been created Similarly, when we did the contact and the operate Britain will so you contact as you know, the date at the top of our home pays. So that's what the men public off jungle messages and we'll be using. Ah, bushed Accompanying That is a lot to this Powers. And Gomez is so you don't look like this. We have a box here in a specific test and we're nuclear gun close. It'll actually dismissed. So let us cover. This isn impaired because we're going to use it and now live best in this link in the courses for system and under great a separate parcel for messages so it can be used in our little project. And I'm going to call it underscored messes, Daughters demon and by default, you can get all the messages using the messages expressing So we're going to look through it and display the East messes using a four look. So that does he start our four look And then when do call it for messes in messages in best that is needed here. And I would it is this line to be called on Lee messes. And one thing we only want to. So the message, if they actually are so messes appearing in our template. So before displaying the message when they're sick, if there any messages and if they are, then only will show the message. So it could be all this good. And it is sick if there are messages, it first. So if messages then looked through them and destroy this individual message. And also I want to be bliss alert warning with a lot succes and also developed the seals block. No, save it and let us include this message. Parcel. You know, yesterday, Stammel and I'm going to place it below the break back. Little Syncrude the parcel. Save it And you can see that while using the bushes have other company. We get this cross mark when we click on it, electorally dispense and to make it happen when you do sums up a celebrity so little Skopje toe from our getting started six and on the bootstrap and below it covetous there scored here, invested in our best or the stem and file below the end of the food. No se v and we're ready to go. 44. Passing messages: Hello, everyone. In the previous lecture, we created a parcel for displaying our message and in this sector will actually send messages from our business by when I use a create up. There's our daily contact, and one thing I forward previously was there took over this message parcel in a container class so that it would be centred, left and right when it is displayed in our armpit. So Corbyn's content and get another day container with her class container and pesters content inside it. Now save it. And now we need to import messages from django dot com cheap, important messages and using these messages you can actually see and message to our template. So we're going to send message when a new contract is ated. And if you remember, we have overrated of home buried method in our conduct red bill and inside this from badmouth or when a new contract is saved and to display a message swing. That contract has been created so below the instance, start same type messages, dart success and Self Dart request. Since it is a classist view, you should have left that request any does. It takes another argument that is the message you want to display in this case and display . Your contact has been successfully created. Seven and no lettuce distant. I'm going to our front end and it contact Wharton and I'm going to Google Fill up this form . And now, when I hit, create border and intellectual day gusto home faith and along with it it resource our message in Allah component off or stop saying that you're contact has been successfully created. And if you eat this cross port on, it'll actually dismiss so there to save messes in our update view too. And inside Ablett view we have also But I did the form bellied with ord and inside the form valid matured below The better ever declare reason I want to display messages dart succes and it would accept that request and the message you under displaying Sorry. In the previously at the conduct rebuild the is feeling off contact is wrong. So I'm going to correct it here. And God did this text and bested here and instead of created and when to call it updated. Now save it. And if we go to the object from and do something this year in your doublet wooden intellectually display. A message showing your contact has been successfully updated. So let us do the same for the daily viewing so that when we delivered the contact objected sauce Ah, success message that will solve your conduct has been successfully deleted. And to do that, we're going to overwrite the deal. It may 3rd off delete view. So let us do that in our contact the live you. So let us operate our dealing meth or using their delete. And it is going to take the perimeter off self and request separated by comma. And along with them it is going to take ox and quarks keywords. So if I type rz, the extension is suing a supposition and I'm going to choose the second option year. And this oxen, quarks are is to pass a recent arguments in the method. What? We don't have to worry about it here so below it. We're going to display our message that will say you contact has been successfully deleted . Solar side messages dot succes in first argument will be self dot request in the message you under. So in this case, I want to so your contact has been successfully deleted. And now we also need toe around the village. You to actually delete that contact. So we're going to return. The order is not Did it meant hard using return Super in the deal, it may 3rd in the statement. Also days, these perimeters his argument. So let's copied, invested here, Save it. And if you go to the deal, it face and delivered a contact from here, it will take us to our home page. And when you delete it, do so your contact has been successfully deleted. So that's it. And were blown how we can use my senses, you know, frozen. 45. Styling Admin Panel: Hello, everyone. And welcome to this Boehner six. And where I'll save some interesting dango tips that you might want to know while working with Langer. Present. So the four step I want to say that how you can is tell your women panel. I mean, if you're designed type might want it's header to be afraid. Color are purple color. What? How do you actually do that? And I wont destroyed in this lecture. And to do that it's pretty simple in Django only have to do is create a fuller in the templates tactic called it mean and Inside dating folder. You need to create another file called Based on the Score side dot estimates in the file name should be exactly the same. And here we need to extend it mean it's last based door is demon. And you might be wondering why we're using based on this team. Um, well, we don't have the best of the steam will file here, but always is our Edwin side. Thank you. Actually, this this file automatically so you don't have to worry about it here, and we do zooming a little bit. And now from this beside at a Stammel. We can actually modify different part off our admin panel. For example, it perhaps block for different purples like it provides block for branding to change its heading name in block called X Try style to tend it is telling, and that's what we're going to do in this lecture. So let us use a block that contents branding off this admin panel and inside a block, branding it should exactly have that one element and suggest one lamented, should the idea off head and it will go on in the name of our president that will be displayed in the Indian panel. And I'm going to college contact process. So save it. And if you go back to our admin panel and you step is what is the conduct text here? It will reasons to contacts prosaic in general also provide in on the block for standing the panel. And it is God ex traced there. So this use it using the block extra is then now go back to your file Explorer and inside the seasons, Fuller of the aesthetic director, get another file call it mean dot CS is and all created. Another Lincoln remained inside the Block Express 10 and said its relationship to be starts it and frenzy do our aesthetic CSS last. It mean dot CSS save it. And now inside our community says we can actually still out mean panel, for example. Let's here and just tell these heading background and how can I do that? And to do that, you need directly go on it and select inspect and you can see that it is inside the notoriety so we can actually grab this. His variety in a place tells to it, You know, Acosta made me Nazis is fun So you know it and let's see this fan use the hitter selection from its i d and said it background tow this color which is the team of our contacts Prosaic. Since you are writing that, then go different eight minutes telling. We need to declare that this style is important and should be applied no matter what. And we can do that using Islam isn't important. No, save it. Go back to the browser in Fister pays and you can see that I was telling has been a plane and we also want the same thing to be applied on this bar, so let us also inspected, and you can see that it is under the caption element in letters all the cilic the capsule alongside a variety using captions addiction separated by a comma with idea hater. Now go back to the brother indifference the pays, and you'll see that there also turned toe different color. And if you go back to any of the mortal, you can see that the selling under debate on this section in this filter section and we're going to do that now, so later selected using this tool right here and league on it, you can see that it is under the breadcrumbs glass, so let us select it using that bread crumbs, and we want it's background to the same is header so copied and pasted here. And if you are back to our this color number, we can get a color palette from realist record erratically, and you can see in this car lot from here. So little cilic, a random ella from your example This color, little since its capacity save it, and the first up is now. It's looking somewhat nice unless applied the same color to this filter background and this input background. So let us select this filter background and you can see that it is inside the Australian men so in include the extra element here too. And also select this in Britain remained. You can see that it does it root of submits who can actually target this element using its attribute. And you can do that using scrap Blackett and key off the tribute in this case, type in this spell Do inside this ching this gets off me no saving. Go back to a browser and it is the peace and you can see that it doesn't applied. And you can actually a place scholar to be white so that these sorts in gardist appears right. Let us do that. It call a Providian's it its value to white and in putting save it. And the first appears So that's how you can is tell your women panel and again desires in front in the stuff and defendant interested in it. You can actually skip it. But if you're designed that guy, it wouldn't suddenly be helpful to you 46. Import export: Hello, everyone. Welcome to the another bonus lecture. And in this lecture I'm going to show you how it can back up your contact object in different file and let I use the same object to create new objects in that model. And due to some reason, you might need to delete all your contact objects or other objects from different mortal. And at that time you can actually use this. Then go import Export Library Two important export data for the project. So I mean, it's becoming distant base. And it says that Django Import export is angry application and library for importing and exporting that though it included and mean integration. And here are the features of this application. So let us actually use it too easy to need to install it using the pip common. So go to your bs scored in a one of a bass ill. I'm going to open next, facile and best it here and intellectually installers and go import export Lavery from the people. And it also says to include this import export happen and I stole abs settings. So little Skopje and inside the install air placed. I'm going to it then go import export. Now save it. And now, to use these importance for library, we need to go to our end mean that by in this case, and mean file off our web Reddick T. And we need to import import export model Enman From then going would export that we have just installed using the people. So from import on a score export dot Edmon import import export more delayed mean. And now instead off mean that model Edmon in the contact Edmund Bracket. I'm going to copy it and based it here, and I'll save it. And if you go back to it, mean Pace and Defensive Gordon Lady saying mortal not found no more than named import export and we have done everything correct. So let us just we're on our cyber. Let us a step it by placing contra policy and run it again. And now it is working currently. Fine. Now the first appears again and you can see that this to burden has been appeared 1st 1 say import and export. If we'd expert burden, it will actually create a backup off all the conduct objects that we have beer So let us stay. The expert wouldn't first and select the file for murder. In this case, I'm going to select CSB now. So made it and it'll actually dollar the backer for the context. Object in a file. And I'm using this file. You can actually back up the conduct object if we accidentally deleted. So to demonstrate it and going to delete all the contact off sex and also delete the limiting one. And since we import in the contact form a CSP fell, we need to import when you to click on import. And so, like the file to import I have selected the file that we have exported earlier. Now Joe is its former in this case Yes, B and hit the submit. You know it is suing the list off contact objects that would be imported. So it the confirm import and you can see that all conduct objects have been imported Success fooling and I should go back to our side. It is also working Fine. So this library is pretty cool and you can use it to back up and restore your objects in the database 47. Setting error pages: Hello, everyone. Welcome to this bonus lecture. We're learn how you can set up. Either pay this in single so they are differently. Records in Web development, like for for that will be displayed when the requested content is not found. Our 500 lire, that will be soon. When internal solver you're occurred and by default vegetative visit in on only where, like distended muda it also the defiant dangle for for either pays. But instead of this we went to so our on custom Miller paid. So that's what we're going to do in this lecture. And to do that, it's pretty simple. All you have to do is dead instead of them. This directly created a new find called four or four dot esteem Ill in the patterns would look like this. So the first thing you have to include is that your court and followed by daughter Stamen and it in, uh and here I'm going to pass the content from detailed It s de mille invested here. Now I'm going to cut out these continent element and placed it above the flock. And also remove this if look, I mean and also removed a block from the block title and type four or four and also in biz off conduct dot name expressing I want to set its value to four or four is not found and altering of this. Where is integral from here? Now save it and we'll do. Don't need to learn any aesthetic fell. So let assume of Lord aesthetic from here. That's a big and if you know days then will display this default is not found pays When the day buck is equal to two in our settings. So display our custom your pace We actually need to turn this table two falls So let us do that And then this value from due to falls And one thing when you don't this debate value from two to falls it'll actually stop out server because we need to provide some ballon r ala horse to make it running. No, save it for the sake of this. Always running. Yes, it is. And go back to our browser. And if Esther pays in the air again, see our custom, your bases, no displaying. And we're going to get the other piece for innovator court that is five on the leader which will be soon when some internal cyberia is a cured inside out and plays folder kit. In other file called $500 STM l and Let's go be the content from four off ordered esteem ill and bested on this bill, then stood out for four. I'm going to call it 500 seven and also instead off pace not found. I want to display internal solve a problem and now we want three distinct this 500 either in our development environment. But it would be helpful when you diplo our contact project to the online. So that's it for this lecture and we learn how you can set up our own custom made either pay this in Sango. And now let s see what back to our is no setting The latest on this developing infected too , he noted In these other doors, they do save it and we are done with this letter 48. Pushing our code to github: Hello, everyone. And in this lecture, we're going to put our court into the get up. And for those of you who are new to get up, actually get up is the where best wasn't controlling system for record and it can easily knows to project cord. And that's what we're going to do in this lecture. So the worst According to get up, you should get a get of account. And if you haven't read one, I suggest, indicate the one and log into it and we were logged in. You'll see a place like this, and you should care the newly positivity by clicking on a new button and you've dispositive your name. In this case, I'm going to call it Django Contact and give it from description if you want. But I'm going to leave it empty. And you declared depositary, Wharton. And now to put our according to this visiting, all you have to do is have these comments. But we've heard tablets command. I want to do spirits that setups in our visual is to record the frosting on to do. Is that on to create a get ignored file that will tell us not to post this NB directly and the start of his fall into our G tab depositary. And to do that inside your contacts connection New Year, create a new file called that Get ignored in the year your to type the name of much of environment in this case, even being last in the name of this data wasteful in this guest DVD dot sq light three. No, save it. And whenever reports how 1/4 get up, it will not content these three and delicately in this terrorist fan in a bun of a terminal and activity. But your environment. And if you type deep freeze, it will. So the list of Brighton packages that we have used to create this project and we leave this back it is to run our court on online. So we're going to cover this packages and get new file in our process. The duty call requirements dot t x d and best those because this name here now save it and we're ready to go. You know, nobody's first comment and vested on our best court. Or did you lose that it luminous allies hysterically is empty, get to positivity and after getting into your Did I get it? And, uh, you know, do legislate all of these files and Fuller's into the get Now copy this line off court and tested here and gob finish line and other vested in the best in Now it went, actually, do interview, get of user name and password. So go ahead and do that. The next thing you want to do is cover this line and bested inside the best. Now let's really push. All the scores in target are deposited. So it has been done. And we're going to go back to our guitar rep acidity and deficit. And you can see that our project as an opulently to it and also notice that you didn't have this nb directory never got the best fan. And I wonder laying this debris visit Harry to the court system says so you can easily modify toe. So in the next legs there were going to finally deploy a Django upon biting anywhere. So I appear excited 49. Deploying our project to pythonanywhere: 11 1 And in this electoral 100 iplayer our Denko contact was it to the fightin anywhere. And this is the simplest Mitchell to deploy our dangle prosaic online. So that's what Patton anywhere also in plus two dough. And I encourage you to create a part anywhere account and log into it. When you are locked in, you'll see a dashboard like in I found very helpful guide. And by fighting into a team that will in custody, play out the angle position on this baxam and already doesn't do our courses once is to. And so let us begin. Go to your dashboard and you knew best, Sil. I'm going to burn it in the new day and load a new Bassel inside of brother. So it hasn lorded here will get all of us that I inside our you'd have depositary to do that here to get alone this bears and God. But they don't want to get out of positivity invested here. And if you go back to your dashboard in a get file six and you can see that our then who conduct have been imported in convents, Allah project files and folders, so that's what get clone Common will do. Now we're going to create a botulin battlement inside this best cell. So I went to doing a little bit in fighting in religious and cable. Salim Takeda, Budget environment. So cover this line of court invested here but in place of different forum and used 3.7. This is the latest person off fightin in the name of your butts and environment in this case, um, into quality and be. And if you didn't added to actually create a button battlement inside baton anywhere now, I don't like sometimes. So wait for some minutes. Now it does. Don't creating only water environment for us and you can see when it has created the world's environment, it or the medically activated it. Now, if we Unless we have one file carded meat or text in a fuller called single contact So little city into general contacts using CD in Django contacts nine feet ls you can see we have all these files and we're going to install the packages that inside this requirement startext defend. So to do that, you have to type it, install space, does ah, in name off requirements not txt and you really actually stole all the baton practices that inside this sequence file. So again it, like sometimes so persons in return human years. So while it is in stunning, I want you to go to Brighton anywhere deaths word and inside the file six and go to a jingle context India instead, Element Brothers Fund that is, conduct directing Click on it and go to sitting Start by fire and we're going to done this Debra Cross dribble a little debacle cross waas and also ate all of those pollute That would be your name of use your name. In this case, I'm called Jenga Core so copied and vested here College debate that Brighton anywhere dot com because the single go start button in where dot com is a free domain option that is provided to us by biting anyway. And you can put your custom dominator, but I'm going to go with this dominance since. So the save button here. Now go back to your bassett and you can see that those libraries has been finishing stalling 11 clear of the sale by pressing control plus l. And now if it ls, it is showing us the full A structure in thing or context. And since you don't have that at this failure, we're going to get one. Using Fightin man is got by negative. Remember, we're in the dental contact. So we have. This is true this, minister, by found so that we can run this command and every tinta. It'll get that out of the stable for our models, and it will take some time to execute. So give it a few moments and you can see that our migrations has been applied. And now go to your dashboard and click on this Web button here. Now click and in a new way. And inside this type, it is seeing us to use a costume lover names. But if he had next to intellectual, use this thing, of course, that pattern into a dot com domain. But if you're interested, you can buy a new premium. Doman, Instal it here. But I'm going to skip it for now. In click next in, Select the mental configuration. Insolent patent 3.7. You're next now. It will actually create a way for our project so you can see desperate data one were present for us. And if you scroll here, you can see an awesome called what Chilean Be and remember, educated about Joe Lieberman in, it'll select interparty butts and moment give the name of the Western involvement. In our case, we have called it e and B. So if we write offs in the mathematical detect Albert Selena Environments and in the next lecture, we're going to sit about unless Theophile and our aesthetic files and we finally see this website comfortable life. 50. Managing WSGI and Static files: hello do on and in this electoral actually set about where we have been biting anywhere and button anywhere. Well, actually delete this project if it doesn't even say active for three months. And one thing I want to set up is that under your court 16 year click on this wst a configuration file on going to open it in a new directory and against your bonds off comments here and above this younger section, remove all of the comments and also remove this flat spot. Now select up to year and praise control plus backs less intellectually uncommon and also on comment this six and by pressing control villus blacks less. Now here we have to give the location off our project. In this case, go to your file six and on the button anywhere, and you can see that we have ah, for local general course. So we have to copy it and bested instead off my site. Also, we need to give the location off our setting start by fell. And if you go back to your file section and click on jangle contacts, that sitting start by fellow is inside gone back directory. So Kobe this contacts directly invested instead off my site now with the save button and were actually done with it. Now go back to the way we have set up six and and in place of aesthetic files section inside are you era interview era in type, class ist addict insulating their path, and we have to give the locus in office. Tadic smiles directly in this guest. Those aesthetic files are in Holmes lasting. Gore's last single contacts, and Mr Dick so covered this part here and bested inside it. No, that the tick box and the little a tip. Now, when I go back to this jungle, Gore's dot pattern every dot com was actually Swing Year. So I figure out the main problem was that in our WC a configuration file, yet I have set up our product acted wrong. If you go to our file 16 year, we can see that we have our for the stated Django contacts, not dangle course so should have to going to eat and copy it and bested in an WXIA configuration instead of younger cores. No, the say Burton and defense the pace again actually let us loaded. Now we're back through this jungle Gore start pattern in new dot com and you can see that our president is finally alive. So that's pretty exciting. And you can create a new account here. Less good one. So I went to college, Samir with his my name and give the password and its sign up button Any desert the medically cleared a new account for us. And if you log in with that account, we can t start using our ape from here. No, let issued it contact and getting a contact off. Done brown. And if a the grid option it is suing us, our masses successfully in just swing our contact. So if I click, any of them can instill, update and delete it directly from yet in little Celtic leaders. Super user for these deployed project and inside of bass ale. Clear up The sale in type Iten men is not by create super User and I want to call it Jungle Gore's So you didn't And then we skip them there, this part and give it to him. Passport and good. Faster. Begin now the login legato super user. Now, if you go to our jungle, Gore start fightin anyway dot com and this is streets Admin Banner using its last mean it'll actually gusto in Ben, but you cannot. This hour in panel is notice style, and that's because we have to run quality. Study comment to get all the aesthetic fells that in the admit fennel to toe. To do that, go to your dashboard of fighting anywhere inside the file. 16. Go to General Contacts and President Idea in this case, contact Anglican sitting struck by in below it inside. Aesthetic fails. I want to do it. Another sitting called is static on the score route and said, It's Pelloux to seem like aesthetic. First there room that trailing comma and near the sea. Burton. Now go back to your bass Ill in on fightin man is dot by call. It s static. It didn't, uh, and everything that you have requested to collect aesthetic files at the destination. Look at the specified in the settings, so I'm going to that be us toe. What are the existing files? You know, go back to a way of obstruction here and it, Lord. And if you go back to a context project in Goto's last Edmon. You can see our internal is also a styled and little slugging it our super user account in this case, Django Course. And give your password here and look into it. And again, See, we can control our contact that I waste directly from here to. And one thing if you know this is that it is using a city vehicle, Nixon instead off Scdp s connection with this most secure. So we're going to set up it so inside the way, with 60 below the security Hickson in Able days for sensitive Pius settings. Now let us Lord our music again. Now go back to your browser in deficit talking and now all the conditionally from estate Tapia's instead off STP. So that's it. We have finally brought our contact pros aide, and I hope it was very fun. And we have learned a lot about single. And from now on, you can create your own XanGo prosaic by yourself too. And if you're having in trouble, please let me know in the discussion forum 51. Managing Media Files: one day. Last thing I want to talk about is dead when you turn a day. Bucket was false. Xanga will not stop. The Medifast, that is, the aim is operated to its contact in your own pace. Tango opposite because while in production server, that is a deployed young Opacic when you turned a book because falls are so ever want people to use the Medifast. For example, when you go to Jenga, Gore start writing in where dot com, you can see that we have uploaded many contacts, but the images are not swing up, and we can fix that by going toe the websites and not a pattern anywhere and clicking on your way and is willing down to the aesthetic fells and inside. The study files were in section interview, Burial No types Last media slash any dente and again go to the file section off You're right and anywhere I'm going to open it in a new tab. Good to Oprah's ecstatic Tree in to the Media Directory, and you can see that our media files are Apple in this folder, so ever to copy the part off this folder and go back to the Web sex and are fighting anywhere and inside the barrel off media it inter vat and fisted idea. And when it is done in the real Lord button now, when it is done, go back to this link and you can see that our images is loading correctly. So that's how you can see the media fasten biting anywhere. And I'm glad that you made to the end of the course, and I want to thank you for watching up to this lecture.