A TTKD Student Management System
Our system allows for martial arts studios to customize the content of the waiver screen during registration. To do so follow the following steps:
- Create a file called
waiver.txt
in thettkd_api/static
folder. - Edit the new file so that it contains the text you want.
- Be sure to save any changes made.
Note: In order to see any updated text, you may need to clear your browser cache
To Install and run this application, do the following:
- Install Python 3.5.2
- Clone this repo.
cd
into the topmostttkd_api/
directory of the repo.- Run
pip install -r requirements.txt
- Run
python manage.py migrate
to initialize your database. - Run
python manage.py runserver_plus --cert .\cert
- Navigate to
localhost:8000/api
This project is set up with PyLint. To run the linter, cd to ttkd_api/
and run pylint ttkd_api/
.
To install and run the AngularJS app, do the following:
- Install Node
- Install Git
- run
npm install -g gulp
to install Gulp (our build system) - run
npm install -g bower
to install Bower (our ui dependency manager) cd
into thettkd_ui
folder.- run
npm install
- run
bower install
- run
gulp
to build the project and run the server.
You must either be in the scripts folder or the ttkd_api folder when you run the script You must also have all 4 of the required json files in the folder you are executing the script from (these come from the mongo dump of the old system):
- students.json
- attendances.json
- classes.json
- programs.json
there are 2 possible additional options when running the script:
- nobelts - Does not add default belts into the import.
- mask - Removes any sensitive personal data when loading in the old files. This flag will also generate fake relationships of belts and stripes to persons in the import unless one of the variations of the nobelts flag is used.
python import_json.py <nobelts> <mask>
- Update node to v6.9.5
- Re-initialize your environment:
npm rebuild node-sass
- Install dependencies:
npm install
- Install protractor:
npm install -g protractor
- Update webdrivers:
./node_modules/gulp-protractor/node_modules/protractor/bin/webdriver-manager update
- Run your API and UI projects normally
- Run protractor tests from the
ttkd_ui
directory by runningprotractor protractor.config.js
- Start your API
- Run protractor tests from the
ttkd_ui
directory by runninggulp test
To create a new test, just create the file in the same folder as the functionality you will be testing, and make the extension .test.js
. Gulp will automatically run the test.
To build a release for the project, setup a unix-like environment with the following dependencies installed (In addition to the dependencies needed to build the project):
- unzip
- zip
The easiest way to do this is to first download and install Git Bash. Then, install GNU on Windows.
Then, issue the following commands:
cd scripts
./build-release.sh
- If you would like to start with a specific data set, export your data using
python manage.py dumpdata > data.json
, then putdata.json
in the root project directory.- Alternatively, you can run the
scripts/import_json.py
script prior to building a release to preconfigure your data.
- Alternatively, you can run the
- If you change the requirements.txt of this project, you will need to extract
scripts/python-dist.zip
, copy and paste your python libraries you added intopython-dist/python-X.X.X-embed-amd64/Lib/site-packages
, and re-zippython-X.X.X-embed-amd64
.