Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1.     for row in reader:
  2.         n = n + 1
  3.         if n == 0:
  4.             # Skip the header
  5.             continue
  6.         myissue = Issue.objects.filter(id = n)[0]
  7.         tempmes = myissue.name
  8.         tempmes.polish = row[1]
  9.         tempmes.save()
  10.         tempmes2 = myissue.long
  11.         tempmes2.polish = row[2]
  12.         tempmes2.save()
  13.         tempmes3 = myissue.short
  14.         tempmes3.polish = row[3]
  15.         tempmes3.save()
  16.         tempcat = myissue.category.name
  17.         tempcat.polish = row[0]
  18.         tempcat.save()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement