you are looking for `statedict.items()`. (Or `statedict.iteritems()` on
py2) By default a dict just loops over the keys. And then it unpacks
your two letter string into k, v. So the first step of your loop is
k='A' and v='K'.
Also, that's not how you use get.
On 12/16/2016 4:19 PM, Malik Rumi wrote:
|naively thinking I would be able to do something like|
||||
|
fork,v instatedict:
iftwodigit ==k:
state =Jurisdiction.objects.get(v)
|
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/8e9148a0-c090-c4ff-b29b-14a91efaaa23%40radio1190.org.
For more options, visit https://groups.google.com/d/optout.