Join my free course on working with the database and models in Django: prettyprinted.com/djangodata
@CrackerWeb3 жыл бұрын
Very strait forward explainers, great. 16:45 this is very important step you explain in just 2-3 second, I bet most of the people miss that
@dillibabu4757 Жыл бұрын
Will u help me I have error in login page He was not create login page path so how it was run pls reply me 😢
@haroldpepete4 жыл бұрын
Great, straight to te concept and example, you earn a new subscriber
@mzgz42167 жыл бұрын
cant wait to see you upcoming videos
@MrEdersonlima7 жыл бұрын
Omg, these videos are really helping me a lot, please continue with these videos with django, they're excellents!!!
@prettyprinted6 жыл бұрын
I'm glad they're helping you. Thanks for watching.
@robinkovacic79614 жыл бұрын
Very good explanation, really helped me understand how django auth works. Thank you!
@srajanjain32203 жыл бұрын
Really amazing explanation! Thanks.
@fmkikomina4 жыл бұрын
Nice video, I was looking for that future video, couldn't find it
@alialkhulaifi24233 жыл бұрын
Awesome Explanation! Thanks alot :)
@muralidhar402 жыл бұрын
06:35 What does {%if next%} in jinja2 do?
@bhushanpathrikar60454 жыл бұрын
Damn great plz keep making video on entire django
@Asgallu3 жыл бұрын
Great video!
@jackli25304 жыл бұрын
hi, this is a brief but good lesson, however, I'm confuse in code "if next" in index.html, I try google but still stuck, would u please get me a hint? thanks
@Ryuuun4 жыл бұрын
next is a variable in the URL that holds the page user trying access but if you put @login_required above the function in views.py, then the user would be redirected to login page to login before being able to access the original page. say if I want to visit example.com/profile but I need to log in to view the page django will redirect me to /accounts/login?next=example.com/profile once you login djang then redirects you the the next URL which is profile. hope that's helpful, happy coding!
@omparikh44264 жыл бұрын
Ryan Hu does this redirect if have some REDIRECT_URL in settings.py ?
@SimonYells4 жыл бұрын
A perfect tutorial. Thanks !
@letoan2857 жыл бұрын
Looking forward to your next videos with Django 2.0++. could you please make video with path parameters as slug/id ?
@prettyprinted7 жыл бұрын
That's a good idea for a video. I'll see what I can do.
@TomislavMiletic4 жыл бұрын
Do you have a video with more details on authentication?
@mzgz42167 жыл бұрын
Anthony thank you very much. your videos in django2 are the best on youtube . man how about custom authentication . what if i want to register users with phone numbers or email ?
@prettyprinted7 жыл бұрын
I'm going to cover that as well. I just don't want the videos to be too long covering a single topic.
@mzgz42167 жыл бұрын
Pretty Printed man i wish you accept my friendship . your efforts are appreciated by all of us . and uli wonder why you didnt start with django tutorials long time ago . im waiting for you videos . i wish to ask you .. how you see jobs demand for django developers . man i tried with php and asp with no success . and i found that my mind only accept python . tell me your thoughts ..
@prettyprinted7 жыл бұрын
There are plenty of jobs for all of the popular frameworks. I don't know what it's like in your area, so I'd try talking to local programmers.
@mzgz42167 жыл бұрын
Pretty Printed what about remote jobs .. do you think remote jobs would enough for a man to sattled ..
@prettyprinted7 жыл бұрын
Oh yeah, I'm sure there are plenty of remote jobs for any stack you write code for, but I imagine it's harder to get a remote job.
@gonzalomcordovez3 жыл бұрын
fantastic video, thank you so much man :) helped me a lot
@mayanktripathi4u4 жыл бұрын
Hi, Could you please share some detail or video tutorial on how to handle multiple user types. For an example... a group of people (like Managers) has access to approve leaves of group of people (like Employee). I mean Managers has access to Approve.. where as Employee will not have. They can just apply for leave.
@chawza84024 жыл бұрын
what does authenticate() does? I use the similar way as you do but in login view. but the authenticate() function always return None. when should I authenticate the user? in the Login or registration? on my site after registraion, I want the user to go back to the login.html
@derekkroeker45823 жыл бұрын
How to make login form for different types of user positions?
@eneko45625 жыл бұрын
Could I change the language for example ,to spanish ,of all those help messages if I wanted? what do I have to do?
@matrixdexter2706 жыл бұрын
you should do a chartjs and django combo..everybody has been searching for this with a good explanation. you give the best anyway.kindly share the sourcecode
@prettyprinted6 жыл бұрын
I'll consider that. Thanks for the idea.
@dellapatricia89554 жыл бұрын
Hi, my registration form is not showing on my registration page. Could you tell me why?
@kutluaydn15083 жыл бұрын
I have custom user model. How can I authenticate for it?
@OthmaneLh0016 жыл бұрын
this was the hardest video to understand but I did it and I understand it, Thank you Anthony :)
@prettyprinted6 жыл бұрын
Glad you understood it. Thanks for watching.
@АнатолийЮров-ж9л3 жыл бұрын
An interesting proposal is possible, but it is not so easy to understand all this without knowing the language. Moreover, it is necessary to take into account my knowledge and ability to use all the possibilities of the presented program. But the ability to work on a computer is also important.
@michaelkennedy51265 жыл бұрын
thanks for making this tutorial, very useful
@prettyprinted5 жыл бұрын
You're welcome! Thanks for watching.
@faraazali95894 жыл бұрын
how do you authenticate with active directory user credentials?
@axiomvp78086 жыл бұрын
Best login tut i have found on django and iv watched a few now. Most use bs methods. Please do that detailed video you spoke about :)
@prettyprinted6 жыл бұрын
Thanks! I'll definitely make that video soon.
@gautampramod17344 жыл бұрын
Hey .. when u move to the admin page.. u were logged out of admin..saying u are not staff. Coz the user we created was is_active=true.. and i thik all usr from login is same.. how to get rid of such screen in the admin panel.. and when u group the user i think its not possible for evrtym when new user registered wil be grouped by admin.. i need help please.. i want to do the project😭😭😭
@AjitKumar-ul2ku5 жыл бұрын
hii , i have to get logina and logout time for the user through signals or any other way please help me
@victorfariaaa4 жыл бұрын
Is it mandatory to use the django's default authentication users table for a project? I mean, if I want to a separate table for my users instead, is this possible? Using the same table that manage the admin users couldn't be a security issue? Thanks. Your videos are awesome.
@prettyprinted4 жыл бұрын
You don't have to use the default table. But I don't think it's a security issue to use it.
@dude-ox2em4 жыл бұрын
Register works fine for me but login fails hehat to now?? pls help me out Anthony
@jokessamp54384 жыл бұрын
ModuleNotFoundError: No module named 'authenticate.view' if someone can help me please ?
@mr.samarthahegde57855 жыл бұрын
You are using function based views, how to make authentication with class based views and without django templates? what i mean to say is HTML pages should not define in django project instead make it available outside the project and access it by AJAX, is it possible?
@tripathi51744 жыл бұрын
Sir what if we have a admin and I want to delete that admin and create a new superuser, will all the data of my project or website will be lost or the actions performed by the previous admin will be lost? or there will be no change at all if i create a new super user with different name and password please help i am not able to access my previous admin and i am getting an error called as User.profile.RelatedObjectDoesNotExist: User has no profile. Please reply sir
@LexPodgorny5 жыл бұрын
Hello, thank you for your tutorials! They are very helpful. Question: I need to send a new user an invite link to registration with a temp password in it. How do I integrate temp passwords into this system?
@mateuscastanho72024 жыл бұрын
how can I add some botstrap on the input ???
@NikitaDharmadhikariNikki4 жыл бұрын
is there any way to activate users account via an activation email?
@mdwaseemahmad42563 жыл бұрын
How "any user can't see another users posted data" in django?
@NiroKun236 жыл бұрын
Hey! Thanks to you i now can use authentication, but now i have some troubles with social media logins. I'm using this tutorial "allauth", but i can't do it. It seems that have troubles with some templates? Because i can't even login.
@prettyprinted6 жыл бұрын
I do plan on making an allauth tutorial, so look out for that.
@aldrinsaurovsarker51594 жыл бұрын
I wasted half of my day to find out why my login form isn't being shown and realized it won't show unless I write 'form = UserCreationForm()' in the views.login part. Idk why it worked for you ; maybe because of versions.
@B2EO3 жыл бұрын
i wasted 1 hour >.
@sisyphus_6197 жыл бұрын
thank you very much. i look forward to your next videos. are you going to do a tutorial on React and Django?
@prettyprinted7 жыл бұрын
React will be sometime in the future, yes. Once I cover it, I'll cover it with Django and other backend frameworks.
Hi I'm using google firebase as authentication. How can I pass firebase generated token to django auth or how can I check whether the user logged in through google firebase. Thank you
@Babaa_6 жыл бұрын
Page not found (404) help, my register isn't working. This what I get. Request Method: GET Request URL: 127.0.0.1:8000/register Using the URLconf defined in MusicStack.urls, Django tried these URL patterns, in this order: admin/ [name='index'] new/ popular/ account/ accounts/ The current path, register, didn't match any of these.
@giridharjadala21823 жыл бұрын
totally worth it !!!
@antina3146 жыл бұрын
Great job! :) Nice introduction to django auth.
@prettyprinted6 жыл бұрын
Thanks for watching!
@xtremehackerzpro95117 жыл бұрын
Great video again, Django also provides custom backend auth, for example, email auth... please make next video about authorization (permission groups) :-) Pss.. else after return redirect is unnecessary ;)
@prettyprinted7 жыл бұрын
Yeah, you're right about the else. In my mind I was thinking explicitly about difference between GET and POST, but if it's a GET request, the POST block wouldn't be run. I'll definitely cover authorization. Thanks for the idea.
@satisharvapalli34576 жыл бұрын
Thank you Anthony for your amazing stuff, can you help me to create virtual environment.
@Alex-gn7xk6 жыл бұрын
How can i Change That Registration text helpers ??
@juliavanderkris51566 жыл бұрын
Holy shit, Django is so awesome! Thanks for this tutorial, dude! Just one thing: is there an easy way to add more information to the user table? Like settings and stuff like that.
@prettyprinted6 жыл бұрын
One way is to create another table that will have a relationship to the user table. I'll probably make a video on that in the future.
@marcelaguiar68156 жыл бұрын
When is the more in-depth sequel coming out?
@prettyprinted6 жыл бұрын
Hopefully soon. I have to plan out the next videos I'm going to make.
@dillibabu4757 Жыл бұрын
Bro without creating login page path how it was run😢
@mohamedabdiazizhassan50566 жыл бұрын
login required is not working djongo plz help me to mkae it work
@OHOTOLEable7 жыл бұрын
Could you make a video about signals?
@prettyprinted6 жыл бұрын
I'll take that into consideration. Thanks for the idea.
@kenjohnsiosan97076 жыл бұрын
thanks for this tutorial sir :) keep it up
@prettyprinted6 жыл бұрын
Thanks, I appreciate it!
@varunsharma22005 жыл бұрын
Its really helpful. Thanks
@prettyprinted5 жыл бұрын
Glad I could help. Thanks for watching!
@dilipmaharjan34636 жыл бұрын
How do I make the user admin or other roles when registering?
@prettyprinted6 жыл бұрын
You'd have to modify the form (or put some code in your view to handle it). I can cover that in a future video.
@dilipmaharjan34636 жыл бұрын
Thanks.
@rebekawa5 жыл бұрын
Hi, can I access you code somewhere? I don't find it in your git repositories
@prettyprinted5 жыл бұрын
I usually don't host code for conceptual videos, but I do have all the code from my videos on my computer. If you want me to send it to you, just email me at anthony@prettyprinted.com
@sidyka65686 жыл бұрын
Wao great video Pretty Printed. Thank for this instructive video.
@prettyprinted6 жыл бұрын
You're welcome! Thanks for watching.
@sunilrajput51494 жыл бұрын
it's really helpful, thanks :)
@GamerFardin6 жыл бұрын
When I press 'login" it redirects me to the same page again, I suppose it is because I am using django 2.1
@prettyprinted6 жыл бұрын
Do you have cookies enabled?
@GamerFardin6 жыл бұрын
Most probably yes and if thats a problem well I managed to solve this problem after a few lucky guesses and I suppose the whole problem would've been solved if I just disabled cookies
@abcefg90086 жыл бұрын
@@GamerFardin how did you solve it please
@abcefg90086 жыл бұрын
@@prettyprinted i have the same probleme Sir
@GamerFardin6 жыл бұрын
In the login.html file in line: I change the the action="{% url 'login' %}" into action="{% url 'home' %}" and I created a new path in my urls.py file which was: path('home/', views.index, name="home") and then I went to the views.py folder and defined a new function called index and added the following codes: if request.user.is_authenticated: return render(request, "myapp/index.html", {'context': request.user}) elif request.method == "POST": username = request.POST.get('username') password = request.POST.get('password') user = User.objects.create_user(username=username, password=password) user.save() a = authenticate(username=username, password=password) if a is not None: login(request, a) return render(request, "myapp/index.html", {'context': request.user}) else: return HttpResponse("something went wrong") else: return redirect("loginerror") of course you might need to make some more adjustments to this code to suit your website but I hope this helps!
@vinayaksinghsendhaw89033 жыл бұрын
Please provide code of this video in zip format , actually github do not show download code in zip , that's why it is so confusing to arrange files ,
@raoufm24286 жыл бұрын
Thank you so much you saved my life
@prettyprinted6 жыл бұрын
Glad I could help!
@raoufm24286 жыл бұрын
^_^
@manutheitguy7 жыл бұрын
Hey! what terminal are you using?
@prettyprinted7 жыл бұрын
I use Ubuntu on Windows.
@Raj_Patel215 жыл бұрын
Thanks for the video :)
@prettyprinted5 жыл бұрын
You're welcome! Thanks for watching.
@ArtsemLisouski6 жыл бұрын
Pls help me, i need to add email, name and surname but i do't know how (
@laluluhur43246 жыл бұрын
what version ur Django ?
@prettyprinted6 жыл бұрын
At the time of making this video, Django 1.0.
@code-dredd5 жыл бұрын
@@prettyprinted It's 2.0, not 1.0.
@prettyprinted5 жыл бұрын
@@code-dredd lol yeah, you're right. I typed that without looking haha
@llamasarus16 жыл бұрын
What happened to password hashing?
@prettyprinted6 жыл бұрын
It's done by the UserCreationForm.
@mahamata.25844 жыл бұрын
it's pretty cool Mr
@prettyprinted4 жыл бұрын
Thanks for watching!
@SocratAz6 жыл бұрын
For those looking for the source code, here I am copied, thank you to you Pretty Printed github.com/alexandrebouttier/django-authenticate
@lilredbb21825 жыл бұрын
why is everyone using the buildin auth user model while the model dost not save user's cellphonenumber ...which is not very realistic to todays' App
@prettyprinted5 жыл бұрын
This is just an example, but I'll try to make an example that includes cell numbers.
@lilredbb21825 жыл бұрын
@@prettyprinted ah,o didnt expect you'll response, thanks for your work. expecting to the new ones.
@sorenchannel426 жыл бұрын
It is quite too fast for me.
@prettyprinted6 жыл бұрын
The great thing about videos is you can rewatch them. :)
@sachitad5 жыл бұрын
If you guys are looking for facebook login in django, here is the tutorial: kzbin.info/www/bejne/hqW5pmNqi5VlbcU
@skatenerdify5 жыл бұрын
why are you going by so fast? wtf bro
@hesamramezani42373 жыл бұрын
wow
@shmuel-k6 жыл бұрын
zhango
@prasaddalavi96836 жыл бұрын
who are you man!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!