8
8
schema_view = get_schema_view (
9
9
openapi .Info (
10
10
title = "Snippets API" ,
11
- default_version = 'v1' ,
11
+ default_version = "v1" ,
12
12
description = "Test description" ,
13
13
terms_of_service = "https://www.google.com/policies/terms/" ,
14
14
contact = openapi .
Contact (
email = "[email protected] " ),
15
15
license = openapi .License (name = "BSD License" ),
16
16
),
17
17
public = True ,
18
- permission_classes = ([permissions .AllowAny ,]),
18
+ permission_classes = (
19
+ [
20
+ permissions .AllowAny ,
21
+ ]
22
+ ),
19
23
)
20
24
21
25
22
26
router = routers .DefaultRouter ()
23
- router .register (r' users' , views .UserViewSet )
24
- router .register (r' shortener' , views .ShortlinkViewSet )
27
+ router .register (r" users" , views .UserViewSet )
28
+ router .register (r" shortener" , views .ShortlinkViewSet )
25
29
26
30
# Wire up our API using automatic URL routing.
27
31
# Additionally, we include login URLs for the browsable API.
28
32
urlpatterns = [
29
- path ('swagger/' , schema_view .with_ui ('swagger' , cache_timeout = 0 ), name = 'schema-swagger-ui' ),
30
- path ('' , include (router .urls )),
31
- path ('api-auth/' , include ('rest_framework.urls' , namespace = 'rest_framework' )),
32
- path ('r/<slug:redirect_string>' , views .RedirectViewSet .redirect_to )
33
- ]
33
+ path (
34
+ "swagger/" ,
35
+ schema_view .with_ui ("swagger" , cache_timeout = 0 ),
36
+ name = "schema-swagger-ui" ,
37
+ ),
38
+ path ("" , include (router .urls )),
39
+ path ("api-auth/" , include ("rest_framework.urls" , namespace = "rest_framework" )),
40
+ path ("r/<slug:redirect_string>" , views .RedirectViewSet .redirect_to ),
41
+ ]
0 commit comments