Re: how to give permission to a logged in specific user in a list of users profile

2020-07-05 Thread Gabriel Araya Garcia
I also, I have build one program with health environment, and the user controlls is following manner: def login_ini(request): variable1 = 'Pantalla de Acceso al Sistema' error_log = 'ok' username = request.POST.get('username') password = request.POST.get('password') # valor del template user = aut

Re: how to give permission to a logged in specific user in a list of users profile

2020-07-05 Thread Arpana Mehta
https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/ [image: Screenshot from 2020-07-06 03-15-34.png] On Mon, 6 Jul 2020 at 03:13, Arpana Mehta wrote: > You can user permission classes in your code. Or decorators before the > function view you want to be only visible

Re: how to give permission to a logged in specific user in a list of users profile

2020-07-05 Thread Arpana Mehta
You can user permission classes in your code. Or decorators before the function view you want to be only visible to logged in users. from django.contrib.auth.decorators import login_required @login_required def your_view_here(request): On Mon, 6 Jul 2020 at 01:28, Exactly musty wrote: > ho

how to give permission to a logged in specific user in a list of users profile

2020-07-05 Thread Exactly musty
how can i specify a user in django templates, for example i have a page which consist of list of users available but i want it to show "Talk to a patient" for only the logged in user on his own profile here is what am saying in picture and here is my code, i actually don't know how to put the c