Example #1
0
def get_question(question_id):
    if Question.is_null() == False: 
    	rows = Question.query(Question.serial_no==question_id).fetch()
        if len(rows) == 1:
            return dict(total= Question.count(), detail = rows[0])
        else:
            return empty_question()
    else:
        return empty_question()
Example #2
0
def generate_serial_no():
    return Question.count()+1
Example #3
0
def home():
    return dict(total = Question.count())