View Helpers

Django template and view helper functions.

class smarter.lib.drf.views.helpers.SmarterAuthenticatedPermissionClass[source]

Bases: IsAuthenticated

Implements an internal API permission class that allows authenticated users to access internal API endpoints without requiring bearer tokens or other authentication methods.

property formatted_class_name: str
has_all_permission(request, view)[source]

Allows internal view access to authenticated users and internal API requests.

Return type:

bool

class smarter.lib.drf.views.helpers.SmarterUnauthenticatedAPIListView(**kwargs)[source]

Bases: ListAPIView

Base API listview for smarter.

permission_classes = [<class 'smarter.lib.drf.views.helpers.UnauthenticatedPermissionClass'>]
class smarter.lib.drf.views.helpers.SmarterUnauthenticatedAPIView(**kwargs)[source]

Bases: APIView

Base API view for smarter.

permission_classes = [<class 'smarter.lib.drf.views.helpers.UnauthenticatedPermissionClass'>]
class smarter.lib.drf.views.helpers.UnauthenticatedPermissionClass[source]

Bases: BasePermission

Allows public access to APIS.

has_all_permission(request, view)[source]
Return type:

bool