Skip to content

Commit 470839e

Browse files
committed
Release source to the public
0 parents  commit 470839e

File tree

102 files changed

+4811
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4811
-0
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Dockerfile
2+
.dockerignore
3+
.git
4+
.project
5+
.pydevproject

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# vim swap files
2+
*.swp
3+
4+
# backup files
5+
*~
6+
7+
# compiled python code
8+
*.pyc
9+
*.pyo
10+
11+
# files containing secrets
12+
*_secrets.py
13+
14+
# generated files
15+
/media/*
16+
!/media/.gitkeep
17+
/static/*
18+
!/static/.gitkeep
19+
/venv/*
20+
*.mo

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "${workspaceRoot}/venv/bin/python"
3+
}

LICENSE.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Copyright 2015-2020 Kullo GmbH
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
7+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8+
9+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10+
11+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Web configuration interface for Kullo accounts
2+
3+
## Set up local test environment
4+
5+
We assume that the local Kullo DB has the name, user and password `kullo`.
6+
7+
### Create Postgres DB
8+
9+
sudo -u postgres createuser -P webconfig # enter the password "webconfig" when asked
10+
sudo -u postgres createdb -O webconfig webconfig
11+
12+
## Django
13+
14+
### Setup
15+
16+
./src/manage.py migrate
17+
18+
### Start server
19+
20+
./src/manage.py runserver

deploy.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# must be sourced before set -u because it accesses unset variables...
5+
source venv/bin/activate || (echo "Error while activating venv"; exit 1)
6+
set -u
7+
8+
git pull
9+
pip install -r requirements.txt
10+
[ -d static/COMPILED ] || mkdir static/COMPILED
11+
12+
export DJANGO_SETTINGS_MODULE="WebConfig.settings.production"
13+
python src/manage.py check --deploy
14+
python src/manage.py migrate
15+
python src/manage.py collectstatic --noinput --clear
16+
python src/manage.py compilestatic
17+
touch static/.gitkeep
18+
19+
(
20+
cd src
21+
python manage.py compilemessages
22+
)
23+
24+
service uwsgi reload || service uwsgi restart

media/.gitkeep

Whitespace-only changes.

requirements-to-freeze.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See http://www.kennethreitz.org/essays/a-better-pip-workflow
2+
Django>=2.2.0,<3.0.0
3+
django-debug-toolbar
4+
django-static-precompiler
5+
docutils
6+
psycopg2-binary
7+
watchdog

requirements.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
asgiref==3.2.7
2+
Django==2.2.13
3+
django-debug-toolbar==2.2
4+
django-static-precompiler==1.8.2
5+
docutils==0.16
6+
pathtools==0.1.2
7+
psycopg2-binary==2.8.5
8+
pytz==2020.1
9+
sqlparse==0.3.1
10+
watchdog==0.10.2

src/WebConfig/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2015–2020 Kullo GmbH
2+
#
3+
# This source code is licensed under the 3-clause BSD license. See LICENSE.txt
4+
# in the root directory of this source tree for details.
5+

0 commit comments

Comments
 (0)