예제 #1
0
def search():

    search_form = SearchForm()

    if request.method == 'GET':
        return render_template('search.html', form=search_form, result=None)
    else:
        return render_template('search.html',
                               form=search_form,
                               result=search_form.get_result_by_Group())
예제 #2
0
파일: app.py 프로젝트: yMoroziuk/workshop3
def search():

    search_form = SearchForm()

    if request.method == 'GET':
        return render_template('search.html',
                               form=search_form,
                               result=None,
                               action='search',
                               name='Variable')
    else:
        return render_template('search.html',
                               form=search_form,
                               result=search_form.get_result_by_Name(),
                               action='search',
                               name='Variable')
예제 #3
0
def searchUser():

    search_form = SearchForm()

    if request.method == 'GET':
        #search_form.user_email.label='user email:'
        return render_template('search.html',
                               form=search_form,
                               result=None,
                               action='searchUser',
                               name='User')
    else:
        #search_form.user_email.label = 'user email:'
        return render_template('search.html',
                               form=search_form,
                               result=search_form.get_result_Email(),
                               action='searchUser',
                               name='user')
예제 #4
0
def searchGroup():

    search_form = SearchForm()

    if request.method == 'GET':
        search_form.group_name.label = 'Group name:'
        return render_template('search.html',
                               form=search_form,
                               result=None,
                               action='searchGroup',
                               name='Group')
    else:
        search_form.group_name.label = 'Group name:'
        return render_template('search.html',
                               form=search_form,
                               result=search_form.get_result_by_Group(),
                               action='searchGroup',
                               name='Group')
예제 #5
0
def searchSchedule():

    search_form = SearchForm()

    if request.method == 'GET':
        search_form.schedule_data.label = 'schedule data:'
        return render_template('search.html',
                               form=search_form,
                               result=None,
                               action='searchSchedule',
                               name='Schedule')
    else:
        search_form.schedule_data.label = 'schedule data:'
        return render_template('search.html',
                               form=search_form,
                               result=search_form.get_result_by_Schedule(),
                               action='searchSchedule',
                               name='Schedule')