Skip to content

Commit

Permalink
Merge pull request #67 from DmytroLitvinov/patch-1
Browse files Browse the repository at this point in the history
General improvement
  • Loading branch information
rsinger86 authored Feb 14, 2021
2 parents 2834786 + 59d0595 commit c1170bf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

This project provides a `@hook` decorator as well as a base model and mixin to add lifecycle hooks to your Django models. Django's built-in approach to offering lifecycle hooks is [Signals](https://docs.djangoproject.com/en/dev/topics/signals/). However, my team often finds that Signals introduce unnecessary indirection and are at odds with Django's "fat models" approach.

**Django Lifecycle Hooks** supports Python 3.5, 3.6, 3.7 and 3.8, Django 2.0.x, 2.1.x, 2.2.x and 3.0.x.
**Django Lifecycle Hooks** supports Python 3.5, 3.6, 3.7, 3.8 and 3.9, Django 2.0.x, 2.1.x, 2.2.x, 3.0.x and 3.1.x.

In short, you can write model code like this:

Expand Down
6 changes: 2 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Instead of overriding `save` and `__init__` in a clunky way that hurts readabili

## Requirements

* Python (3.3+)
* Django (1.8+)
* Python (3.5+)
* Django (2.0+)

## Installation

Expand Down Expand Up @@ -87,6 +87,4 @@ class YourModel(LifecycleModelMixin, models.Model):

```

If you are using **Django 1.8 or below** and want to extend the base model, you also have to add `django_lifecycle` to `INSTALLED_APPS`.

[Read on](examples.md) to see more examples of how to use lifecycle hooks.
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ def readme():
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Framework :: Django",
"Framework :: Django :: 2.0",
"Framework :: Django :: 2.1",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
]
setup(
name="django-lifecycle",
Expand Down
14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tox]
toxworkdir={env:TOXWORKDIR:{toxinidir}/.tox}
envlist =
{py35,py36,py37,py38}-django20
{py35,py36,py37,py38}-django21
{py35,py36,py37,py38}-django22
{py36,py37,py38}-django30
{py36,py37,py38}-django31
{py35,py36,py37}-django20
{py35,py36,py37}-django21
{py35,py36,py37,py38,py39}-django22
{py36,py37,py38,py39}-django30
{py36,py37,py38,py39}-django31
flake8
skip_missing_interpreters = True

Expand All @@ -24,11 +24,11 @@ deps =
django21: django>=2.1,<2.2
django22: django>=2.2,<3
django30: django>=3.0,<3.1
django31: django>=3.1,<4
django31: django>=3.1,<3.2

[testenv:flake8]
basepython = python3.7
deps =
flake8==3.8.2
flake8==3.8.4
commands =
flake8 . --exclude=venv/,.tox/,django_lifecycle/__init__.py

0 comments on commit c1170bf

Please sign in to comment.