[Fixed]-Rendering multiple items in html

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

Leave a comment