1 00:00:00,000 --> 00:00:09,526 [MUSIC] 2 00:00:09,526 --> 00:00:12,312 Hello, Pythonistas, Brian here. 3 00:00:12,312 --> 00:00:16,156 Today, we'll assemble a portfolio site using Flask, 4 00:00:16,156 --> 00:00:19,772 a popular Python framework for creating websites. 5 00:00:19,772 --> 00:00:25,927 A portfolio is essential for developers, whether you're just starting or a pro. 6 00:00:25,927 --> 00:00:28,469 Think of your portfolio as your display window, 7 00:00:28,469 --> 00:00:31,513 showing off all the fabulous projects you've worked on. 8 00:00:31,513 --> 00:00:36,360 Plus, making a portfolio is a fantastic project on its own. 9 00:00:36,360 --> 00:00:40,977 We'll use the project Travis created with vanilla HTML, CSS, and 10 00:00:40,977 --> 00:00:43,252 JavaScript as a starting point. 11 00:00:43,252 --> 00:00:48,421 If you're interested in how the structure, styles, and JavaScript were created, 12 00:00:48,421 --> 00:00:52,386 you can find a link to his workshop in the teacher's notes below. 13 00:00:52,386 --> 00:00:53,662 Let's get started. 14 00:00:53,662 --> 00:00:58,667 I've created a new project folder named MY-PYTHON-PORTFOLIO, 15 00:00:58,667 --> 00:01:04,032 moved the project files into it, and open it inside Visual Studio Code. 16 00:01:04,032 --> 00:01:06,321 In the project files for this workshop, 17 00:01:06,321 --> 00:01:09,630 you'll find the assets from Travis that we'll be using. 18 00:01:09,630 --> 00:01:12,842 We'll primarily focus on Travis's HTML, 19 00:01:12,842 --> 00:01:18,238 using that to create our reusable templates for each portfolio section. 20 00:01:18,238 --> 00:01:22,987 Let's create an app.py file, then a README.md file. 21 00:01:22,987 --> 00:01:27,369 For now, I will just type # My Python Portfolio. 22 00:01:27,369 --> 00:01:31,611 I encourage you, though, to flesh this file out with more details. 23 00:01:31,611 --> 00:01:35,645 Then, open the terminal to activate our virtual environment and 24 00:01:35,645 --> 00:01:37,561 install the Flask framework. 25 00:01:37,561 --> 00:01:40,496 I will be running the commands for MacOS. 26 00:01:40,496 --> 00:01:44,114 The equivalent Windows commands will be in the teacher's notes. 27 00:01:44,114 --> 00:01:51,834 Running python3 -m venv env will create the virtual environment. 28 00:01:51,834 --> 00:01:56,360 Now we must activate the virtual environment by running the activate script 29 00:01:56,360 --> 00:01:57,500 it created for us. 30 00:02:04,773 --> 00:02:07,236 Now that we have our environment set up, 31 00:02:07,236 --> 00:02:10,431 let's install Flask by running pip install flask. 32 00:02:19,927 --> 00:02:24,911 Now that we have our core setup done, we should create a Git repo for the project. 33 00:02:24,911 --> 00:02:28,212 We'll create a .gitignore file to flag files and 34 00:02:28,212 --> 00:02:31,285 folders we don't want to be added to our repo. 35 00:02:31,285 --> 00:02:36,190 Let's start by adding the env folder, then .vscode, pycache, and 36 00:02:36,190 --> 00:02:38,697 if you're on a Mac, .DS_Store. 37 00:02:47,233 --> 00:02:53,699 Next, let's run git init, git add dot, and git commit -m init commit. 38 00:02:56,299 --> 00:02:58,921 Now let's get our repo hosted on GitHub. 39 00:02:58,921 --> 00:03:03,643 We'll head to github.com/new, give the repo a name, 40 00:03:06,955 --> 00:03:09,255 Then click Create repository. 41 00:03:14,048 --> 00:03:18,933 Lastly, click this button to copy the three commands for an existing repo. 42 00:03:18,933 --> 00:03:22,335 Let's paste the three commands into the terminal and hit Enter. 43 00:03:27,823 --> 00:03:30,757 Perfect, our project is now on GitHub. 44 00:03:30,757 --> 00:03:35,529 We'll be coming back to this GitHub repo in a later video.