from rest_framework_api_key.permissions import BaseHasAPIKey from .models import APIKey from rest_framework import permissions class HasAPIKey(BaseHasAPIKey): model = APIKey