Esempio n. 1
0
def index():
    if request.method == 'POST':
        login = request.form.get('login')
        password = request.form.get('password')
        return view.login(login, password)
    else:
        return view.home()
Esempio n. 2
0
def home():
    choice = None
    while choice != 0:
        choice = view.home()
        if choice == 2:
            client = add_client()
            display_client_file(client)
        elif choice == 1:
            #clients = session.query(Client).all()
            #clients = session.query(Client).filter(Client.firstname.startswith("K"))
            #clients = session.query(Client).first()
            clients = session.query(Client).order_by(Client.lastname)
            index = view.display_client_list(clients)
            if index != 0:
                display_client_file(clients[index - 1])
Esempio n. 3
0
#!C:\Python\python.exe
#-*- coding: utf-8 -*-
# import sys
# # import codecs
# # sys.stdout = codecs.getwriter("iso-8859-1")(sys.stdout, 'xmlcharrefreplace')
# if sys.stdout.encoding != 'cp850':
#       sys.stdout = codecs.getwriter('cp850')(sys.stdout.buffer, 'strict')
# if sys.stderr.encoding != 'cp850':
#   sys.stderr = codecs.getwriter('cp850')(sys.stderr.buffer, 'strict')
# #chcp 65001
# #print(data.decode('utf-8').encode('cp850','replace').decode('cp850'))

print("Content-type: text/html\n\n")

import view

html = view.head() + view.home() + view.footer()

print(html)
Esempio n. 4
0
 def GET(self):
     return render.base(view.home(), title='WhatsApp Chat Analyzer')
Esempio n. 5
0
	def GET(self):
		return render.base(view.home(), title='WhatsApp Chat Analyzer')
Esempio n. 6
0
def home():
    return view.home()