Add the following snippet at the bottom of ~/.zshrc
file.
RPROMPT='[%D{%L:%M:%S}] '$RPROMPT
from collections import OrderedDict | |
from rest_framework.fields import SkipField | |
from rest_framework.relations import PKOnlyObject | |
class RestrictedFieldsSerializerMixin(object): | |
""" | |
API Serializer mixin which provides support for restricting serialized data to only a subset of fields. |
# Add this code in any Django app's admin.py | |
# Works for all Task Statuses; you can filter them in line 12. | |
import ast | |
import importlib | |
import json | |
from django.contrib import admin | |
from django.contrib import messages | |
from django.utils.safestring import mark_safe |