2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 10:10:59 +00:00

More security, middleware upgrade, dj-reg.2.5

This commit is contained in:
Philip Sargent
2020-06-20 23:08:34 +01:00
parent 477a289c2e
commit f3232cc5df
13 changed files with 96 additions and 45 deletions

View File

@@ -10,10 +10,14 @@ echo ""
find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
echo `tail -1 lines-of-python.txt` non-comment lines of python.
# This deletes the database so must run after generating troggle-inspectdb.py
python reset-django.py
echo After cleanup deletion, remake all migrations.
python manage.py makemigrations >/dev/null
python manage.py test
python manage.py test
python manage.py check -v 3 --deploy 2>security-warnings.txt >/dev/null
python manage.py check -v 3 --deploy
echo ""
echo `tail -1 lines-of-python.txt` non-comment lines of python.