<s> from django . forms . models import model_to_dict <EOL> from neurovault . apps . statmaps . forms import EditStatisticMapForm <EOL> from neurovault . apps . statmaps . models import StatisticMap <EOL> count = StatisticMap . objects . count ( ) <EOL> for i , image in enumerate ( StatisticMap . objects . all ( ) ) : <EOL> print "<STR_LIT>" % ( image . pk , i + <NUM_LIT:1> , count ) <EOL> form = EditStatisticMapForm ( model_to_dict ( image ) , instance = image , user = image . collection . owner ) <EOL> image . is_valid = form . is_valid ( ) <EOL> image . save ( ) </s>
