Make this web based virtual environment on Linux and run a BootStrap template in Flask.
Using Linux Mint 18.1 Serena,with default Python 3.5.
OS install:
Choosing an other template New Age:
Folder setup:
It link all CSS,JS and images to flask static folder.
Download:
Run
If work should look like Live Preview
Using Linux Mint 18.1 Serena,with default Python 3.5.
OS install:
sudo apt-get install python3-pip sudo pip3 install virtualenvVirtual environment with Flask, npm, gulp, bower, Yeoman:
# Make virtual enviroment mint@mint ~ $ virtualenv -p /usr/bin/python3.5 new_age mint@mint ~ $ cd new_age # Activate mint@mint ~/new_age $ source bin/activate # Check enviroment (new_age) mint@mint ~/new_age $ which python /home/mint/new_age/bin/python (new_age) mint@mint ~/new_age $ pip -V pip 9.0.1 from /home/mint/new_age/lib/python3.5/site-packages (python 3.5) # Install Flask (new_age) mint@mint ~/new_age $ pip install flask # nodeenv (new_age) mint@mint ~/new_age $ pip install nodeenv (new_age) mint@mint ~/new_age $ nodeenv -p # Version (new_age) mint@mint ~/new_age $ node -v v7.8.0 (new_age) mint@mint ~/new_age $ npm -v 4.2.0 # install web tool (new_age) mint@mint ~/new_age $ npm install -g yo gulp-cli bower (new_age) mint@mint ~/new_age $ npm install --save-dev gulp (new_age) mint@mint ~/new_age $ npm init # Versions (new_age) mint@mint ~/new_age $ gulp -v [20:12:37] CLI version 1.2.2 [20:12:37] Local version 3.9.1 (new_age) mint@mint ~/new_age $ bower -v 1.8.0
Choosing an other template New Age:
Folder setup:
newage\ -- app.py tempaltes\ -- index_flask.html static\ \all folder from bower downloadI made script to change
index.html
to index_flask.html
It link all CSS,JS and images to flask static folder.
Download:
(new_age) mint@mint ~/new_age $ bower install https://github.com/BlackrockDigital/startbootstrap-new-age.gitIn startbootstrap-new-age folder:
Run
index_changer.py
copy index_flask.html
and all folders to static folder.# app.py from flask import Flask, render_template, jsonify, request app = Flask(__name__) @app.route('/') def hello(): return render_template("index_flask.html") if __name__ == '__main__': app.run(debug=True)Run it using Flask build in web-server:
python app.py
in browser 127.0.0.1:5000
If work should look like Live Preview