Skip to content

Commit

Permalink
mixin is just a mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Jul 24, 2024
1 parent d91356e commit 9507fb7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hunt/third_party/apimixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@

from typing import TYPE_CHECKING, Any

from django.db.models import Model
from django.http import Http404
from rest_framework import status
from rest_framework.request import clone_request
from rest_framework.response import Response
from rest_framework.viewsets import GenericViewSet

if TYPE_CHECKING:
from django.db.models import Model
from rest_framework.request import Request
from rest_framework.viewsets import GenericViewSet

type _Base = GenericViewSet[Model]
else:
_Base = object


# https://gist.github.com/tomchristie/a2ace4577eff2c603b1b
class AllowPUTAsCreateMixin(GenericViewSet[Model]):
class AllowPUTAsCreateMixin(_Base):
"""
The following mixin class may be used in order to support PUT-as-create
behavior for incoming requests.
Expand Down

0 comments on commit 9507fb7

Please sign in to comment.