This is one of the best, most straightforward and helpful tutorials I've come across! Liked and subscribed. Cheers.
@FreeDomSy-nk9ue3 жыл бұрын
YOU ARE AWESOME. You truly understand what's going on, hence explaining it thoroughly. Thank you
@brucemarshall63884 жыл бұрын
Although there are some problems(all solved now:), this is a helpful video, clear and simple. Thank you sir!
@md.abdullahalmamun1174 жыл бұрын
There is a module which has been deprecated for django update version. Such as, In "urls.py" "from django.contrib.auth.views import LoginView" should be added or it won't work and in "urlpatterns" of "urls.py" " path('login/', LoginView.as_view(), name='login')" path should be added like this. If anyone is watching this tutorial now then, they have to make this slight changes for making the code work perfectly. Thank You. And this was an awesome journey with @The Dumbfounds
@techyguys43944 жыл бұрын
It is just the best full video on internet on auth topic thank you so much
@TheSirgo234 жыл бұрын
Simplest and best tutorial Ive seen about DRF auth thx man
@muzehub48024 жыл бұрын
perfect tutorial, simple and efficient way to teach.
@vladotrocol11555 жыл бұрын
Very simple and clear video! Thank you for your work!
@thedumbfounds7675 жыл бұрын
Welcome!
@UBLAunripped3 жыл бұрын
Really good -- thank you. We loved your SA Accent
@yousufm.n25153 жыл бұрын
Great tutorial series!
@grijeshmnit5 жыл бұрын
Very helpful. Thanks
@teejaay_me6 жыл бұрын
Nice, I am following this series.
@thedumbfounds7676 жыл бұрын
Tam Xid great, hope you've liked it!
@5up5up4 жыл бұрын
That's a great tutorial. Thank you sir.
@UBLAunripped3 жыл бұрын
We were just a little confused about what API requests are needed for a NEW user registration -- in your video you created and used the superuser -- would love to know how to do it for a brand NEW user via http - thanks
@lolitalolita52902 жыл бұрын
Do you have any video login in with dja go rest api and volley ?
@x4iiiis5 жыл бұрын
Hey! Just wondering if you might be willing to make a short video about how you might go about using this externally? Perhaps a small java application that would post something to the site via the API? I have used your videos to create my API (thank you!), and would like to be able to use it in this way in future - possibly for game leaderboards and such like.
@dominiclee38093 жыл бұрын
what do you mean by externally? if you are referring outside of localhost you would have to deploy your backend to cloud using heroku or AWS
@whichdude4204 жыл бұрын
So is this a way to make the REST API to only be accessible by a specific web app or mobile app?
@sangayvlogs43286 жыл бұрын
thank you so much for the video. bu i got problem that says ImportError : cannot import name 'login' .
@thedumbfounds7676 жыл бұрын
what's your code?
@sangayvlogs43286 жыл бұрын
urls.py/rest_tutorial from django.contrib import admin from django.urls import path, include from .router import router from rest_framework.authtoken import views from django.contrib.auth.views import login urlpatterns = [ path('snippets/', include('snippets.urls', namespace='snippets')), path('admin/', admin.site.urls), path('api/', include(router.urls)), path('api-token-auth/', views.obtain_auth_token, name='api-token-auth'), path('login/', login, name='login') ] login.html/registration/templates/rest_tutorial {% csrf_token %} {{ form }} Login settings.py/rest_tutorial TEMPLATES = [ { 'DIRS': [[os.path.join(BASE_DIR, 'rest-tutorial/templates')],], }
@thedumbfounds7676 жыл бұрын
try using django.contrib.auth.LoginView instead (it's a CBV). The authentication FBVs are or will be deprecated and removed.
@sangayvlogs43286 жыл бұрын
@@thedumbfounds767 thank you it worked.
@thedumbfounds7676 жыл бұрын
@@sangayvlogs4328 you're welcome!
@amjadelbaba72143 жыл бұрын
how can I make the same thing in authentication token, but from a table in my database not the super user table?
@artemsymcov39803 жыл бұрын
how to allow new users to register? they don't have password and login yet to get token... ?
@mohammedbayomy61543 жыл бұрын
what do you mean by making sure api is under https when using token authentication otherwise people will sniff netwrok
@thedumbfounds7673 жыл бұрын
HTTPS means that the connection is encrypted. If the connection is not encrypted (HTTP only), middlemen can just grab the packets you're trying to send and read their content which you don't want. Have a look at TLS/SSL if you want to better understand this subject.
@RichardSoderblom6 жыл бұрын
Great video! Thanks
@thedumbfounds7676 жыл бұрын
Thanks Richard!
@TalhaHasanZia5 жыл бұрын
I was thinking of sign-up a user using REST, for this I wanted to create a POST endpoint and call users.create of django models. It works fine when i run script on server. But how can I create a POST call , with BASIC AUTH, so that when I register a user, it can goto django-admin user table? TL;DR: How to create a POST api for register user that saves user to django users table?
@shansodhara65804 жыл бұрын
How to maintain both authentication for mobile app clients and web app clients, while using http in url, session authentication was working for both mobile and web, after changing to https with ssl configured in Apache web server. Web only working, from mobile apps after login getting 403 error. ... Thanks
@theqjao5 жыл бұрын
Hi professor, nice video, i'm still getting this error, can u help me please ?, 'BasePermissionMetaclass' object is not iterable
What even are you saying at the very start of the video? Legit I hear so many things at the same time but none make any sense. Great and wel explained video though!
@thedumbfounds7674 жыл бұрын
Heyaho po day is going great (aka. "Hey, I hope your day is going great") ;)
@sundar80325 жыл бұрын
Great work :)
@thedumbfounds7675 жыл бұрын
Thx!
@EddyCaffrey6 жыл бұрын
Thanks bro. Great job
@thedumbfounds7676 жыл бұрын
thank you Edi!
@santhoshkumar-uj4tx4 жыл бұрын
I got the Token and if i make an http call without the token in header, still its returning 200 success status.. is that the right behavior? Can anyone help me on this?
@miguelrohv56436 жыл бұрын
Bro. Can i ask... when i created the registration folder with login.html under rest-tutorial>templates... it says templatedoesntexist.... but when i move the registration folder with login.html to snippets>templates. It works, what did i miss?
@miguelrohv56436 жыл бұрын
Also great vids! Subbed ^^
@thedumbfounds7676 жыл бұрын
miguel rohv By default, django only looks for templates inside of your apps, not in the main folder. If you want to change that, go to the settings under templates, and set DIRS = [os.path.join(BASE_DIR, 'rest-tutorial/templates/')]. Hope that helps!
@thedumbfounds7676 жыл бұрын
miguel rohv and thanks for the sub!
@miguelrohv56436 жыл бұрын
it works! thanks a plenty bro!
@thedumbfounds7676 жыл бұрын
miguel rohv you're welcome!
@animeshtimsina36605 жыл бұрын
You used httpie...Is it a 3rd party program and if so, are there other services that I can use?
@thedumbfounds7675 жыл бұрын
Yes, it is a free command line utility. Check this out for alternatives: alternativeto.net/software/httpie/
@white.wolf12235 жыл бұрын
you can use POSTMAN its very popular
@tejasmankar716 жыл бұрын
how to add REST API in form or how to add serilization in form.py for using html page? can you plz make the videos to call api from html page ?
@thedumbfounds7676 жыл бұрын
You just have to use javascript in your html template with something like the fetch api or jquery ajax if you are using jquery.
@tejasmankar716 жыл бұрын
The Dumbfounds can you plz suggest any videos ?
@thedumbfounds7676 жыл бұрын
@@tejasmankar71 just look up django ajax javascript on google and you should find some examples
@miltonweinhold68594 жыл бұрын
oauth2?
@husseinsaad79696 жыл бұрын
wait for next video :)
@thedumbfounds7676 жыл бұрын
Nice! Which videos would you like to see in the future?
@husseinsaad79696 жыл бұрын
I wanna complete this series(REST framework), it is perfect ... keep going!
@thedumbfounds7676 жыл бұрын
thanks for the kind words! For now, there is going to be one more part about filtering. But maybe I'll extend this series in the future (after the TDD series) to include, for example, a video about testing your REST API :)
@ashishrock95853 жыл бұрын
How to call in browser
@ГеоргВартанов6 жыл бұрын
thank you. like
@thedumbfounds7676 жыл бұрын
thanks Georg!
@turbokev37725 жыл бұрын
DEPRECATED!!! ImportError: cannot import name 'login' from 'django.contrib.auth.views'
@thedumbfounds7675 жыл бұрын
Use the generic class based view called LoginView instead.
@turbokev37725 жыл бұрын
@@thedumbfounds767 Yes thank you. I see that now. Thank you for your tutorials. I apologize for the tone I get frustrated coding sometimes.