taskapp/management/commands/seed_db.py
changeset 219 f04a1ec7a07f
parent 218 59107ce0a618
equal deleted inserted replaced
218:59107ce0a618 219:f04a1ec7a07f
    41     for i in range(1,21):
    41     for i in range(1,21):
    42         
    42         
    43         title = "Task "+str(i)
    43         title = "Task "+str(i)
    44         desc = "I am "+title
    44         desc = "I am "+title
    45         created_by = defaultReviewer
    45         created_by = defaultReviewer
    46         credits = 20
    46         pynts = 20
    47         
    47         
    48         task = taskEvents.createTask(title,desc,created_by,credits)
    48         task = taskEvents.createTask(title,desc,created_by,pynts)
    49         if task:
    49         if task:
    50             taskEvents.addReviewer(task, defaultReviewer)
    50             taskEvents.addReviewer(task, defaultReviewer)
    51             if i%2==0:taskEvents.publishTask(task)
    51             if i%2==0:taskEvents.publishTask(task)
    52 
    52 
    53 class Command(NoArgsCommand):
    53 class Command(NoArgsCommand):