Re: need permissions for post method

2019-09-10 Thread Micheal Desousa
dei
Thanks,
with regrads
Micheal.


On Tue, Sep 10, 2019 at 5:20 PM siva.gatti  wrote:

> Hi,
>
> class UserViewSet(viewsets.ModelViewSet):
> permission_classes = [IsAuthenticated]
> queryset = Documents.objects.all()
> serializer_class = DocumentSerializer
>
> this is my viewset. I want to allow users for post method without
> authentication how can i add allowed methods here.with authentication and
> without authentication
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/293a9666-5b87-402f-bb64-0c215483a67a%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJvpbUFi4nrjmfefi2taG_E4PAoKRNbcZaV4HqFL036%2BN8jbUQ%40mail.gmail.com.


need permissions for post method

2019-09-10 Thread siva.gatti
Hi,

class UserViewSet(viewsets.ModelViewSet):
permission_classes = [IsAuthenticated]
queryset = Documents.objects.all()
serializer_class = DocumentSerializer

this is my viewset. I want to allow users for post method without 
authentication how can i add allowed methods here.with authentication and 
without authentication

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/293a9666-5b87-402f-bb64-0c215483a67a%40googlegroups.com.