Python Forum

Full Version: How to install flask boostrap?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hallo,

I am following this tutorial: https://www.youtube.com/watch?v=8aTnmsDMldY

to make my very first serious(?) web.


Now,Python code contains

from flask_bootstrap import Bootstrap
and when I hit Run, console says I have no Flask Boostrap installed.


I have ZERO :) idea how to do it :). I can't find any tutorial neither....

If somebody would be so nice and explain me in human (...ignorant... :) ) language how to do it?


Thank you very much!

Sincerely,

Peter the Noob Noob
Hello! OS?
Open a terminal/cmd window and run:

python -m pip install flask-bootstrap
HORY SHET I DID IT!!11!1!


All by myself! I am fekin Alan Turing :D

(Oct-22-2017, 02:59 PM)wavic Wrote: [ -> ]Hello! OS?
Open a terminal/cmd window and run:

python -m pip install flask-bootstrap


Thenx.


What I did was download files from internet, copyed all according to adress and then wrote pip install flask-bootstrap.

Next what I know is that my new web app werks! ^_^

....but just for my curiosity:

when I het Run, this is what console writes (127.0.0.1:5000 works fine...)

Quote:C:\Language\Python3.6\python.exe C:/temp/example1/venv/app/FirstWeb.py
* Restarting with stat
* Debugger is active!
* Debugger PIN: 236-479-464
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [22/Oct/2017 16:59:11] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [22/Oct/2017 16:59:11] "GET /static/starter-template.css HTTP/1.1" 200 -
127.0.0.1 - - [22/Oct/2017 16:59:11] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [22/Oct/2017 17:03:01] "GET /login HTTP/1.1" 200 -
127.0.0.1 - - [22/Oct/2017 17:03:01] "GET /static/signin.css HTTP/1.1" 200 -
127.0.0.1 - - [22/Oct/2017 17:03:04] "GET /signup HTTP/1.1" 200 -
127.0.0.1 - - [22/Oct/2017 17:03:12] "GET /login HTTP/1.1" 200 -
127.0.0.1 - - [22/Oct/2017 17:03:24] "GET /login HTTP/1.1" 200 -

Process finished with exit code 1


....what these " "GET /login HTTP/1.1" 200 -" mean?


My OS is Windows 8 (I am noob noob....)

maybe one more question please:

according to turtorial https://www.youtube.com/watch?v=8aTnmsDMldY&t=195s
(3:20) I added line:

from flask import FlaskForm
but when I hit Run, I see error message

Quote:Traceback (most recent call last):
File "C:/temp/example1/venv/app/FirstWeb.py", line 4, in <module>
from flask import FlaskForm
ImportError: cannot import name 'FlaskForm'

I installed Flask WTF and when I open console and try to reinstall it, it says it is all right and I have all that is needed installed.


....what is wrong, please?

(OS is Windows 8)
The import statement is:
from flask_wtf import FlaskForm
Not as you have it:
from flask import FlaskForm
if you haven't already done so, you must import the flask-wtf package
which you would do with the statement:
pip install flask-wtf