Skip to content

Commit

Permalink
updated comments/types for Ba
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Nov 23, 2023
1 parent ee4ec99 commit 490be2f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/api/views/objects/base.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from typing import List
from typing import List, Literal


class BaseProvider:
allow_list: bool = True
allow_new: bool = True
kind: str = ""
listing_filters_ignore: List[str] = []
allow_list: bool = True # Is the view able to list the model's objects. (e.g. /user would list all users
allow_new: bool = True # Is the provider able to create a new object.
kind: Literal["list", "new", "single", "retrieve"] # type of view
listing_filters_ignore: List[
str] = [] # don't treat the passed in params as a listing filter but instead as a param for the view.

def __init__(self, request):
self.request = request

0 comments on commit 490be2f

Please sign in to comment.