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

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 32

  • @helloworld3979
    @helloworld3979 8 месяцев назад +3

    I just found your chamnel today , you're really Good

  • @personalizedbits
    @personalizedbits Год назад +4

    Really well explained. One of the best I found so far

  • @shaikhmohammednauman5778
    @shaikhmohammednauman5778 Год назад +1

    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❤️❤️

  • @jaderadriel7944
    @jaderadriel7944 Год назад +2

    Great video man, keep doing these videos. 🇧🇷🤝🇮🇳

  • @wizely99
    @wizely99 Год назад +2

    you saved me bro👏👏

  • @AnterasPL
    @AnterasPL 5 месяцев назад

    15:26 you dont have to modify serializer for is_active, just dont send is_active: false during registration

  • @wowyummyyy
    @wowyummyyy 2 года назад +1

    L I K E👍 👍👍 👍👍 👍👍 💯💯💯🤩 🤩🤩 🤩🤩

  • @personalizedbits
    @personalizedbits Год назад +1

    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  Год назад +2

      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?

  • @siddarthsingh9732
    @siddarthsingh9732 Год назад +1

    bro can you tell how to remove knox and add jwt

  • @JuanIsaza
    @JuanIsaza Год назад +1

    Thanks

  • @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  Год назад +1

      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  Год назад +1

      @@vpaturkar It's Great you got the solution.

  • @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  Год назад +1

      You have to give the ‘TOKEN_LIMIT_PER_USER’: 3 in the settings.py file in REST_KNOX settings

  • @OsamaAlmadhoun
    @OsamaAlmadhoun Год назад

    Hi , Thank you , How can I get Source code ?

  • @scacsy
    @scacsy Год назад

    ruclips.net/video/6d0fiPj0dsA/видео.html How were you able to update the user while you were not yet authenticated?