Skip to content

Instantly share code, notes, and snippets.

@vanatteveldt
Forked from nruigrok/gist:8fece67723a6546b7ca3
Last active August 31, 2015 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanatteveldt/b3d682856c0eb5f9b74c to your computer and use it in GitHub Desktop.
Save vanatteveldt/b3d682856c0eb5f9b74c to your computer and use it in GitHub Desktop.
set2 = ArticleSet.objects.get(pk=17307)
lijst=[]
# rij=() # niet nodig
for row in reader:
aid = int(row[0])
medium = int(row[2])
setid = int(row[1])
# rij=(aid) # dit doet niets
if medium is not (4,5,6,7,8,9,11,32):
if setid == 2:
lijst.append(aid)
# deze moet juist aan het eind, anders doet hij het alsnog per row
set2.add_articles(lijst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment