Commit 51457c2 1 parent 3bfbfd6 commit 51457c2 Copy full SHA for 51457c2
File tree 2 files changed +11
-15
lines changed
2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 2
2
from rest_framework .routers import DefaultRouter
3
3
4
4
from .views import (
5
- CandidateCreateView ,
5
+ CandidateCreateAPIView ,
6
6
CandidateUserListView ,
7
7
CandidateCompanyViewSet ,
8
8
CandidateCompanyListView ,
Original file line number Diff line number Diff line change 1
1
from django .urls import path
2
- from rest_framework .routers import DefaultRouter
3
2
4
3
from .views import (
5
4
CompanyPublicListAPIView ,
9
8
CompanyCategoryListView ,
10
9
)
11
10
12
- router = DefaultRouter ()
13
- router .register (
14
- "" ,
15
- CompanyPublicListAPIView ,
16
- basename = "company_public_list"
17
- )
18
-
19
- router .register (
20
- "<slug:slug>" ,
21
- CompanyPublicRetrieveAPIView ,
22
- basename = "company_public_retrieve"
23
- )
24
11
25
12
urlpatterns = [
13
+ path (
14
+ "<str:slug>" ,
15
+ CompanyPublicRetrieveAPIView .as_view (),
16
+ name = "company_public_retrieve"
17
+ ),
18
+ path (
19
+ "" ,
20
+ CompanyPublicListAPIView .as_view (),
21
+ name = "company_public_list"
22
+ ),
26
23
path (
27
24
"company/" ,
28
25
UserCompanyView .as_view (),
40
37
),
41
38
]
42
39
43
- urlpatterns += router .urls
You can’t perform that action at this time.
0 commit comments