コード例 #1
0
def get_hint_jsondata(NUM):
    print("*"*20 + " Hint " + "*"*20)
    fixture_list = []
    for pk in range(NUM):
        h = Hint()
        hint = gt.create_seeddict(MODEL_NAME, pk, **h.__dict__)
        fixture_list.append(hint)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*"*20 + " Finish! " + "*"*20 + "\n")
    return(jsondata)
コード例 #2
0
def get_flag_jsondata(NUM):
    print("*" * 20 + " Flag " + "*" * 20)
    fixture_list = []
    for pk in range(NUM):
        f = Flag(pk)
        flag = gt.create_seeddict(MODEL_NAME, pk, **f.__dict__)
        fixture_list.append(flag)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*" * 20 + " Finish! " + "*" * 20 + "\n")
    return (jsondata)
コード例 #3
0
def get_flag_jsondata(NUM):
    print("*"*20 + " Flag " + "*"*20)
    fixture_list = []
    for pk in range(NUM):
        f = Flag()
        flag = gt.create_seeddict(MODEL_NAME, pk, **f.__dict__)
        fixture_list.append(flag)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*"*20 + " Finish! " + "*"*20 + "\n")
    return(jsondata)
コード例 #4
0
def get_answerhistory_jsondata(NUM):
    print("*"*20 + " Attack Point History " + "*"*20)
    fixture_list = []
    for pk in range(NUM):
        a = AnswerHistory()
        answerhistory = gt.create_seeddict(MODEL_NAME, pk, **a.__dict__)
        fixture_list.append(answerhistory)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*"*20 + " Finish! " + "*"*20 + "\n")
    return(jsondata)
コード例 #5
0
def get_question_jsondata(NUM):
    print("*" * 20 + " Question " + "*" * 20)
    fixture_list = []
    for pk in range(NUM):
        q = Question()
        question = gt.create_seeddict(MODEL_NAME, pk, **q.__dict__)
        fixture_list.append(question)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*" * 20 + " Finish! " + "*" * 20 + "\n")
    return (jsondata)
コード例 #6
0
def get_user_jsondata(NUM):
    print("*"*20 + " User " + "*"*20)
    fixture_list = []
    for pk in range(NUM):
        u = User(pk)
        user = gt.create_seeddict(MODEL_NAME, pk, **u.__dict__)
        fixture_list.append(user)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*"*20 + " Finish! " + "*"*20 + "\n")
    return(jsondata)
コード例 #7
0
def get_question_jsondata(NUM):
    print("*"*20 + " Question " + "*"*20)
    fixture_list = []
    for pk in range(NUM):
        q = Question()
        question = gt.create_seeddict(MODEL_NAME, pk, **q.__dict__)
        fixture_list.append(question)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*"*20 + " Finish! " + "*"*20 + "\n")
    return(jsondata)
コード例 #8
0
def get_notice_jsondata(NUM):
    print("*"*20 + " Notice " + "*"*20)
    fixture_list = []
    for pk in range(NUM):
        n = Notice()
        notice = gt.create_seeddict(MODEL_NAME, pk, **n.__dict__)
        fixture_list.append(notice)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*"*20 + " Finish! " + "*"*20 + "\n")
    return(jsondata)
def get_attackpointhistory_jsondata(NUM):
    print("*" * 20 + " Attack Point History " + "*" * 20)
    fixture_list = []
    for pk in range(NUM):
        a = AttackPointHistory()
        attackpointhistory = gt.create_seeddict(MODEL_NAME, pk, **a.__dict__)
        fixture_list.append(attackpointhistory)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*" * 20 + " Finish! " + "*" * 20 + "\n")
    return (jsondata)
コード例 #10
0
def get_category_jsondata():
    print("*" * 20 + " Category " + "*" * 20)
    fixture_list = []
    for pk, category in enumerate(categories):
        fields = {"name": category}
        question = gt.create_seeddict(MODEL_NAME, pk + 1, **fields)
        fixture_list.append(question)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*" * 20 + " Finish! " + "*" * 20 + "\n")
    return (jsondata)
コード例 #11
0
def get_user_jsondata(NUM):
    print("*" * 20 + " User " + "*" * 20)
    fixture_list = []
    for pk in range(NUM):
        u = User(pk)
        user = gt.create_seeddict(MODEL_NAME, pk, **u.__dict__)
        fixture_list.append(user)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*" * 20 + " Finish! " + "*" * 20 + "\n")
    return (jsondata)
コード例 #12
0
def get_notice_jsondata(NUM):
    print("*" * 20 + " Notice " + "*" * 20)
    fixture_list = []
    for pk in range(NUM):
        n = Notice()
        notice = gt.create_seeddict(MODEL_NAME, pk, **n.__dict__)
        fixture_list.append(notice)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*" * 20 + " Finish! " + "*" * 20 + "\n")
    return (jsondata)
コード例 #13
0
def get_category_jsondata():
    print("*"*20 + " Category " + "*"*20)
    fixture_list = []
    for pk, category in enumerate(categories):
        fields = {
            "name": category
        }
        question = gt.create_seeddict(MODEL_NAME, pk+1, **fields)
        fixture_list.append(question)
    jsondata = json.dumps(fixture_list)
    pprint.pprint(jsondata)
    print("*"*20 + " Finish! " + "*"*20 + "\n")
    return(jsondata)