How to create Login, Logout and Logout All APIs using Knox || DRF Tutorials || Tutorial - 7

  Рет қаралды 7,035

The Codrammers

The Codrammers

Күн бұрын

Пікірлер: 32
@helloworld3979
@helloworld3979 9 ай бұрын
I just found your chamnel today , you're really Good
@thecodrammers
@thecodrammers 8 ай бұрын
Hey, thanks!❤️
@shaikhmohammednauman5778
@shaikhmohammednauman5778 Жыл бұрын
Found your channel yesterday since then jst navigating throughout your channel! Nice Content got so much to learn from you...
@thecodrammers
@thecodrammers Жыл бұрын
Thank you so much for your support❤️❤️
@personalizedbits
@personalizedbits Жыл бұрын
Really well explained. One of the best I found so far
@thecodrammers
@thecodrammers Жыл бұрын
Wow, thanks!
@jaderadriel7944
@jaderadriel7944 Жыл бұрын
Great video man, keep doing these videos. 🇧🇷🤝🇮🇳
@thecodrammers
@thecodrammers Жыл бұрын
Thankyou❤️❤️
@AnterasPL
@AnterasPL 6 ай бұрын
15:26 you dont have to modify serializer for is_active, just dont send is_active: false during registration
@wizely99
@wizely99 Жыл бұрын
you saved me bro👏👏
@personalizedbits
@personalizedbits Жыл бұрын
How do you add authentication to the update-user code? In theory, people should be allowed to update only when they are logged in, right ?
@thecodrammers
@thecodrammers Жыл бұрын
You can use permission_classes=(IsAuthenticated,) in the api that has to work only if the user is logged in. Search this in Google. You will find how exactly to use it.
@personalizedbits
@personalizedbits Жыл бұрын
@@thecodrammers It worked. Thank you for the reply. Are you planning to do any AngularJS UI with Django REST framework?
@vpaturkar
@vpaturkar Жыл бұрын
Hi Omkar, I cannot login into Admin model despite of creating super user from terminal or setting is_superuser to True for existing user. Please help as how this can be resolved.
@thecodrammers
@thecodrammers Жыл бұрын
Type python manage.py shell Then User.objects.get(email='your_email') and check if it's is_superuser is true, is_active is True
@vpaturkar
@vpaturkar Жыл бұрын
@@thecodrammers Hi Omkar, I had not updated the admin.py file. Now it is done and working fine. Thank you so much, as always:)
@thecodrammers
@thecodrammers Жыл бұрын
@@vpaturkar It's Great you got the solution.
@siddarthsingh9732
@siddarthsingh9732 Жыл бұрын
bro can you tell how to remove knox and add jwt
@vpaturkar
@vpaturkar Жыл бұрын
Hi Omkar, When I test the login from Postman, I get an error, "detail": "JSON parse error - Expecting value: line 1 column 1 (char 0)". I realise that the token is not part of header in Postman. I need help understanding as where to find the token for a user, and how it associate it in header from client.
@thecodrammers
@thecodrammers Жыл бұрын
Did you check the source code given in the description? That code should work for the login API. If not watch the video once. You will get to know what is wrong in the code.
@thecodrammers
@thecodrammers Жыл бұрын
And from the client, you can send it in the headers while calling API from the frontend. You can search for the javascript code in the Google
@vpaturkar
@vpaturkar Жыл бұрын
@@thecodrammers I used your code from git as is. In Postman, it still shows same error. In terminal, it says Bad request... Please, is it possible for a quick connect? It will be of immense help.
@vpaturkar
@vpaturkar Жыл бұрын
@@thecodrammers Hi Omkar, thank you for the code. Everything worked well for me now. Code and everything is fine. My laptop needed a restart, and I restarted it after few days. :(
@thecodrammers
@thecodrammers Жыл бұрын
Okay. That's great. Sorry, the earlier message was skipped unexpectedly.
@indrajitgoudpatil463
@indrajitgoudpatil463 Жыл бұрын
how to limit number of tokens assigned to a user (for eg:- one user should only have 3 tokens not more than that)
@thecodrammers
@thecodrammers Жыл бұрын
You have to give the ‘TOKEN_LIMIT_PER_USER’: 3 in the settings.py file in REST_KNOX settings
@wowyummyyy
@wowyummyyy 2 жыл бұрын
L I K E👍 👍👍 👍👍 👍👍 💯💯💯🤩 🤩🤩 🤩🤩
@thecodrammers
@thecodrammers 2 жыл бұрын
Thankyou❤️❤️
@JuanIsaza
@JuanIsaza Жыл бұрын
Thanks
@OsamaAlmadhoun
@OsamaAlmadhoun 2 жыл бұрын
Hi , Thank you , How can I get Source code ?
@thecodrammers
@thecodrammers Жыл бұрын
In the description
@scacsy
@scacsy Жыл бұрын
kzbin.info/www/bejne/bJWTl5yGn5WXqaM How were you able to update the user while you were not yet authenticated?
Find the Mobile Number Location in Django || Mini - Project
24:41
The Codrammers
Рет қаралды 1,1 М.
File Uploads - with Django REST Framework!
32:39
BugBytes
Рет қаралды 6 М.
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
MDPI: innovator or predator?
25:48
Galline sferiche nel vuoto
Рет қаралды 294
2,000 People Fight For $5,000,000
24:45
MrBeast
Рет қаралды 62 МЛН
Authentication & Refreshing Tokens Implementation
2:09:53
Dennis Ivy
Рет қаралды 244 М.
User Registration and Password Management In DRF
20:06
Django World
Рет қаралды 4,1 М.
Django REST Framework Oversimplified
9:43
Dennis Ivy
Рет қаралды 352 М.
Django REST Framework Autenticación con Tokens
27:30
Fazt Code
Рет қаралды 20 М.