to understand how this project work, refer to: https://github.com/mbrochh/django-reactjs-boilerplate/tree/master
bundle has already been generated by command node_modules/.bin/webpack --config webpack.local.config.js , and all generated files are in ./djreact/static/bundles/local
Jin Yan(jyan16), Tong Zhang(tzhang48), Zexuan Huang(zhuang31), Zhiwei Zhang(zzhang83)
ec2-54-196-181-229.compute-1.amazonaws.com
Our project needs python3, pip3 and npm.
cdto project root directory- run
node_modules/.bin/webpack --config webpack.local.config.jsto generate react bundle files. They should now be stored in backendApp/static/bundles/local. npm installto install all packagespip3 install -r req.txtto install all python packagenode dev_server.jsto start webpack dev server. Note that this is import to make react run correctlypython3 manage.py runserverto start Django
There are three views in the system:
- 'localhost:8000/' index view. You can upload csv file here. Our system will check whether your file is uploadable.
- 'localhost:8000/data' the home page of website.
Our system uses AJAX to communicate between frontend and backend.
GET localhost:8000/all/?:
response =
{
'ok': bool,
'data': {
task_type: [
{
'name': string,
'most_recent_time': string,
'metric': string,
'most_recent_result':
{
score_name: score_value,
...
}
},
...
]
},
'statistic': {
task_type: {
{
time: string,
score_name: score_value,
...
},
...
}
}
}
GET localhost:8000/dataset?data_name=my_dataset:
This request will response the individual data and its corresponding statistic result. The statistic result contains mean, median, standard deviation. Client could use data field in statistic to draw frequency density histogram for our score.
response = {
ok: bool,
dataset: {
metric: string,
most_recent_time: DateTime,
name: string,
type: string,
},
results: [
{
Baseline: float,
duration: int,
time: DateTime
}, ...
],
statistic: {
'data': [(float, float), ...],
'mean': float,
'median': float,
'standard_deviation': float,
}
}
POST localhost:8000/upload?file_dir=my_file_directory:
- name: jinyan
- email: jin_yan@brown.edu
- password: abcd12345678
- name: tong
- password: abcd12345678
- delete DATABASE_URL in your heroku config variable!!!!!!!!!
- Compressor will not run is DEBUG is TRUE