Add web class
This commit is contained in:
parent
2b8480c89d
commit
c3c21a510a
33
src/web.py
33
src/web.py
@ -1,12 +1,29 @@
|
|||||||
class web(object):
|
from flask import Flask, request
|
||||||
|
from printer import Printer
|
||||||
|
import time
|
||||||
|
import os
|
||||||
|
|
||||||
|
class Web(object):
|
||||||
"""docstring for web."""
|
"""docstring for web."""
|
||||||
|
|
||||||
def __init__(self, arg):
|
def __init__(self, app, printer ):
|
||||||
super(web, self).__init__()
|
super(Web).__init__()
|
||||||
self.arg = arg
|
self.printer = printer
|
||||||
|
self.app = app
|
||||||
|
|
||||||
def login_page():
|
def print_sms(self, texte, sign: str):
|
||||||
return "login page"
|
# TODO: verify the texte before printing it here ?
|
||||||
|
self.app.logger.debug("Printing : " + str(texte))
|
||||||
|
if not os.getenv('LIPY_DEBUG'):
|
||||||
|
time.sleep(10)
|
||||||
|
|
||||||
def logout_page():
|
return self.printer.print_sms(texte, sign)
|
||||||
return "logout"
|
|
||||||
|
def print_image(self, image):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def login(username: str,password: str) -> bool:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def logout(username: str, password: str) -> bool:
|
||||||
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user