harsh7in / Blogger

Blogger is a basic blogging application which includes user to create an account and post their views.
MIT License
49 stars 77 forks source link

view count requires refreshing #144

Closed harsh7in closed 4 years ago

harsh7in commented 4 years ago

Describe the bug we have a view count feature which counts the no of time that a blog is viewed but it requires refreshing for increasing that no. It should be done without refreshing which means asynchronously.

To Reproduce Steps to reproduce the behavior:

  1. Go to home page
  2. Click on any blog

Expected behavior It should be done without refreshing which means asynchronously.

ManishShah120 commented 4 years ago

Interested @harsh-9in , Please assign this to me.

harsh7in commented 4 years ago

Go ahead @ManishShah120 :+1:

ManishShah120 commented 4 years ago

Hey @harsh-9in, Can you provide me some links in reference to this issue, I am having a hard time to find some resources which I can follow to solve this issue. --Thank You

harsh7in commented 4 years ago

Hey, @ManishShah120 for this you require knowledge of ajax. After using ajax you can asynchronously make calls to the server and it will not require to refresh the page. I have attached some source to get an idea of ajax. https://www.youtube.com/watch?v=KgnPSmrQrXI

https://simpleisbetterthancomplex.com/tutorial/2016/08/29/how-to-work-with-ajax-request-with-django.html

https://www.tutorialspoint.com/django/django_ajax.htm

harsh7in commented 4 years ago

if you have any doubt feel free to ping.