예제 #1
0
 def get(self):
     a =  Ari_types()
     a.ari = "Ad Hominem"
     a.description = "Against the person"
     a.put()
     a =  Ari_types()
     a.ari = "Ad Hominem Tu Quoque"
     a.description = "You Too Fallacy"
     a.put()
     b = Branch()
     b.branch = "Business"
     b.description ="Business"
     b.put()
     b = Branch()
     b.branch = "Entertainment"
     b.description = "Entertainment"
     b.put()
     b = Branch()
     b.branch = "Economics"
     b.description = "Economics"
     b.put()
     b = Branch()
     b.branch = "Politics"
     b.description = "Politics"
     b.put()
예제 #2
0
 def create_branches(self):
     """
     Cadastra os Ramos
     """
     #print("CADASTRAR RAMOS:")
     for branch in BRANCHS:
         branch_new = Branch()
         branch_new.id = branch['id']
         branch_new.name = branch['name']
         branch_new.description = branch['description']
         branch_new.active = branch['active']
         if branch.get('group'):
             branch_new.group = Group.objects.get(pk=branch['group']['id'])
         branch_new.save()