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

AttributeError at /8/1/ This QueryDict instance is immutable in django rating app #207

Open
techiekamran opened this issue Oct 29, 2020 · 0 comments

Comments

@techiekamran
Copy link

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

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

1 participant