Add Authentication classes to Views
Closed this issue · 2 comments
Brobin commented
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():
...
Brobin commented
Need to define what the defaults should be (if any) and what the command syntax will be.
Brobin commented
Decided this isn't something we need right away. Generators gives you a starting point, not a production ready API.