WEBVTT
Kind: captions
Language: en

00:00:00.060 --> 00:00:07.830
Next let's test our view set in the
browser load up the terminal and connect

00:00:07.830 --> 00:00:13.679
to our vagrant server by running vagrant
up and then once the vagrant server is

00:00:13.680 --> 00:00:18.500
running type vagrant SSH to connect to
it

00:00:21.020 --> 00:00:24.100
once you're connected type cd forward slash

00:00:24.109 --> 00:00:29.670
vagrant to switch to the vagrant directory and then
let's activate our virtual environment

00:00:29.670 --> 00:00:37.820
by typing source tilde forward slash env forward slash bin slash activate

00:00:37.820 --> 00:00:39.660
Then let's start the Django

00:00:39.660 --> 00:00:50.840
development server by running Python
manage dot py run server 0.0.0.0 : 8000

00:00:50.840 --> 00:00:55.960
Once the server is running we can head over
to our browser and then navigate to

00:00:55.969 --> 00:01:03.629
127.0.0.1 : 8000 which will take
us to the route of our Django project and

00:01:03.629 --> 00:01:10.770
then we can type forward slash API to
take us to the route of our API you may

00:01:10.770 --> 00:01:14.909
notice that this page looks slightly
different from previously when we

00:01:14.909 --> 00:01:20.820
previously tested our API view and
that's because the router has a cool

00:01:20.820 --> 00:01:25.229
function where it will add this
browsable API for all the other items

00:01:25.229 --> 00:01:30.869
registered to our router
unfortunately it doesn't include any API

00:01:30.869 --> 00:01:36.720
views or any URLs that we've registered
directly to the URLs pattern it only

00:01:36.720 --> 00:01:42.150
includes things we register via our
router and this is just a limitation of

00:01:42.150 --> 00:01:46.409
this feature in the Django rest
framework we can see here that we have

00:01:46.409 --> 00:01:51.899
our hello view set that we registered
and if we click it then it will return

00:01:51.899 --> 00:01:59.159
the response that we defined in our view
set in the views dot py which is a hello

00:01:59.159 --> 00:02:04.619
message and a list of all of the
features or some features of view sets

00:02:04.619 --> 00:02:11.009
in the Django rest framework so when we
access this URL we do a HTTP GET to the

00:02:11.009 --> 00:02:16.150
base of the registered view
which will take us to this list function

00:02:16.150 --> 00:02:23.350
that will execute this code and return
this response so we can see that our

00:02:23.350 --> 00:02:28.470
hello view set is working correctly in
our project

