WEBVTT

00:02.120 --> 00:10.820
Okay, our application is up and running and we managed to install everything and have it run with a

00:10.820 --> 00:12.350
command run server.

00:12.380 --> 00:13.040
Okay.

00:13.040 --> 00:21.620
So to see what's actually inside the folders we have created, let's install a PyCharm, which is a

00:21.620 --> 00:25.900
very popular IDE for Python.

00:25.910 --> 00:29.150
So this is coming from Jetbrains company.

00:29.150 --> 00:34.880
So you go to W-w-w jetbrains.com and then slash PyCharm.

00:34.880 --> 00:41.390
And in this section you can see here, that's an ID that we can download and you can go to download

00:41.420 --> 00:43.430
now and you have two options.

00:43.430 --> 00:49.910
First one, you can install the professional version and I think you have a free trial for a month.

00:49.910 --> 00:53.570
So you can download this one or you can go for a community version.

00:53.570 --> 00:56.480
So you can install this one.

00:56.510 --> 01:00.890
The professional one has a more options for you.

01:00.890 --> 01:07.560
So if you want to pay this not too much, too too expensive, you can pay to have the professional version.

01:07.590 --> 01:11.790
I've used both and I don't see much improvements, to be honest.

01:11.790 --> 01:17.360
So I usually go for a community one and you can download this and that's completely free.

01:17.370 --> 01:23.460
You can select your operating system and you download this and then you on the wizard, you click next,

01:23.460 --> 01:24.330
next, next, next.

01:24.330 --> 01:27.420
And it's nothing complicated in installing this program.

01:27.420 --> 01:29.610
Once we have it, we can open it.

01:29.610 --> 01:34.950
So I have a PyCharm already downloaded, so I will open it in this computer.

01:37.040 --> 01:39.260
That's, as you can see, community version.

01:39.260 --> 01:42.440
And we start with that splash screen here.

01:42.440 --> 01:46.700
And what we can do is we can open our you can create new project here.

01:46.700 --> 01:52.820
What we did in the previous video is we create our project manually in a command line.

01:52.820 --> 01:54.950
But you can also do it with the PyCharm.

01:54.950 --> 01:59.600
So creating new project here will start and create virtual environment for you.

01:59.600 --> 02:03.230
So that's very handy, but we already have it, so I will do open.

02:03.770 --> 02:05.300
Then you have desktop.

02:05.300 --> 02:09.110
This is our folder and I will open this folder here.

02:17.050 --> 02:24.610
And we are inside of our ID here on the left hand side, you have project, you can click on the projects

02:24.610 --> 02:26.830
and you can collapse it and expand it.

02:26.830 --> 02:31.840
And you also have some other tabs here the same way you have it on the bottom.

02:31.840 --> 02:38.530
So you have some tabs that you can open and you can switch in between and you can use it straight away.

02:38.560 --> 02:41.830
This one is very important one, which is terminal.

02:41.860 --> 02:46.060
Basically, this terminal is the same thing as we have here.

02:46.060 --> 02:50.020
So at the moment the our server is running from this terminal.

02:50.020 --> 02:56.290
What I can do is I can hold Ctrl and click C and I will just kill the server.

02:56.290 --> 03:03.720
So at the moment this is our server is not running anymore and I have virtual environment here activated.

03:03.730 --> 03:08.770
What I can do is they are activate and it's not anymore.

03:08.780 --> 03:15.520
I just can close it and it will be deactivated automatically so I can close my terminal and from now

03:15.520 --> 03:18.290
on whatever I will need to use a terminal.

03:18.290 --> 03:21.620
I can use it from this terminal embedded in the ID.

03:21.860 --> 03:27.170
What I can do is also I can make font a little bit bigger.

03:31.980 --> 03:33.420
And do 24.

03:35.780 --> 03:43.610
And you can see here I have a nice and big, so you will be able to see my lines much better.

03:43.610 --> 03:51.530
So what you can see here, I'm inside already tutorial folder and at the beginning of the line you can

03:51.530 --> 03:52.760
see VNV.

03:52.790 --> 03:58.490
That means virtual environment has been activated automatically by PyCharm for me.

03:58.490 --> 04:00.770
So I don't need to do anything here.

04:00.770 --> 04:01.850
I'm inside already.

04:01.850 --> 04:05.720
This folder which is here and that's been activated.

04:05.720 --> 04:09.710
So whatever I will do here, it will be already in virtual environment.

04:09.710 --> 04:15.230
That's very important and very handy because we don't need to activate it every time we will use this.

04:16.010 --> 04:17.990
So we have our terminal.

04:17.990 --> 04:20.130
Then we have an extra things here.

04:20.150 --> 04:24.590
Later on, I will show you how we can actually use some of this feature.

04:24.590 --> 04:32.030
But important part here is we can set up our PyCharm to do things for us.

04:32.030 --> 04:36.440
That's why it's called IDE Integrated Development Environment.

04:36.470 --> 04:39.350
It can do a lot of things for us automatically.

