Monday 21 October 2013

Django - Loop Form Cleaned Data

for key, value in form.cleaned_data.iteritems():
    print key, value
Python 3
for key, value in form.cleaned_data.items():
    print (key, value)
Reference:
http://stackoverflow.com/questions/5904969/python-how-to-print-a-dictionarys-key

No comments :

Post a Comment