add signals, register six signals on each models (pre/post + save/update/delete)

This commit is contained in:
collerek
2020-12-06 17:23:46 +01:00
parent 2bbfd05017
commit 85be9e8b80
13 changed files with 368 additions and 53 deletions

View File

@ -1,19 +0,0 @@
#!/bin/sh -e
PACKAGE="ormar"
if [ -d 'dist' ] ; then
rm -r dist
fi
if [ -d 'site' ] ; then
rm -r site
fi
if [ -d 'htmlcov' ] ; then
rm -r htmlcov
fi
if [ -d "${PACKAGE}.egg-info" ] ; then
rm -r "${PACKAGE}.egg-info"
fi
find ${PACKAGE} -type f -name "*.py[co]" -delete
find ${PACKAGE} -type d -name __pycache__ -delete
find tests -type f -name "*.py[co]" -delete
find tests -type d -name __pycache__ -delete

View File

@ -1,23 +0,0 @@
#!/bin/sh -e
PACKAGE="ormar"
PREFIX=""
if [ -d 'venv' ] ; then
PREFIX="venv/bin/"
fi
VERSION=`cat ${PACKAGE}/__init__.py | grep __version__ | sed "s/__version__ = //" | sed "s/'//g"`
set -x
scripts/clean.sh
${PREFIX}python setup.py sdist
${PREFIX}twine upload dist/*
echo "You probably want to also tag the version now:"
echo "git tag -a ${VERSION} -m 'version ${VERSION}'"
echo "git push --tags"
scripts/clean.sh