This package contains useful utilities for django/drf project
Contains set of abstract models to enforce DRY principle for most common use cases
created
modified
-
start
-
end
For time bound entities
description
title
title
description
A DateTimeField that monitors another field on the same model and sets itself to the current date/time whenever the monitored field changes. use it like this in your models: class MyMode(models.Model):
title = models.Charfield(max_length=50)
title_changed = MonitorField(_('title changed'), monitor='title')
Allow you to specify list_serializer_class
that will be used only in list action
Paginator with page_size
as query parameter for setting page size
Custom paginator class that returns not paginated(detail result) if qs result have only 1 item
Return all objects if user is staff, otherwise return objects owned by user