Brobin/drf-generators

Add Authentication classes to Views

Closed this issue · 2 comments

Add default authentication to views.

Example for viewset, modelviewset, apiview

from rest_framework import authentication, permissions

class SomeViewSet(SomeViewType):
    authentication_classes = (authentication.TokenAuthentication,)

Example for function based

@authentication_classes(...)
def some_veiw():
    ...

Need to define what the defaults should be (if any) and what the command syntax will be.

Decided this isn't something we need right away. Generators gives you a starting point, not a production ready API.