You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Hayley 79ed77f9d9
Merge pull request #42 from hugglesfox/dependabot/npm_and_yarn/jquery-3.5.0
6 months ago
awards Refractor code 2 years ago
docs Add final usablility test 2 years ago
test Add more tests for GroupManager 2 years ago
.dockerignore Add Pipfile to dockerignore 1 year ago
.gitignore Create login page 2 years ago
.travis.yml Shrink docker image 1 year ago
Dockerfile Merge pull request #35 from hugglesfox/dependabot/docker/node-13.8.0-stretch 1 year ago
LICENSE Add LICENSE 2 years ago
Pipfile Add Pipfile 1 year ago
Pipfile.lock Bump psycopg2-binary from 2.8.3 to 2.8.4 1 year ago
README.md Generate requirements.txt from Pipfile 1 year ago
awards.csv Fix id numbering 2 years ago
config.py Add defaults for config options 1 year ago
deploy.sh Add deploy script 1 year ago
docker-compose.yml Update docker-compose image 1 year ago
gulpfile.js Update gulpfile to work with gulp 4 1 year ago
mockdb.py Remove debug print statements from mockdb 2 years ago
nuke_db.py pep8 nuke_db.py 2 years ago
package-lock.json Merge pull request #42 from hugglesfox/dependabot/npm_and_yarn/jquery-3.5.0 6 months ago
package.json Bump jquery from 3.4.1 to 3.5.0 10 months ago
requirements.txt Bump psycopg2-binary from 2.8.3 to 2.8.4 1 year ago

README.md

bsc-awards Build Status

A flask website for displaying award data.

Features

  • Supports any SQL database for student and award data thanks to SQLAlchemy.
  • Groups students so not too many students are on stage at once.
  • Simple attendance management to ensure that only students attending have their name called out.
  • Printable attendance sheets that also contain the awards of every attending student for each year level.
  • A intuitive web based GUI built using Bootstrap 4 and Flask.
  • User authentication.
  • Awards marked as special are not displayed.

Installation

Docker

$ docker run -p 80:5000 \
   -e DATABASE_URI=sqlite:///data.db \
   -e USERNAME=admin \
   -e PASSWORD=admin \
   -v /path/on/host/to/somewhere/:/usr/src/app/ \
   haydenhughes/bsc-awards:latest

DATABASE_URI must be a valid sqlalchemy database URL.

USERNAME and PASSWORD are exactly what you expect them to be so set them to something secure.

Not Docker

Requirements
  • python3
  • python3-pip
  • nodejs

First clone this repo (or download the zip) and change your directory to it.

$ git clone https://gitlab.com/haydenhughes/bsc-awards.git && cd bsc-awards

Next install python packages with pip.

$ pip3 install -r requirements.txt

Then install the required node packages with npm.

$ npm install -g gulp-cli $ npm install

And compile the scss files and setup the javascripts with gulp.

$ gulp clean
$ gulp scss`
$ gulp js`

Lastly run the flask server.

$ export FLASK_APP=awards
$ export DATABASE_URI=sqlite:///data.db
$ export USERNAME=admin
$ export PASSWORD=admin
$ flask run

The DATABASE_URI environment variable must be a valid sqlalchemy database URL.

The USERNAME and PASSWORD environment variables are exactly what you expect them to be so set them to something secure.

Contributing

Running unittests locally

$ python3 -m unittest discover -s test

Generating requirements.txt

For development I use pipenv to manage dependencies but Docker requires a requirements.txt which must be generated after every dependency change by running:

$ pipenv lock --requirements > requirements.txt