#36254: Documentation 'Selecting the current time zone' code error
--------------------------------+-----------------------------------------
     Reporter:  YQ              |                     Type:  Bug
       Status:  new             |                Component:  Documentation
      Version:  5.2             |                 Severity:  Normal
     Keywords:  timezone items  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+-----------------------------------------
 ValueError at /set_timezone/
 Need 2 values to unpack in for loop; got 6.
 Request Method: GET
 Request URL:    http://127.0.0.1:8000/set_timezone/
 Django Version: 5.2b1
 Exception Type: ValueError
 Exception Value:
 Need 2 values to unpack in for loop; got 6.

 {{{
 common_timezones = {
     "London": "Europe/London",
     "Paris": "Europe/Paris",
     "New York": "America/New_York",
 }

 ...

 return render(request, "template.html", {"timezones": common_timezones})

 ...

 # template.html
 {% for city, tz in timezones %}  # Error : Need 2 values to unpack in for
 loop; got 6.
 ...

 }}}

 it should be
 {{{
 {% for city, tz in timezones.items %}
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36254>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701959408de99-b94d9ce2-52cb-47ad-85b9-08e99938c283-000000%40eu-central-1.amazonses.com.

Reply via email to