Metadata-Version: 2.1
Name: tg-utils
Version: 0.7.0
Summary: Common utils for Django-based projects.
Home-page: https://github.com/thorgate/tg-utils
Author: Thorgate
Author-email: code@thorgate.eu
License: ISCL
Keywords: tg-utils tg_utils
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: ISC License (ISCL)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: django (!=2.1.0,!=2.1.1,<3.0,>=1.8)
Provides-Extra: health_check
Requires-Dist: django-health-check (<4.0.0,>=3.9.0) ; extra == 'health_check'
Requires-Dist: psutil (<6.0.0,>=5.6.0) ; extra == 'health_check'
Requires-Dist: requests (<3.0.0,>=2.18.4) ; extra == 'health_check'
Provides-Extra: lock
Requires-Dist: redis (>=2.10.0) ; extra == 'lock'
Requires-Dist: python-redis-lock (<4.0.0,>=3.2.0) ; extra == 'lock'

===============================
tg-utils
===============================

.. image:: https://img.shields.io/pypi/v/tg-utils.svg
        :target: https://pypi.python.org/pypi/tg-utils

.. image:: https://travis-ci.org/thorgate/tg-utils.svg?branch=master
        :target: https://travis-ci.org/thorgate/tg-utils

.. image:: https://readthedocs.org/projects/tg-utils/badge/?version=latest
        :target: https://readthedocs.org/projects/tg-utils/?badge=latest
        :alt: Documentation Status


Collection of various utils for Django-based projects.

This is code that we're using in our projects at Thorgate and we're hoping you'll find some of it useful as well.

* Free software: ISC license
* Documentation: https://tg-utils.readthedocs.org.


Features
--------

* Model utils, e.g. timestamped and closable models, QuerySets that send out a signal when objects are modified.
* Templated email sending.
* Profiling utilities.
* Unique filename generation for uploads.
* Using hashids for models (instead of exposing primary keys).
* System checks for email and Sentry configuration.
* Mixin for easier implementation of ordering in Django's generic ListView.
* JS/CSS compressors for `Django Compressor <https://django-compressor.readthedocs.org/en/latest/>`_.
* Health-check endpoints (with and without token authentication)


Credits
---------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.6.1 (2019-03-17)

* Added health-check for celery and celery beat. Thanks @iharthi

0.6.0 (2019-03-21)
------------------

* Added health-check helpers. Thanks @iharthi

0.5.0 (2019-02-07)
------------------

* Added locking decorator. Thanks @iharthi

0.4.0 (2019-02-07)
------------------

* Supported Django and Python versions are listed below

===============  ==================
Django version   Python versions
---------------  ------------------
Django 1.8       3.4, 3.5, 3.6
Django 1.11      3.4, 3.5, 3.6
Django 2.0       3.4, 3.5, 3.6, 3.7
Django 2.1       3.5, 3.6, 3.7
===============  ==================


0.3.0 (2018-03-12)
------------------

* Supported Django versions are now 1.8, 1.11, and 2.0.
  `ClosableModel.created_by` and `closed_by` now have `on_delete=models.SET_NULL` attribute.
* Supported Python versions are now 3.4, 3.5, and 3.6.


0.2.0 (2016-01-27)
------------------

* Rename `tg_utils.yuglify` module to `tg_utils.compressor_filters` and
  added new filters for using UglifyJS 2 and clean-css.
* Added docs for `tg_utils.compressor_filters` module.


0.1.1 (2016-01-11)
------------------

* First release on PyPI.


