Python for Entrepreneurs Transcripts
Chapter: Course Conclusion
Lecture: Lightning review: applied-pyramid

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Next up, we said alright, we know enough css we got our code in github and source control, and we know the basics of Pyramid,
0:08 let's actually build some really interesting things. So we said here is our goal, how do we build this thing?
0:15 We built our blue yellow rockets, not quite this far, but we came close so we said what are the elements of these real apps?
0:24 Sure we have the building blocks, but let's do some more. First, we said let's switch from standard method based views
0:30 to class based views with something called Pyramid handlers, which means it's much more convention driven,
0:36 basically you set up the routing for the classes and you could have ten or fifteen methods on that class
0:41 that all automatically pick up this url convention. We said with our templates, we want to have a shared layout
0:48 so the standard navigation and standard css and javascript is included on all the pages and we just basically write what is different.
0:57 We said we want to have form that excepts user input for things like log in, registration, a newsletter sign ups, all that kind of stuff.
1:05 So we spent a lot of time talking about that, and that generated let's say much more complex or full featured view methods
1:12 in our classes, so we said alright, let's take some of that functionality mostly the data exchange and validation,
1:19 and move it to these things called view models which are easy to test, which are separate from the actual logic of the application.
1:25 So that was a real big addition that we made. And finally, the validation on the client side was done by adding some HTML 5 validation through
1:36 basically the required attribute or setting the type of the fields, and then the server side validation was done with the view models.


Talk Python's Mastodon Michael Kennedy's Mastodon