This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 3rd, 2012  |  syntax: Python  |  size: 0.42 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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()
clone this paste RAW Paste Data