WEBVTT
Kind: captions
Language: en

00:00:00.030 --> 00:00:06.210
So let's register our new view set with
a URL so it can be accessed from the

00:00:06.210 --> 00:00:13.700
browser open up the URLs dot py file
since we already have our views module

00:00:13.700 --> 00:00:19.140
imported to the URLs all we need to do
to register our view set is to add a new line

00:00:19.140 --> 00:00:22.340
below the router that we created
previously

00:00:22.340 --> 00:00:29.279
so let's register our view set by typing
router dot register and we'll call our

00:00:29.279 --> 00:00:37.800
view set the profile view set and let's
link that up to views dot user profile

00:00:37.800 --> 00:00:41.080
view set

00:00:41.080 --> 00:00:45.870
unlike the hello view set that
we've registered previously we don't

00:00:45.870 --> 00:00:51.840
need to specify a base name argument
and this is because we have in our

00:00:51.840 --> 00:00:58.050
view set a query set object if you
provide the query set then Django rest

00:00:58.050 --> 00:01:02.850
framework can figure out the name from
the model that's assigned to it so you

00:01:02.850 --> 00:01:08.610
only need to specify the base name if
you are creating a view set that doesn't

00:01:08.610 --> 00:01:12.810
have a query set or if you want to
override the name of the query set that

00:01:12.810 --> 00:01:15.800
is associated to it

00:01:15.800 --> 00:01:19.710
Okay so save the URLs dot py file and that's all we need

00:01:19.710 --> 00:01:24.470
to do to register our view set with a
URL

