Django REST API Tutorial - Token Authentication and Session Authentication #3 (2018)

  Рет қаралды 81,400

The Dumbfounds

The Dumbfounds

Күн бұрын

Пікірлер: 74
@harperjmusic
@harperjmusic 4 жыл бұрын
This is one of the best, most straightforward and helpful tutorials I've come across! Liked and subscribed. Cheers.
@FreeDomSy-nk9ue
@FreeDomSy-nk9ue 3 жыл бұрын
YOU ARE AWESOME. You truly understand what's going on, hence explaining it thoroughly. Thank you
@brucemarshall6388
@brucemarshall6388 4 жыл бұрын
Although there are some problems(all solved now:), this is a helpful video, clear and simple. Thank you sir!
@md.abdullahalmamun117
@md.abdullahalmamun117 4 жыл бұрын
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
@techyguys4394
@techyguys4394 4 жыл бұрын
It is just the best full video on internet on auth topic thank you so much
@TheSirgo23
@TheSirgo23 4 жыл бұрын
Simplest and best tutorial Ive seen about DRF auth thx man
@muzehub4802
@muzehub4802 4 жыл бұрын
perfect tutorial, simple and efficient way to teach.
@vladotrocol1155
@vladotrocol1155 5 жыл бұрын
Very simple and clear video! Thank you for your work!
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Welcome!
@UBLAunripped
@UBLAunripped 3 жыл бұрын
Really good -- thank you. We loved your SA Accent
@yousufm.n2515
@yousufm.n2515 3 жыл бұрын
Great tutorial series!
@grijeshmnit
@grijeshmnit 5 жыл бұрын
Very helpful. Thanks
@teejaay_me
@teejaay_me 6 жыл бұрын
Nice, I am following this series.
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
Tam Xid great, hope you've liked it!
@5up5up
@5up5up 4 жыл бұрын
That's a great tutorial. Thank you sir.
@UBLAunripped
@UBLAunripped 3 жыл бұрын
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
@lolitalolita5290
@lolitalolita5290 2 жыл бұрын
Do you have any video login in with dja go rest api and volley ?
@x4iiiis
@x4iiiis 5 жыл бұрын
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.
@dominiclee3809
@dominiclee3809 3 жыл бұрын
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
@whichdude420
@whichdude420 4 жыл бұрын
So is this a way to make the REST API to only be accessible by a specific web app or mobile app?
@sangayvlogs4328
@sangayvlogs4328 6 жыл бұрын
thank you so much for the video. bu i got problem that says ImportError : cannot import name 'login' .
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
what's your code?
@sangayvlogs4328
@sangayvlogs4328 6 жыл бұрын
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')],], }
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
try using django.contrib.auth.LoginView instead (it's a CBV). The authentication FBVs are or will be deprecated and removed.
@sangayvlogs4328
@sangayvlogs4328 6 жыл бұрын
@@thedumbfounds767 thank you it worked.
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
@@sangayvlogs4328 you're welcome!
@amjadelbaba7214
@amjadelbaba7214 3 жыл бұрын
how can I make the same thing in authentication token, but from a table in my database not the super user table?
@artemsymcov3980
@artemsymcov3980 3 жыл бұрын
how to allow new users to register? they don't have password and login yet to get token... ?
@mohammedbayomy6154
@mohammedbayomy6154 3 жыл бұрын
what do you mean by making sure api is under https when using token authentication otherwise people will sniff netwrok
@thedumbfounds767
@thedumbfounds767 3 жыл бұрын
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.
@RichardSoderblom
@RichardSoderblom 6 жыл бұрын
Great video! Thanks
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
Thanks Richard!
@TalhaHasanZia
@TalhaHasanZia 5 жыл бұрын
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?
@shansodhara6580
@shansodhara6580 4 жыл бұрын
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
@theqjao
@theqjao 5 жыл бұрын
Hi professor, nice video, i'm still getting this error, can u help me please ?, 'BasePermissionMetaclass' object is not iterable
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
stackoverflow.com/questions/53649252/django-rest-framework-basepermissionmetaclass-object-is-not-iterable
@aminamjadism4826
@aminamjadism4826 5 жыл бұрын
Thanks
@kilianlegters8183
@kilianlegters8183 4 жыл бұрын
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!
@thedumbfounds767
@thedumbfounds767 4 жыл бұрын
Heyaho po day is going great (aka. "Hey, I hope your day is going great") ;)
@sundar8032
@sundar8032 5 жыл бұрын
Great work :)
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Thx!
@EddyCaffrey
@EddyCaffrey 6 жыл бұрын
Thanks bro. Great job
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
thank you Edi!
@santhoshkumar-uj4tx
@santhoshkumar-uj4tx 4 жыл бұрын
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?
@miguelrohv5643
@miguelrohv5643 6 жыл бұрын
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?
@miguelrohv5643
@miguelrohv5643 6 жыл бұрын
Also great vids! Subbed ^^
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
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!
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
miguel rohv and thanks for the sub!
@miguelrohv5643
@miguelrohv5643 6 жыл бұрын
it works! thanks a plenty bro!
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
miguel rohv you're welcome!
@animeshtimsina3660
@animeshtimsina3660 5 жыл бұрын
You used httpie...Is it a 3rd party program and if so, are there other services that I can use?
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Yes, it is a free command line utility. Check this out for alternatives: alternativeto.net/software/httpie/
@white.wolf1223
@white.wolf1223 5 жыл бұрын
you can use POSTMAN its very popular
@tejasmankar71
@tejasmankar71 6 жыл бұрын
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 ?
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
You just have to use javascript in your html template with something like the fetch api or jquery ajax if you are using jquery.
@tejasmankar71
@tejasmankar71 6 жыл бұрын
The Dumbfounds can you plz suggest any videos ?
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
@@tejasmankar71 just look up django ajax javascript on google and you should find some examples
@miltonweinhold6859
@miltonweinhold6859 4 жыл бұрын
oauth2?
@husseinsaad7969
@husseinsaad7969 6 жыл бұрын
wait for next video :)
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
Nice! Which videos would you like to see in the future?
@husseinsaad7969
@husseinsaad7969 6 жыл бұрын
I wanna complete this series(REST framework), it is perfect ... keep going!
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
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 :)
@ashishrock9585
@ashishrock9585 3 жыл бұрын
How to call in browser
@ГеоргВартанов
@ГеоргВартанов 6 жыл бұрын
thank you. like
@thedumbfounds767
@thedumbfounds767 6 жыл бұрын
thanks Georg!
@turbokev3772
@turbokev3772 5 жыл бұрын
DEPRECATED!!! ImportError: cannot import name 'login' from 'django.contrib.auth.views'
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
Use the generic class based view called LoginView instead.
@turbokev3772
@turbokev3772 5 жыл бұрын
@@thedumbfounds767 Yes thank you. I see that now. Thank you for your tutorials. I apologize for the tone I get frustrated coding sometimes.
@thedumbfounds767
@thedumbfounds767 5 жыл бұрын
@@turbokev3772 haha, no prob!
@AdamRubiks
@AdamRubiks 3 жыл бұрын
work aavanila bro
@altairgames8054
@altairgames8054 3 жыл бұрын
im the 666 like lmao
@dawoodalbarakani9115
@dawoodalbarakani9115 5 жыл бұрын
A very helpful tutorial, thanks a lot.
Python Django REST API In 30 Minutes - Django Tutorial
30:42
PedroTech
Рет қаралды 22 М.
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 1,7 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 608 М.
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 30 МЛН
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 2,9 МЛН
Django REST JWT authentication |  Simple JWT
14:41
Code Aura
Рет қаралды 37 М.
Django Rest Framework | Serializers & CRUD
22:40
Dennis Ivy
Рет қаралды 388 М.
Authentication & Refreshing Tokens Implementation
2:09:53
Dennis Ivy
Рет қаралды 238 М.
Django REST Framework Oversimplified
9:43
Dennis Ivy
Рет қаралды 332 М.
Authentications in Django Rest Framework
14:02
IamPython
Рет қаралды 2,2 М.
Django REST API Tutorial - Filtering System #4 (2018)
5:10
The Dumbfounds
Рет қаралды 20 М.
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 1,7 МЛН