README.md 1.67 KB

README

Requirements:

The webserver is a python3 application and only requires python to be installed. Requires python 3.5 or above. It does not require any other webserver (apache, ...)

Installed using pip:

  • CherryPy (>=3.7.0)
  • Mako (>=1.0.1)
  • Markdown (>=2.6.2)
  • PyYAML (>=3.11)
  • bcrypt (>=2.0.0)

System setup:

Open a terminal and navigate to a directory where this software is to be installed, e.g. /var/www or /home/username. Run the following commands:


cd WHERE/TO/PUT/THE/SOFTWARE

# get software using git
git clone https://mjsb@bitbucket.org/mjsb/perguntations.git
cd perguntations

# create database (if no csv file is provided, a database with 5 fake students is created for debugging)
./initdb_from_csv.py YOUR_CSV_FILE_HERE
mv students.db SOMEWHERE

# update test configuration with the correct database file.
vi demo/test.yaml
# Edit line 7 to something like
# database: SOMEWHERE/students.db

# edit server configuration
vi config/server.conf
# Edit lines 26--27 to point to the desired log files location.

# get help
./serve.py --help 

# run demo test
./serve.py demo/test.yaml

# open browser at http://127.0.0.1:8080/
# the professor is number 0

# ^C to terminate the server

Troubleshooting

  • If you are getting any UnicodeEncodeError type of errors that's because the terminal is not supporting UTF-8. Try running locale on the terminal and see if there is any error messages. Fix it with sudo dpkg-reconfigure locales, select your UTF-8 locales and try again.

Contribute

  • Writing questions in yaml format
  • Testing and reporting bugs
  • Code review
  • New features and ideas

Contacts