This question has been asked before, but the answer given doesn't seem to work for me... I have:
ValueError at /myapp/
dictionary update sequence element #0 has length 1; 2 is required
Error during template rendering
In template ~/Software/myproject/myapp/templates/myapp/base.html, error at line 53
dictionary update sequence element #0 has length 1; 2 is required
base.html
<a class="brand" href="{% url "about" %}">About page</a>
Error
File "~/Software/myproject/myapp/views/basic.py", line 380, in idx_order
return render(request, 'myapp/index_other.html', {'orders': orders, 'orders_done': orders_done, 'STATUS_CHOICES': dSTATUS_CHOICES})
views.py
def idx_order(request):
orders = Order.objects.all().order_by('status','deadline','created','lastUpdate').exclude(status=2)
orders_done = Order.objects.all().order_by('status','deadline','created','lastUpdate').filter(status=2)
return render(request, 'myapp/index_other.html', {
'orders': orders,
'orders_done': orders_done,
'STATUS_CHOICES': dSTATUS_CHOICES
})
def about(request):
"""
Function outputs user and system credentials to an about.html page depending on whether DEBUG = True/False.
"""
if settings.DEBUG == True:
do stuff
return render(request, 'myapp/about.html',
{'list_zero': list_zero,
'list_one': list_one,
'installed_packages_list': library_dict
})
else:
return HttpResponse("You shouldn't be here :o)")
urls.py
urlpatterns = [
url(r'^$', idx_order, name='idx_order'),
url(r'^about/$', about, name='about'),
I'm performing an update from Django1.8 to 1.11. I'm racking my brains about this but can't see where my mistake could lie.