Commit f540e67336e4609926222b60c7c9780bf2d79b5d
1 parent
775da4fc
Exists in
master
and in
1 other branch
- added README.md
Showing
3 changed files
with
44 additions
and
1 deletions
Show diff stats
BUGS.md
| ... | ... | @@ -0,0 +1,42 @@ |
| 1 | +## Requirements | |
| 2 | + | |
| 3 | +You will need to install `python3.6`, `pip` and `sqlite3`. | |
| 4 | +This can be done using the system package management, downloaded from [http://www.python.org](), or compiled from sources. In the end you should be able to run `pip3 --version` and `python3 -c "import sqlite3"` without errors (sometimes `pip3` is `pip`, `pip3.6` or `pip-3.6`). | |
| 5 | + | |
| 6 | +Install some python packages locally on the user area: | |
| 7 | + | |
| 8 | + pip install --user tornado sqlalchemy pyyaml pygments markdown bcrypt | |
| 9 | + | |
| 10 | +These are usually installed under | |
| 11 | + | |
| 12 | +- OSX: `~/Library/python/3.6/lib/python/site-packages/` | |
| 13 | +- Linux/FreeBSD: `~/.local/lib/python3.6/site-packages/` | |
| 14 | + | |
| 15 | +## Installation | |
| 16 | + | |
| 17 | +Replace USER by your bitbucket username: | |
| 18 | + | |
| 19 | + cd path/to/some/directory | |
| 20 | + git clone https://USER@bitbucket.org/USER/aprendizations.git | |
| 21 | + | |
| 22 | +A directory aprendizations will be created with the software: | |
| 23 | + | |
| 24 | + cd aprendizations | |
| 25 | + | |
| 26 | +## Configuration | |
| 27 | + | |
| 28 | +First we need to create a database: | |
| 29 | + | |
| 30 | + ./initdb.py # initialize with a single user `0` and empty password | |
| 31 | + ./initdb.py --help # for the available options | |
| 32 | + | |
| 33 | +We also need certificates for https. We can generate selfsigned certificates using openssl: | |
| 34 | + | |
| 35 | + mkdir certs | |
| 36 | + cd certs | |
| 37 | + openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes | |
| 38 | + cd .. | |
| 39 | + | |
| 40 | +Run a demonstration: | |
| 41 | + | |
| 42 | + ./serve.py | ... | ... |
app.py
| ... | ... | @@ -17,7 +17,6 @@ from models import Student |
| 17 | 17 | # ============================================================================ |
| 18 | 18 | class LearnApp(object): |
| 19 | 19 | def __init__(self): |
| 20 | - print('LearnApp.__init__') | |
| 21 | 20 | self.factory = questions.QuestionFactory() |
| 22 | 21 | self.factory.load_files(['questions.yaml'], 'demo') # FIXME |
| 23 | 22 | self.online = {} | ... | ... |