All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project attempts to adhere to Semantic Versioning.
- Added a
WithHistory
abstract model for integratingdjango-simple-history
HistoricalRecords
. - Added custom
createsuperuser
management command to allow for resetting an existing superuser's password in development whenDEBUG=True
.
- Added a
CuidField
and extra dependencies needed to use it. Install the package withdjango-twc-toolbox[cuid]
in order to use it.
- Dropped support for Django 3.2 (EOL April 2024).
py.typed
added to the project.
- Now using v2024.27 of
django-twc-package
.
- Added the
page_date_range
argument to theDatePaginator
, taking the place of the existingdate_range
argument. This change clarifies that it represents constraining the range of dates for each page, not the entire range of dates for the paginator.
- Updated the
DatePaginator
class to use thepage_date_range
argument instead of the deprecateddate_range
argument. DatePage.min_date
,DatePage.max_date
, andDatePage.date_range
are nowcached_property
attributes instead of being set in the__init__
method.- Now using
django-twc-package
template for repository and package structure.
- The
date_range
argument of theDatePaginator
class is now deprecated. It will be removed in version 0.4.0.
- Removed the
orphans
kwarg fromDatePaginator
, which is inherited from Django's built-inPaginator
. Given its date range-based pagination, the concept of orphans, applicable to item count per page, is not super useful. If it is passed in, a warning will be issued.
DatePage.min_date
andDatePage.max_date
now return the correct dates for the page.DatePage.min_date
returns the oldest date andDatePage.max_date
returns the newest date.DatePage.date_range
now returns the correct range of dates for the page.
DatePaginator
andDatePage
classes, extending Django's built-inPaginator
andPage
classes, respectively. These new classes enable pagination based on a specified date field, making it easier to work with date-based data. Useful for applications that require handling of time-series data or chronological records, such as a blog or an event archive.
Initial release!
- Initial documentation.
- Initial tests.
- Initial CI/CD (GitHub Actions).
- A
TimeStamped
abstract model for addingcreated_at
andupdated_at
fields to models.
- Josh Thomas josh@joshthomas.dev (maintainer)