|
@@ -6,12 +6,11 @@ from django.shortcuts import get_object_or_404
|
|
from review.models import Review, Reply
|
|
from review.models import Review, Reply
|
|
from review.forms import ReplyForm
|
|
from review.forms import ReplyForm
|
|
from gauth.models import Location
|
|
from gauth.models import Location
|
|
-from review.review_utils import sync_all_review, reply_review
|
|
|
|
|
|
+from review.review_utils import reply_review
|
|
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
|
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
class ReviewListByLocationView(LoginRequiredMixin, View):
|
|
class ReviewListByLocationView(LoginRequiredMixin, View):
|
|
|
|
|
|
def get(self, request, location_id, *args, **kwargs):
|
|
def get(self, request, location_id, *args, **kwargs):
|
|
@@ -105,15 +104,3 @@ class UnRepliedReviewList(LoginRequiredMixin, View):
|
|
reviews = paginator.page(paginator.num_pages)
|
|
reviews = paginator.page(paginator.num_pages)
|
|
context = {'reviews': reviews, 'form': form}
|
|
context = {'reviews': reviews, 'form': form}
|
|
return render(request, 'dashboard.html', context=context)
|
|
return render(request, 'dashboard.html', context=context)
|
|
-
|
|
|
|
-
|
|
|
|
-class ReportView(LoginRequiredMixin, View):
|
|
|
|
-
|
|
|
|
- def get(self, request, *args, **kwargs):
|
|
|
|
- locations = Location.objects.all()
|
|
|
|
- return render(request, 'report.html', {'location_report': locations})
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-def sync_location(request, location_id):
|
|
|
|
- sync_all_review(location_id)
|
|
|
|
- return redirect('review-report')
|
|
|