Replies: 1 comment 3 replies
-
Hi @sk1122 Thanks for reaching out, It's a valid concern. The csv that you see is a dataset of books which wouldn't afford to put it in DB, due to heroku restrictions. The csv contains all book details including the average rating of the book. The ones that you see is the average rating of the book from the existing dataset, It has nothing to do with the application's user database. According to your issue, you need to add the option to rate from there too just like you can rate a book from the homepage/genre section. Hope this makes sense |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on this issue #37 of Book Rating and saw that it displayed a rating directly from a CSV file but it should be from API.
Average Rating from CSV can be added to DB and then calculate average rating on further API Calls
Code Block, I am talking about
`
def get_book_details(request):
'''
AJAX request for book details
'''
if request.method == 'POST' and request.is_ajax():
bookid = request.POST.get('bookid', None)
if is_bookid_invalid(bookid):
return JsonResponse({'success': False}, status=200)
`
@Praful932, please check it and give your opinion
Beta Was this translation helpful? Give feedback.
All reactions