Building Data-Driven Web Apps with Pyramid and SQLAlchemy Transcripts
Chapter: Routing and URLs
Lecture: Demo: Routing, loading the project

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Alright let's start writing some code to do with routing. Let's being by reviewing the Git repository.
0:08 Now we have Chapter 6 that's the chapter that we're on and again, here is an exact copy of what we're starting with.
0:14 This is just copying over Chapter Five's materials the template stuff. It's going to stay that way, this one is the one
0:21 I'm going to work on, so this one is changing. Now, I'm not going to go over and over again setting up this in PyCharm.
0:28 If you need help with that be sure to check out the previous previous chapter where we did that. But I will show you one quick thing
0:35 I'll go ahead and go through the steps and have a shortcut for the rest of the things going on here. So let's go over to this folder.
0:43 Now over here remember where the development.ini and production.ini there's no venv There's no virtual environment.
0:50 And there's a couple of steps to go through creating it and activating it and it's also good to update pip and setuptools cause
0:58 setuptools at the time of this recording is 11 versions out of date, oh my goodness. So instead of typing that over and over again
1:05 I've created this alias venv, which runs Python3 -m venv, virtual environment called that and then it's going to activate it
1:17 and then it's going to update the tools and then just let you know it worked. So I'm going to be running this from the rest of the time
1:21 and this is the thing I've created, it's not a Python thing so either make a batch file, or put this in you
1:27 bash.rc or your .bashrc or zshrc whatever you're using. Okay, look's like everything is good notice it activated it, and even
1:41 got the new version right there. Okay so we're going to just drop this under PyCharm. Let's go ahead and add that vcs root.
1:51 Alright, in this chapter what we're going to do is we're going to build up the routing URL structure and the basic sort of layout in
1:59 terms of the views and what not. We're not going to implement all of them, but at least we'll get some place holders in place.
2:06 We'll just make sure things run and click down here we should have our virtual environment. We do. The one in routing looks like it's working.
2:17 Now remember for this to work, we also have to say Python develop, we can do that here. Or we can go over here if we click.
2:26 in the right spot right there, see it runs setup task develop would be the same thing. Okay, you should be able to run this.
2:39 Looks like it's working let's just make sure we can open it up, great. Everything's good here's our fake data that we showed. Alright.

Talk Python's Mastodon Michael Kennedy's Mastodon