Messages and Includes - Django Web Development with Python p.7

preview_player
Показать описание
Welcome to part 7 of the web development with Python and Django tutorial series, where we'll be covering messaging and continuing to cover handling for users within our web app by popping up messages to the user, changing the navbar depending on if they are logged in or not, as well as showing the use for includes in Django templating.

Рекомендации по теме
Комментарии
Автор

I just wanted to say that I really like that sometimes your code doesn't work and we can witness your process as you debug. Some people would just cut the video and patch in a recording without the debug problems. I really appreciate the way you do it and don't see your live debugging as a negative at all! I also like that you look up documentation live and voice your thoughts about whether certain things will work or not. Anytime you can expand on why you are writing the code you are, its like getting into the mind of an experienced dev and helps me learn how to think.


Keep doing what you're doing!

Hassole
Автор

Awesome man..for me the mantra is....".sentdex+django documentation=success"!

abhishekdeshmukh
Автор

Thank you so much! It's relaxing and satisfying to follow your tutorials!

shuhangzhan
Автор

It would be great if you could teach how to add a Deep Learning model inside a django application..Thanks!

sandtiwa
Автор

for the password error part it only shows password mismatch even if the password is too short, just put your own version of the error message in the "{{message}}" part and it will show that instead for example
"your password don't match or is too short, please check and try again" otherwise great video guy, always keeping it buck!!!

darkseid
Автор

Really, how many Mugs do you have? Does it contain sponsorship? :))

azdps
Автор

for msg in form.error_messages: will just iterate over the static error_messages dictionary baked into the UserCreationForm class. this will return "The two password fields didn't match" when there's an error whether it is or is not the actual error. to generate a message with the actual error for msg in messages.error(request, instead. that'll create a message with the actual error affecting the form. you can browse the django/contrib/auth/forms.py file to inspect how errors are actually generated w/ ValidationError

lightweightpaint
Автор

Congrats for your channel, i really appreciate your work!

facundosierra
Автор

Why don't you use user.get_username() on 5:07 ?

skorpimish
Автор

Thank you Bro.. your tutorial is awasome

himasankaracharik
Автор

How did the template access the "messages" list if it was not in the context ?

prateekgurjar
Автор

First of all, thank you so much for sharing this knowladge, I'm subscribing and liking your content ASAP.
You don't have to do this, but could you also teach us how to add a Deep Learning model inside the django application. Again thank you for you videos and colorful mugs.

josephdisraeliomenda
Автор

I have this question we didn't pass messages variable in register function context but was still able to use messages variable in header.html?

unnatsingh
Автор

Hi dear! coud you tell me which Editor are you using here?

rssh
Автор

you used {% if user.is_authenticated %} in the navbar.html file
can u explain from where did we get the user object !? and what are the fields in it beside username

هانيالعتيبي-قذ
Автор

i get this error called (maximum recursion depth exceeded
) when i make new files for the messaging and navbaritems . i again copied the messaging and navbaritems code into header.html file and tried its working then but not when i make different files. i tried searching for the solution but helpless. what could be the reason?

shubhamagarwal
Автор

Thx,
I was so happy if u discuss more on user model.
BTW thx😀

mahdijafaree
Автор

Hey sentdex I just want to say I love your tutorials and I'm picking this up at a killer pace, however when on this step for django I'm hitting some errors with the messages.
For example, I'm using the lines for messages.success(request, f"New Account: {username}") gives an error because of the preceeding f before the message, and if I omit the f the message works but doesn't display the name. The message shows but it reads New Account: {username}. Same with the error area, it is only displaying the full text {msg} : {form.error_messages[msg]} rather than any actual message. I'm using python 3.5.3, and installed django version just recently 2.2.1. Could there be an issue because of this?
Thanks in advance!

tbjasun
Автор

How to display those info text during registration[signup] to be display after any user didn't pass validation while registring.
It appears by deafult, which I don't want to appear. How to fix it?

esportsnexus
Автор

I wanna ask you something how you know each and every methods in every class and each function inside django or Tenserflow or any python library....and do we need to know all this does this have any effect on how good developer we are ???? this really annoying me because when ever I see any tutorials on youtube people usually almost know that this class have this exact method

ConnorAZ
visit shbcf.ru