Selaa lähdekoodia

change sync staff learderborad url

Mohidul Islam 4 vuotta sitten
vanhempi
commit
85abcf0825
3 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 1 1
      user/templates/staff_list.html
  2. 2 2
      user/urls.py
  3. 2 2
      user/views.py

+ 1 - 1
user/templates/staff_list.html

@@ -7,7 +7,7 @@
   {{ date_form.media }}
     <div>
       <button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-lg">Add a new staff</button>
-      <form method="post" class="form" action="{% url 'export-staff-list' %}">
+      <form method="post" class="form" action="{% url 'sync-staff-list' %}">
           {% csrf_token %}
         <div>
           {{ date_form.start_date }}

+ 2 - 2
user/urls.py

@@ -8,7 +8,7 @@ from .views import (
     ReviewAnalyticsGraph,
     ChartDataAllPlatform,
     StaffLeaderBoard,
-    ExportStaffLeaderBoard,
+    SyncStaffLeaderBoard,
 )
 
 urlpatterns = [
@@ -21,5 +21,5 @@ urlpatterns = [
     path('api/analytics/all-platform', ChartDataAllPlatform.as_view(), name='location-api-analytics-all-platform'),
     path('graph', ReviewAnalyticsGraph.as_view(), name='location-analytics-graph'),
     path('staff', StaffLeaderBoard.as_view(), name='staff-leaderboard'),
-    path('export-staff-list', ExportStaffLeaderBoard.as_view(), name='export-staff-list'),
+    path('sync-staff-list', SyncStaffLeaderBoard.as_view(), name='sync-staff-list'),
 ]

+ 2 - 2
user/views.py

@@ -11,7 +11,7 @@ from yelp.models import YelpReview
 from name_extractor.models import Staff
 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
 
-from name_extractor.utils import extract_names_from_reviews
+from name_extractor.utils import extract_names_from_reviews, make_all_staffs_point_zero
 
 from django.contrib.auth.mixins import LoginRequiredMixin
 from .utils import (
@@ -162,7 +162,7 @@ class StaffLeaderBoard(View):
         return redirect('location-analytics')
 
 
-class ExportStaffLeaderBoard(View):
+class SyncStaffLeaderBoard(View):
 
     def post(self, request, *args, **kwargs):
         start_date = date_str2datetime(request.POST.get('start_date'))