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