0👍
✅
Try this;
return render(request, 'add_user_accounts.html',
{'form': form,
'accounts': account})
You have to remove this; ,context_instance=RequestContext(request)
1👍
You must using one dict for passing parameters to render functions.
return render(request, 'add_user_accounts.html',
{'form': form,
'accounts': account},
context_instance=RequestContext(request))
You got this error because you pass firstly form dict as a context parameter than accounts dicts as context_instance parameter and than try to pass context_instance parameter again. Also you can simple remove context_instance parameter. From docs:
The context_instance argument is deprecated. Simply use context.
Full docs:
render
- What is the use of gettext when django explicitly translates from .po and .mo files?
- Django 1.8.3 Running test fails on database creation
- ElasticSearch – bulk indexing for a completion suggester in python
- TemplateSyntaxError in Django
- UnicodeDecodeError: 'utf8' codec can't decode byte
Source:stackexchange.com