Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Andrew Feather](https://secure.gravatar.com/avatar/3500c89c7f60b3b1c2a06bd4c1c9d08f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andrew Feather
Courses Plus Student 6,572 Pointscannot convert dictionary update sequence element #0
I'm working on a local machine, and I had this error pop up.
"cannot convert dictionary update sequence element #0" & I wasn't getting the course detail output.
It took a few minutes of digging, but changing course to a context appears to have worked. There are instructions here: http://stackoverflow.com/questions/31105131/django-cannot-convert-dictionary-update-sequence-element-0-to-a-sequence
2 Answers
![Chris Freeman](https://uploads.teamtreehouse.com/production/profile-photos/1153532/micro_image.jpg)
Chris Freeman
Treehouse Moderator 68,425 PointsThere is also a shortcut version where you can add any item to the context
directly as an argument to render
I've added this answer to the StackOverflow question you referenced.
In addition to explicitly creating a context
as done by @Bogey Jammer, you can add the contacts
to the context
by specifying it in a dict as an argument to render:
def all_contacts(request):
contacts = Contact.objects.all()
return render(request, 'about/all.html',
{'contacts': contacts})
![Andrew Feather](https://secure.gravatar.com/avatar/3500c89c7f60b3b1c2a06bd4c1c9d08f?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andrew Feather
Courses Plus Student 6,572 PointsGreat! Thanks.