python 3.x - dictionary update sequence element #0 has length 1; 2 is required. Error during template rendering -
this question has been asked before, answer given doesn't seem work me... have:
valueerror @ /myapp/ dictionary update sequence element #0 has length 1; 2 required error during template rendering in template ~/software/myproject/myapp/templates/myapp/base.html, error @ line 53 dictionary update sequence element #0 has length 1; 2 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 , system credentials about.html page depending on whether debug = true/false. """ if settings.debug == true: 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 here :o)")
urls.py
urlpatterns = [ url(r'^$', idx_order, name='idx_order'), url(r'^about/$', about, name='about'),
i'm performing update django1.8 1.11. i'm racking brains can't see mistake lie.
Comments
Post a Comment