Giter Site home page Giter Site logo

django-twc-toolbox's Introduction

django-twc-toolbox

PyPI PyPI - Python Version Django Version

Requirements

  • Python 3.8, 3.9, 3.10, 3.11, 3.12
  • Django 4.2, 5.0

Getting Started

  1. Install the package from PyPI:
python -m pip install django-twc-toolbox
  1. Add the app to your Django project's INSTALLED_APPS:
INSTALLED_APPS = [
    ...,
    "django_twc_toolbox",
    ...,
]

Usage

Documentation

Please refer to the documentation for more information.

License

django-twc-toolbox is licensed under the MIT license. See the LICENSE file for more information.

django-twc-toolbox's People

Contributors

joshuadavidthomas avatar pre-commit-ci[bot] avatar dependabot[bot] avatar

Watchers

 avatar

django-twc-toolbox's Issues

Add documentation

  • Create initial scaffolding
  • Create docs site on Read the Docs
  • Document TimeStamped
  • Document DatePaginator and DatePage

Add `min_date` and `max_date` to `DatePaginator`

Similar to #7, it'd be nice if regardless of the order of the object_list, that there was two properties for the min and max date of a paginator.

There's already a bunch of duplicated logic in the paginator methods dealing with this anyway, should be consolidated.

if isinstance(self.object_list, QuerySet): # type: ignore[misc]
first_obj = self.object_list.first()
last_obj = self.object_list.last()
else:
first_obj = self.object_list[0]
last_obj = self.object_list[-1]
first_date = getattr(first_obj, self.date_field)
last_date = getattr(last_obj, self.date_field)

if isinstance(self.object_list, QuerySet): # type: ignore[misc]
first_obj = self.object_list.first()
last_obj = self.object_list.last()
else:
first_obj = self.object_list[0]
last_obj = self.object_list[-1]
first_date = getattr(first_obj, self.date_field)
last_date = getattr(last_obj, self.date_field)

Use `westerveltco/setup-ci-action`

coverage
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

types
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-python@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Adjust `DatePage.min_date` and `DatePage.max_date`

This snuck in with all the furious coding to get it shipped. In addition to the start_date and end_date of the DatePage, which correspond to the first and last object's date, respectively, I wanted to also include the oldest and newest date regardless of the sorting.

Add `messages` app

In one of our private projects, we have a messages app that handles common messages that need to be sent externally, e.g. email, webhooks, or Teams. That should be ported over to this public package so that our other projects can use it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.