#100DaysOfWeb in Python Transcripts
Chapter: Days 37-40: Introduction to Pyramid framework
Lecture: Creating the app: Via PyCharm
0:00 You've seen how to create a project
0:01 using a command line.
0:03 Now, I personally prefer that way.
0:06 I like a lot of control over my projects, and so on.
0:09 But when I was new to Python, I very much appreciated
0:12 PyCharm's help creating these projects.
0:15 So you may like that much better.
0:17 So if you're using PyCharm, let's just go
0:18 really quickly through how to get started
0:20 with Pyramid, there.
0:21 So this is actually going to be quite easy, right?
0:24 So click on create new project
0:26 and we get a choice, we can go down and find Pyramid.
0:29 And it says we're going to create a new virtual environment
0:32 and let's put this on the desktop/bill-pro
0:36 let's just call it bill-pro.
0:40 So it's going to create a new virtual environment
0:42 for us right there, and it could even
0:44 could have it use Pipenv or Conda if you rather
0:47 we'll just let it do it this way.
0:49 So that's going to be based on 3.7
0:50 that's what we want.
0:52 So this is the go to the command line
0:54 create the virtual environment.
0:56 And then the cookiecutter part is down here
0:59 so what scaffold do you want to use
1:01 you don't get all of them here, you just get these three.
1:03 We'll go starter, remember it asks us about
1:06 whether we want to use Chameleon
1:07 it also asks us what data later we wanted to use.
1:10 It's not going to ask us that.
1:12 And in templates, this is fine.
1:14 We're all ready to go, we press the button
1:16 we wait a moment
1:18 I said it ran the setup, it actually doesn't, sorry.
1:21 But it ran, at least did the install
1:23 for the base requirements of Pyramid.
1:25 Now, remember we ran python setup.py develop
1:28 where we could just click this
1:29 and will take care of that for us.
1:32 That'll also add the missing requirements above.
1:34 It think that's about it
1:35 everything's ready to go, let's check the terminal
1:37 see our virtual environment is there, and press run.
1:40 Boom, should be basically the same
1:42 except for the word cookiecutter
1:43 probably won't appear here.
1:46 Right, welcome to this bill-pro app generated by PyCharm.
1:49 Right, see we don't have quite as much control
1:51 but honestly, that doesn't really matter that much
1:53 we can go back and just edit HTML and so on, here.
1:56 So we open this up again, it should look exactly the same
1:58 except for the virtual environment is ignored
2:00 templates are selected, and things like that.
2:03 You still will be better off if you go and
2:05 mark this as a resource root and a source root.
2:12 You'll get auto-complete for like
2:13 things in the static folder
2:14 stuff like that in your templates.
2:16 There you have it, that's how we get started with Pyramid
2:18 and we've got some structure, but not
2:21 terribly lots of structure to get started with.
2:24 We've got views, tests
2:26 we've got our templates, couple of those.
2:29 This template is based on this sort of master template
2:32 that lets us change overall look and feel of the site
2:36 and then we've got our static folder.
2:38 We'll add more structure as we go
2:39 now we're ready to start building out our
2:42 bill tracker pro demo app using Pyramid.