Exemple #1
0
def milestone_daily_action():
    ddl_name = request.args.get('ddl_name', None)
    deadlines = xml_to_dict('app/xmls/dailywork.xml', reverse=True)
    data = None
    for ddl in deadlines:
        if ddl['name'] == ddl_name:
            data = ddl
    add_new('app/xmls/daily_milestones.xml', data)
    delete_element('dailywork.xml', ddl_name)
    deadlines = xml_to_dict('app/xmls/dailywork.xml', reverse=True)
    return render_template('daily.html', deadlines=deadlines)
Exemple #2
0
def achieve_action():
    ddl_name = request.args.get('ddl_name', None)
    deadlines = xml_to_dict('app/xmls/countdown.xml')
    data = None
    for ddl in deadlines:
        if ddl['name'] == ddl_name:
            data = ddl
    add_new('app/xmls/milestones.xml', data)
    delete_element('countdown.xml', ddl_name)
    deadlines = xml_to_dict('app/xmls/countdown.xml')
    return render_template('countdown.html', deadlines=deadlines)
Exemple #3
0
def add_daily_task():
    if request.method == 'POST':
        data = request.form
        print(data['Date'])
        date = datetime.strptime(data['Date'], '%Y-%m-%d')
        ddl = {}
        ddl['year'] = date.year
        ddl['month'] = date.month
        ddl['day'] = date.day
        ddl['name'] = data['name']
        ddl['description'] = data['description']
        ddl['last'] = '0'
        add_new('app/xmls/dailywork.xml', ddl)
    deadlines = xml_to_dict('app/xmls/dailywork.xml', reverse=True)
    return render_template('daily.html', deadlines=deadlines)
Exemple #4
0
def milestones():
    deadlines = xml_to_dict('app/xmls/milestones.xml')
    dailywork = xml_to_dict('app/xmls/daily_milestones.xml', reverse=True)
    return render_template('milestones.html',
                           deadlines=deadlines,
                           dailywork=dailywork)
Exemple #5
0
def daily():
    deadlines = xml_to_dict('app/xmls/dailywork.xml', reverse=True)
    return render_template('daily.html', deadlines=deadlines)
Exemple #6
0
def countdown():
    deadlines = xml_to_dict('app/xmls/countdown.xml')
    return render_template('countdown.html', deadlines=deadlines)
Exemple #7
0
def undo_daily_action():
    ddl_name = request.args.get('ddl_name', None)
    daily_update('dailywork.xml', ddl_name, undo=True)
    deadlines = xml_to_dict('app/xmls/dailywork.xml', reverse=True)
    return render_template('daily.html', deadlines=deadlines)
Exemple #8
0
def delete_action():
    ddl_name = request.args.get('ddl_name', None)
    delete_element('countdown.xml', ddl_name)
    deadlines = xml_to_dict('app/xmls/countdown.xml')
    return render_template('countdown.html', deadlines=deadlines)