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.
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.
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.
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 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.
@@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. :(
I just found your chamnel today , you're really Good
Hey, thanks!❤️
Really well explained. One of the best I found so far
Wow, thanks!
Found your channel yesterday since then jst navigating throughout your channel! Nice Content got so much to learn from you...
Thank you so much for your support❤️❤️
Great video man, keep doing these videos. 🇧🇷🤝🇮🇳
Thankyou❤️❤️
you saved me bro👏👏
15:26 you dont have to modify serializer for is_active, just dont send is_active: false during registration
L I K E👍 👍👍 👍👍 👍👍 💯💯💯🤩 🤩🤩 🤩🤩
Thankyou❤️❤️
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 ?
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.
@@thecodrammers It worked. Thank you for the reply. Are you planning to do any AngularJS UI with Django REST framework?
bro can you tell how to remove knox and add jwt
Thanks
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.
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
@@thecodrammers Hi Omkar, I had not updated the admin.py file. Now it is done and working fine. Thank you so much, as always:)
@@vpaturkar It's Great you got the solution.
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.
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.
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
@@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.
@@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. :(
Okay. That's great. Sorry, the earlier message was skipped unexpectedly.
how to limit number of tokens assigned to a user (for eg:- one user should only have 3 tokens not more than that)
You have to give the ‘TOKEN_LIMIT_PER_USER’: 3 in the settings.py file in REST_KNOX settings
Hi , Thank you , How can I get Source code ?
In the description
ruclips.net/video/6d0fiPj0dsA/видео.html How were you able to update the user while you were not yet authenticated?