Skip to content

Instantly share code, notes, and snippets.

View marty0678's full-sized avatar

Marty Cochrane marty0678

  • Lead Software Engineer for Disguise.
  • Stratford, ON
View GitHub Profile
@marty0678
marty0678 / example_usage.py
Created March 8, 2024 21:57
Django Rest Framework Base Model CRUD Class
# Views
class UserProfileViewSet(BaseModelViewSet):
"""View set for the UserProfile."""
ENABLE_LIST = True
ENABLE_RETRIEVE = True
ENABLE_PARTIAL_UPDATE = True
ENABLE_PAGINATION = True
LIST_CACHE_KEY = "users:user-profiles-list"