Smarter Authenticated List API View
- class smarter.lib.drf.views.token_authentication_helpers.SmarterAuthenticatedListAPIView(**kwargs)[source]
Bases:
ListAPIView,SmarterRequestMixinSmarter base class for DRF API list views that require authentication.
Does the following:
Adds SmarterRequestMixin to the view, so that base Smarter functionality is available to all subclasses.
Adds SmarterTokenAuthentication to the default SessionAuthentication for authentication.
Overrides Django’s logic for initializing the request object to ensure that SmarterRequestMixin is fully initialized before any other logic runs.
- authentication_classes = [<class 'smarter.lib.drf.token_authentication.SmarterTokenAuthentication'>, <class 'rest_framework.authentication.SessionAuthentication'>]
- property formatted_class_name
Helper method to get the formatted class name for logging.
- initial(request, *args, **kwargs)[source]
Extend DRF initial() to add SmarterRequestMixin.
- Parameters:
request (Request) – The incoming HTTP request.
- permission_classes = [<class 'smarter.lib.drf.views.helpers.SmarterAuthenticatedPermissionClass'>]