From f540e67336e4609926222b60c7c9780bf2d79b5d Mon Sep 17 00:00:00 2001 From: Miguel BarĂ£o Date: Wed, 8 Feb 2017 09:12:34 +0000 Subject: [PATCH] - added README.md --- BUGS.md | 2 ++ README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ app.py | 1 - 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/BUGS.md b/BUGS.md index 91630eb..d020442 100644 --- a/BUGS.md +++ b/BUGS.md @@ -1,5 +1,7 @@ BUGS: +- questions hardcoded in LearnApp. +- database hardcoded in LearnApp. - como gerar key para secure cookie. - implementar xsrf. Ver [http://www.tornadoweb.org/en/stable/guide/security.html#cross-site-request-forgery-protection]() - verificar se ha questoes diff --git a/README.md b/README.md new file mode 100644 index 0000000..b7ebd7c --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +## Requirements + +You will need to install `python3.6`, `pip` and `sqlite3`. +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`). + +Install some python packages locally on the user area: + + pip install --user tornado sqlalchemy pyyaml pygments markdown bcrypt + +These are usually installed under + +- OSX: `~/Library/python/3.6/lib/python/site-packages/` +- Linux/FreeBSD: `~/.local/lib/python3.6/site-packages/` + +## Installation + +Replace USER by your bitbucket username: + + cd path/to/some/directory + git clone https://USER@bitbucket.org/USER/aprendizations.git + +A directory aprendizations will be created with the software: + + cd aprendizations + +## Configuration + +First we need to create a database: + + ./initdb.py # initialize with a single user `0` and empty password + ./initdb.py --help # for the available options + +We also need certificates for https. We can generate selfsigned certificates using openssl: + + mkdir certs + cd certs + openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes + cd .. + +Run a demonstration: + + ./serve.py diff --git a/app.py b/app.py index e98b024..60c2265 100644 --- a/app.py +++ b/app.py @@ -17,7 +17,6 @@ from models import Student # ============================================================================ class LearnApp(object): def __init__(self): - print('LearnApp.__init__') self.factory = questions.QuestionFactory() self.factory.load_files(['questions.yaml'], 'demo') # FIXME self.online = {} -- libgit2 0.21.2