home / blog / Some details about Django framework

Some details about Django framework

Oct. 27, 2024

by Mohamed Ibrahim

#
Let's talk a little about Django and how many things are being done, God willing, that will be useful to you. How many things are there that I need to know because these will be considered interview questions? And you also know them, but you may not know the name as a senior Django developer. Look, sir, let's put them in order. Let's look like this. What does it mean? CRUD Look, sir, they are * Detail or Read * Update * Create * Delete

Ok, so you have Redirect This is simply after you execute a specific action in Update, Create, and Delete Instead of doing retrun render, you do retrun Redirect This is the first benefit of it The second thing, if you have, for example, a url that is not working, but there is still a request for it, you can put this in your code and it will take you to the language you need immediately You also need to know all the types of the Django Model Field Types example: charfield, imgfield, textfield And other types And you need to know * Model Field Validation * Model Field Choices

Of course, if we wanted to talk about them, it would take a lot of time, but I will post a post about Validation in django. After that, you need to know a little about Forms & Formsets. You know how to make Forms, you have a renderer in your template, and you take the information in it. Of course, there is more than one way: you create a form with them, make it a renderer, and ignore it. Something that you can use with a bootstrap to make it beautiful and attractive for you. Let's go to the template and the Django Templates filter in it. You can create a filter for your information, or you can do it from the view, of course, according to the request. You specify the period in which you work, and of course For Loops & Cycle is known for it. You also have if, you need to know how you can benefit from it. For example, you can make a loub first and with dough, you can do if and not, and then a loub. Of course, each method has one of them and it has its own request, but I wanted to get to know you, but not After that, you have a Django User Model, which has a lot to say about it

Come on, we will get them as they are. Extend User Model: This is simply that I will modify the same model. I will not add a new model and link the Yuse to the Custom User Model. This is simply that I will create a new model linked to the froenkey of the user. Register User User User Login & Authentication User Logout and well-known countries that I do not understand. A lot of talk: User Login with Username or Email This does a function instead of doing a loop on the user, but it works on the user and this mile. You can do it as a view or do it as a Validation in the model. The search will be faster and smoother. This Inactive User is known. If Inactive, he will not be able to log in if all are active. Something will happen naturally. Of course, you can add disable. This will be recorded and everything, but some operations will be restricted. You are at your leisure and see what you need to do with it. Of course, class based view and funcation based view. You must know the difference between them and planting them with the dragon will be better and there is also how to castomize on admin panel. This is something you must search for and it has many benefits. If you do not build a new admin panel, you must know the difference between makemigrations and migrate. There are some things that I did not explain here because I want, my friend, the person to search for them. And you will see how you can reach. I hope you benefit from the post. Happy New Year 🤍

Django

Best offers in your inbox