Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide method to programmatically rate objects #132

Closed
apaar97 opened this issue Feb 24, 2018 · 3 comments
Closed

Provide method to programmatically rate objects #132

apaar97 opened this issue Feb 24, 2018 · 3 comments

Comments

@apaar97
Copy link

apaar97 commented Feb 24, 2018

There should exist a method to rate object programmatically in view function or via AJAX requests

@apaar97
Copy link
Author

apaar97 commented Feb 25, 2018

This also addresses issue #56

@n3storm
Copy link

n3storm commented Jun 23, 2018

Why?

views.Rate has ajax option since at least 11 december.
And this how you programmatically rate an object (line 35)

rating = self.model.objects.rate(self.get_object(), score, user=user, ip=ip)

@apaar97
Copy link
Author

apaar97 commented Jun 24, 2018

I am sorry but I don't remember the exact problem I faced at that time. I wanted to integrate the rating models with DjangoRestFramework so that objects could be rated via REST API as well. There was some implementation issue, which unfortunately I cannot reproduce now. Eventually, there were some design changes in my project, so I forgot about this. Closing this issue for now.

@apaar97 apaar97 closed this as completed Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants