WSS (WFP Self Service) is a mixed Django / React.JS application. Each page is served by Django and it's a container for plain React.JS components. Data binding is binding directly by React and the Django server will act as Rest API.
In order for the application to run, requirements are:
brew install node
python -c "import django; print(django.get_version())"
sudo pip install Django
git clone https://github.com/wfp/wss-ui.git
npm install
npm install --save-dev webpack
sudo pip install virtualenvwrapper
./mkvirtualenv wssdemo
pip install -r src/requirements/install.any.pip
pip install -r src/requirements/develop.pip
pip install -r src/requirements/django.pip
./manage.py migrate
./manage.py createsuperuser
npm run build
sudo npm link
cd demo && npm link wfp-wss-ui-react && npm run build
python manage.py runserver
WFP UI documentation can be found here: UI-DOC.
It won't be necessary by the 1st of September, static html+CSS was used for quickly prototype purposes.
gulp serve
to preview and watch for changesbower install --save <package>
to install frontend dependenciesgulp serve:test
to run the tests in the browsergulp
to build the webapp for productiongulp serve:dist
to preview the production buildRun the following:
sudo npm install -g wml
npm install
wml add lib/ demo/node_modules/wfp-ui-reactjs/lib/
-cp package.json demo/node_modules/wfp-ui-reactjs/
wml start
In another terminal
cd demo
npm install
Run:
npm run build
cd demo
npm run build
python manage.py runserver
WFP UI documentation can be found here: UI-DOC.