-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve project recommendation (#1020)
* create views and utils methods to recommend projects * create api function to receive recommended projects in the frontend * modify project filtering * refactor recommend projects function Issue: #1013 Signed-off-by: Ndibe Raymond Olisaemeka <[email protected]> Co-authored-by: Ndibe Raymond Olisaemeka <[email protected]>
- Loading branch information
Showing
7 changed files
with
852 additions
and
758 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,71 @@ | ||
from django.urls import path | ||
from .views import * | ||
|
||
from .views import ( | ||
AddCommentAPIView, | ||
CategoryListAPIView, | ||
DeleteCommentAPIView, | ||
ProjectAutocompleteAPIView, | ||
ProjectCreateAPIView, | ||
ProjectDeleteAPIView, | ||
ProjectDetailsAPIView, | ||
ProjectListAPIView, | ||
ProjectRecommendAPIView, | ||
ProjectSearchAPIView, | ||
ProjectTagAutocompleteAPIView, | ||
ProjectTagSearchAPIView, | ||
ProjectUpdateAPIView, | ||
SavedProjectsAPIView, | ||
StaffPickDetailsAPIView, | ||
StaffPickListAPIView, | ||
ToggleLikeAPIView, | ||
ToggleSaveAPIView, | ||
UnpublishCommentAPIView, | ||
) | ||
|
||
app_name = "projects" | ||
|
||
urlpatterns = [ | ||
path('', ProjectListAPIView.as_view(), name='list_projects'), | ||
path('tags/autocomplete/', | ||
ProjectTagAutocompleteAPIView.as_view(), | ||
name='autocomplete_tags'), | ||
path('tags/search/', ProjectTagSearchAPIView.as_view(), | ||
name='search_tags'), | ||
path('autocomplete/', | ||
ProjectAutocompleteAPIView.as_view(), | ||
name='autocomplete_projects'), | ||
path('search/', ProjectSearchAPIView.as_view(), name='search_projects'), | ||
path('create/', ProjectCreateAPIView.as_view(), name='create_project'), | ||
path('<uuid:pk>/update/', | ||
ProjectUpdateAPIView.as_view(), | ||
name='update_project'), | ||
path('<uuid:pk>/delete/', | ||
ProjectDeleteAPIView.as_view(), | ||
name='delete_project'), | ||
path('saved/', SavedProjectsAPIView.as_view(), name="saved_projects"), | ||
path('<uuid:pk>/toggle-like/', | ||
ToggleLikeAPIView.as_view(), | ||
name="toggle_like"), | ||
path('<uuid:pk>/toggle-save/', | ||
ToggleSaveAPIView.as_view(), | ||
name="toggle_save"), | ||
path('<uuid:pk>/add-comment/', | ||
AddCommentAPIView.as_view(), | ||
name="add_comment"), | ||
path('<int:pk>/unpublish-comment/', | ||
UnpublishCommentAPIView.as_view(), | ||
name="unpublish_comment"), | ||
path('<int:pk>/delete-comment/', | ||
DeleteCommentAPIView.as_view(), | ||
name="delete_comment"), | ||
path('<uuid:pk>/', ProjectDetailsAPIView.as_view(), name='detail_project'), | ||
path('categories/', CategoryListAPIView.as_view(), name='category'), | ||
path('staff-picks/', StaffPickListAPIView.as_view(), name="staff_picks"), | ||
path('staff-picks/<uuid:pk>/', | ||
StaffPickDetailsAPIView.as_view(), | ||
name="staff_pick_details") | ||
path("", ProjectListAPIView.as_view(), name="list_projects"), | ||
path( | ||
"tags/autocomplete/", | ||
ProjectTagAutocompleteAPIView.as_view(), | ||
name="autocomplete_tags", | ||
), | ||
path("tags/search/", ProjectTagSearchAPIView.as_view(), name="search_tags"), | ||
path( | ||
"autocomplete/", | ||
ProjectAutocompleteAPIView.as_view(), | ||
name="autocomplete_projects", | ||
), | ||
path("search/", ProjectSearchAPIView.as_view(), name="search_projects"), | ||
path("create/", ProjectCreateAPIView.as_view(), name="create_project"), | ||
path("<uuid:pk>/update/", ProjectUpdateAPIView.as_view(), name="update_project"), | ||
path("<uuid:pk>/delete/", ProjectDeleteAPIView.as_view(), name="delete_project"), | ||
path("saved/", SavedProjectsAPIView.as_view(), name="saved_projects"), | ||
path("<uuid:pk>/toggle-like/", ToggleLikeAPIView.as_view(), name="toggle_like"), | ||
path("<uuid:pk>/toggle-save/", ToggleSaveAPIView.as_view(), name="toggle_save"), | ||
path("<uuid:pk>/add-comment/", AddCommentAPIView.as_view(), name="add_comment"), | ||
path( | ||
"<int:pk>/unpublish-comment/", | ||
UnpublishCommentAPIView.as_view(), | ||
name="unpublish_comment", | ||
), | ||
path( | ||
"<int:pk>/delete-comment/", | ||
DeleteCommentAPIView.as_view(), | ||
name="delete_comment", | ||
), | ||
path("<uuid:pk>/", ProjectDetailsAPIView.as_view(), name="detail_project"), | ||
path( | ||
"<uuid:pk>/recommend/", | ||
ProjectRecommendAPIView.as_view(), | ||
name="recommend_projects", | ||
), | ||
path("categories/", CategoryListAPIView.as_view(), name="category"), | ||
path("staff-picks/", StaffPickListAPIView.as_view(), name="staff_picks"), | ||
path( | ||
"staff-picks/<uuid:pk>/", | ||
StaffPickDetailsAPIView.as_view(), | ||
name="staff_pick_details", | ||
), | ||
] |
Oops, something went wrong.