04:39.440 --> 04:45.530
As you can see here, the Manage.py was the file that we run the server before in the terminal.

04:45.530 --> 04:53.720
If I go here now and switch to our server, if I will refresh it now you can see it going to be rich

04:53.720 --> 04:59.300
because we already killed that server in our terminal At the moment it's not working.

04:59.300 --> 05:01.310
So let's come back to our IDE.

05:02.000 --> 05:10.550
And inside here what I can do is I can right click on the Manage.py and here I can do run, manage.

05:10.610 --> 05:15.770
I will do that here and you can see it will fail.

05:15.770 --> 05:18.380
And you hit here.

05:18.380 --> 05:27.800
You see some kind of message that running the manage.py will need to ask for certain command.

05:27.800 --> 05:30.650
So previously we used run server.

05:30.650 --> 05:33.050
But I don't want to do it from here.

05:33.050 --> 05:40.220
Every time I open this folder I don't want to run it run server here I want to configure but the first

05:40.220 --> 05:45.230
time you will run this manage.py you can see here also it's available there.

05:45.230 --> 05:50.330
So once you have that managed, you can click on the arrow here and you do edit configurations.

05:50.900 --> 05:53.840
And in this screen we can do a few things.

05:53.840 --> 05:58.940
First thing is the most important part is the python interpreter you have here.

05:58.940 --> 06:03.470
And you can see this is pointing to desktop tutorial VMs bin Python.

06:03.470 --> 06:10.220
So this python has been used from my virtual environment and wherever we command will run it will use

06:10.220 --> 06:10.880
this python.

06:10.880 --> 06:16.730
So you might have more than one version of Python installed in different folders.

06:16.730 --> 06:21.590
Another big thing here is that we can set some parameters.

06:21.620 --> 06:26.480
As you remember from the previous video, we use run server.

06:26.600 --> 06:30.470
That was the command used for running our server.

06:30.470 --> 06:35.930
If I will put it in a parameters here run server and then I will apply and click okay.

06:36.290 --> 06:43.040
Every time I will click on this green play button, it will run manage.

06:43.040 --> 06:47.120
So start manage by with that parameter run server.

06:47.120 --> 06:48.440
So let's do it now.

06:48.560 --> 06:56.150
I click it here and you can see here my server is running here and that's the same.

06:56.990 --> 07:03.110
So if we go here, Manage.py run server has been executed and my server is running.

07:03.110 --> 07:07.400
If I click now here on that link you can see my server is running.

07:07.400 --> 07:14.000
So every time you would like to have a server running it, it will be as easy as clicking this icon.

07:14.000 --> 07:17.310
Now the icon is gone because the server is running.

07:17.310 --> 07:22.770
So what you can do is you can do it either here or you can do it here.

07:22.770 --> 07:27.060
At the moment we are in a run tab here on the bottom.

07:27.240 --> 07:34.170
So what I can do is I can stop it from here and run it from there or I can run it from the top view.

07:34.170 --> 07:35.250
So run it.

07:35.280 --> 07:36.690
This is the back mode.

07:36.690 --> 07:42.780
So if you would like to run it in the debug mode, you can also use this one and you can run it here

07:42.780 --> 07:45.000
and you can refresh it here.

07:45.120 --> 07:46.740
Stop and rerun.

07:46.800 --> 07:49.860
You can see our server is rerun.

07:50.010 --> 07:54.240
So next time you will open your PyCharm, this will be available.

07:54.240 --> 08:01.020
So the steps to recreate it will be right click and then run manage this, will add this, manage into

08:01.020 --> 08:06.720
this view and then you can do edit configuration and put run server here.

08:06.720 --> 08:13.260
Once you have it, next time you will just click run and the server will spin up for you automatically

08:13.260 --> 08:16.110
and you will have that available for you to use.

08:16.170 --> 08:19.020
So what else is available in our PyCharm?

08:19.020 --> 08:21.810
There is a lot of things very useful for us.

08:22.800 --> 08:27.090
So during this tutorial we will see more and more things.

08:27.090 --> 08:30.240
But the most important part is actually.

08:31.450 --> 08:37.450
Editing part of it so I can open, for example, this file here.

08:39.660 --> 08:41.460
And I can make more space.

08:41.460 --> 08:43.380
You can see here, that's a.

08:44.180 --> 08:45.510
Code editor.

08:45.530 --> 08:46.940
Very handy for me.

08:46.940 --> 08:49.550
And you can see things are color coded.

08:51.100 --> 08:52.630
So we'll use it a lot.

08:52.630 --> 08:55.780
And this python will help us writing our code.

08:55.810 --> 09:00.100
There is a code completion completion A features.

09:00.100 --> 09:02.770
You also have some color coding.

09:02.770 --> 09:05.500
So that's that's about it.

09:05.530 --> 09:11.170
We'll use it more when we will dig in more into the Django.

09:11.170 --> 09:12.730
But that's the basic setup.

09:12.730 --> 09:16.150
In the next video, I will show you how to create an app.
