django-star-ratings
django-star-ratings copied to clipboard
AttributeError at /8/1/ This QueryDict instance is immutable in django rating app
I am using start-rating library in my django application then i am getting this error. Please anyone tell me how to solve it. --------------------------------------------------------- this is my model.py in testapp application in my project
class Test(models.Model): name = models.ForeignKey(CustomUser,on_delete=models.CASCADE) subject = models.CharField(max_length=30) ratings = GenericRelation(Rating, related_query_name='test')
class TestCreate(LoginRequiredMixin,CreateView): login_url = '/login/' model = Test fields = 'all' success_url = '/' template_name = 'testapp/test.html'
class TestList(ListView): model = Test template_name = 'testapp/test_list.html'
class TestDetails(DetailView): model = Test template_name = 'testapp/test_details.html'
this is my setting.py file
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'users', 'testapp', 'star_ratings', ]
Here my test_details.html file where i am getting error
<ul>
<li>{{ object.subject }}</li>
{% ratings object %}
</ul>
please any one tell me solution? please tell me how to solve