Building Data-Driven Web Apps with Flask and SQLAlchemy Transcripts
Chapter: Your first Flask site
Lecture: Concept: Creating the starter project PyCharm
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
We saw it was super fast and easy to create a new project
0:03
a Flask app in PyCharm.
0:05
Most of the time it was just me talking.
0:07
I think if I just typed it would be like 10 seconds
0:09
or something ridiculous like that.
0:11
But none the less, let's review the steps really really quickly.
0:14
Here we have PyCharm.
0:15
It loads like this if there is no project loaded.
0:18
Otherwise, you will have to go to the file menu
0:21
or something like that.
0:22
We're going to go over here and hit create new project.
0:24
It defaults to pure Python
0:25
but you want Flask, and then remember the steps.
0:28
We're going to install Flask and other dependencies
0:30
create the directory structure, and what not.
0:32
So, right here.
0:33
New virtual environment, that's checked by default.
0:36
More settings, Jinja, and a templates folder
0:39
checked by default.
0:40
So we're going to install Flask
0:41
create the virtual environment
0:42
and it also creates the app.py all at once.
0:44
Boom, this is what we get.
0:46
Now you saw we probably want to add
0:48
a little more structure to the directory layout here.
0:50
But you can do that along the way
0:52
as you add your first CSS file
0:54
as you add your first view model and what not.
0:56
Here we are, quick and easy, just like that.
0:58
Then if we want to run it
1:00
we're just going to click this little button here.
1:02
It's going to fire it up.
1:03
Set a couple of environment variables.
1:05
Flask app is app.py.
1:06
The environment is development.
1:08
And you saw if we want to edit that run configuration
1:11
we can toggle the debug true or false.
1:14
Off it goes, click the link in the bottom here and ta-da!
1:18
You now have your Flask app all put together
1:22
laid out and running using PyCharm, super easy!