HTMX + Django: Modern Python Web Apps, Hold the JavaScript Transcripts
Chapter: Surveying the non-JS-enabled Django app
Lecture: Creating a PyCharm project
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
All right, I'm inside PyCharm at the welcome screen. I'm on a Mac, so things might be slightly different depending on what platform you're using.
0:10
I'm gonna create a new project. Choose my copy of the video collector from the lesson three. And notice here that a virtualenv will get created.
0:26
I'm running the Community Edition of PyCharm. The Pro version understands Django.
0:42
If you're running Pro, there will have been a bar along the left-hand side when you create the project.
0:47
If it's there and you select Django, you'll be able to skip some of the steps that I'm about to show you.
0:53
When I created the project, PyCharm added a virtual environment for me.
0:58
Now if I open the requirements.txt file, it detects that it is a requirements.txt file and prompts me to install the packages. Let's do that.
1:19
And there you go. Django and more Iter tools is installed. It'd be nice to be able to run the development server within PyCharm, and you can if you
1:29
create a run configuration. If you're running Pro, this will have been done for you by selecting that it's a Django project.
1:38
In the Community Edition, you have to do this for yourself. Start by clicking the Run Configuration dropdown.
1:48
Choose Edit Configurations, and then Add New Configuration. Use the Python option.
2:05
And what you're doing here is telling PyCharm that when you hit the Run button, you want to run a script.
2:11
That script is the Manage.py script, so you can run the development server. You can pick that from the file chooser.
2:27
Adding run server as an option to the management script means when you hit run, the development server will be run.
2:36
the parent directory as the working directory. And you're good to go. Now if I hit the run button, the development server is activated.
2:56
Let's go off to a browser and see that it worked. And here it is, the video collector site.
3:05
already seen it in the screenshots, let me just quickly show you it live. Let's look at the racing videos. This is the category page. It has 8 videos.
3:20
Back to the top, and in the corner here is the button for the feed page. And here are all the videos in the feed. You get the idea.
3:37
Let's go back to PyCharm. Clicking this stops the server.