Building Data-Driven Web Apps with Pyramid and SQLAlchemy Transcripts
Chapter: Using SQLAchemy
Lecture: Working with package details

Login or purchase this course to watch this video and the rest of the course contents.
0:00 So far we've seen our homepage is looking really sweet. We don't have that much data yet but it is data driven and this is coming out of the database.
0:08 However, when we pull up the details for one of the packages under project/{package_id} well the details are not so much.
0:16 So that's what we're going to focus on in this video on how to fix this. Now, the actual design for this page remember, remind you what this looks like
0:30 it looks like this. It's got this little install instruction whether or not it's the latest version the ability to see all the releases
0:36 the details, the homepage, the maintainers and so on, and so on. All of this stuff. It turns out the actual web design to do all that
0:46 would take quite a while and we already spent a ton of time back in the adding design after the bootstrap chapter that we already did
0:54 on the homepage and this is really pretty similar. So what I'm going to do is just quickly talk you through
0:58 what we got here. So here is some more HTML. We're using the same, sort of, hero concept. This time we've got that little install bit.
1:07 Whether or not it's the latest release and how to switch from that. Same little stats. Here instead of having the numbers though, we have the summary.
1:15 And the maintainers and we have the side bar navigation thing. And then somewhere down here we have the project details.
1:23 And we're using structured output HTML like stuff. Now if this was just marked down to be real easy to convert it to HTML
1:30 and actually show it properly formatted but because most of it's restructured text and I haven't found a good library for that
1:37 I just threw it into a pre so we can just read it, all right. So it's not going to be perfect but it's close enough.
1:43 So with this in place, you think we could load it up but in fact, if I rerun it here it's going to run into some problems.
1:51 'Cause we don't have the data. Right so wait hold up, we need the actual package object from the database. You just gave us a fake name.
1:58 This is not really the package object. Our goal will be to implement the data access layer and pass the right amount data over
2:06 make this view happy, right. So working our package service and our controller.


Talk Python's Mastodon Michael Kennedy's Mastodon