diff --git a/src/app/templates/module-login.html b/src/app/templates/module-login.html new file mode 100644 index 0000000..fb766fb --- /dev/null +++ b/src/app/templates/module-login.html @@ -0,0 +1,17 @@ +

Login page

+
+ {% for type_, id_, label, placeholder in form_data %} +
+ + + +
+ {% end %} + +
\ No newline at end of file diff --git a/src/app/ui_modules/__init__.py b/src/app/ui_modules/__init__.py index 92a2f16..f4a7c5e 100644 --- a/src/app/ui_modules/__init__.py +++ b/src/app/ui_modules/__init__.py @@ -1 +1,2 @@ from .logger import Logger +from .login import Login diff --git a/src/app/ui_modules/login.py b/src/app/ui_modules/login.py new file mode 100644 index 0000000..91b520f --- /dev/null +++ b/src/app/ui_modules/login.py @@ -0,0 +1,11 @@ +from tornado.web import UIModule + + +class Login(UIModule): + def render(self, anchor_id, form_data=None): + if form_data is None: + form_data = ( + ('email', 'email_input', 'Email address', 'Enter email'), + ('password', 'password_input', 'Password', 'Password'), + ) + return self.render_string('module-login.html', anchor_id=anchor_id, form_data=form_data)