#100DaysOfWeb in Python Transcripts
Chapter: Days 37-40: Introduction to Pyramid framework
Lecture: Your-turn: Day 3

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now you've seen me build
0:01 a website with Pyramid.
0:02 It's your turn to choose a cool web app idea
0:06 and build it yourself.
0:07 So let's quickly talk through
0:08 the four day your turn plan.
0:11 Well, the first two days, you've already done that.
0:14 Unless you're skipping ahead
0:15 you've already watched the videos for the first two days.
0:17 They were kind of long.
0:18 I'm sure in the end when we edit them
0:20 they'll come out to be enough to justify
0:22 at least one and a half days of your time
0:24 on this 100 Days of Code journey.
0:26 So, watch the videos. Take some notes.
0:29 Just get ready to do what we're going to do now.
0:31 So that's the first two days.
0:33 Like I said, you probably already did it.
0:34 But if you didn't, uh, start there.
0:36 Now, you're going to go and pick an app from this
0:38 cool blog post that lists a whole bunch
0:41 of different ideas on sample web applications.
0:44 Notice the scroll bar, there's a whole bunch
0:46 of other things, not just simple apps
0:47 but they say "hey look, you could build a weight
0:49 tracker app and here's it's features."
0:51 You could build a calculator.
0:52 You could build a book data base, a recipe app.
0:56 Some of them have video tutorials I actually
0:57 have no idea what you're going to get if you click on that.
0:59 But, anyway, here are a bunch of great app ideas
1:03 and just go in here and pick one out.
1:06 You don't have to do one from that list.
1:07 If you'd rather make up one that's fine
1:09 but hopefully those 18 or however many are there
1:12 will give you a decent idea what the type and size
1:14 of app that makes a lot of sense.
1:16 Remember, you need to be able to build this app
1:18 in two days of progress or two and a half days
1:21 depending on how quickly you got through the videos.
1:23 So it can't be too ambitious. It can't be too big.
1:27 Alright, so day three, this is the first day
1:28 you're actually doing some work.
1:29 You're going to start by installing Cookiecutter
1:32 and using Cookiecutter to create your product.
1:34 If you're going to need some fake data
1:36 use Mockaroo to generate that.
1:38 In the demo code that I wrote for you
1:41 and I copied over
1:43 there's code in the bin folder that will take
1:47 Mockaroo JSON data and import it into SQLAlchemy.
1:50 It doesn't do that through magic.
1:51 You actually have to say well these are my SQLAlchemy
1:54 classes and these are the JSON dictionaries I'm going to
1:57 read and just set the values and call save"
1:59 but I'm sure if you get some Mockaroo JSON data
2:02 you could easily replace what I have there
2:05 to import that data.
2:06 okay, so if you have fake, if you want to have like
2:08 realistic fake data, go there.
2:10 Create the website, answer the questions, okay?
2:12 Now, on this first day, what you're going to do
2:15 is setup the website so it has all the moving parts.
2:19 So you're going to add all the URL's
2:21 the corresponding view methods, and HTML templates.
2:24 They don't have to pass real data around.
2:26 They don't have to look like anything.
2:28 But you should be able to at least navigate
2:30 to the different URL's that you're going to
2:31 have to make your website work.
2:33 And you want to have your SQLAlchemy data model created.
2:37 Again, keep this super simple.
2:39 It should just be two or three data models.
2:42 This doesn't have to be a real app. This is a demo, right?
2:44 And you want to build it really quick.
2:45 So what I propose, is that you copy
2:47 the database behaviors and structure
2:50 that I did in the demo.
2:52 Copy that over, change the import name so things work
2:55 and then just adapt those, right?
2:57 You know, maybe throw away one of the SQLAlchemy classes.
3:01 Change the other around and if you need
3:03 more than one, you know, make a copy.
3:04 Alright, so that's the first day.
3:06 Basically, get everything setup and ready to go.
3:09 Get the data model in place and get the website
3:11 moving pieces working.