diff --git a/web/app.py b/web/app.py index ed0ac10..ce5e4f5 100644 --- a/web/app.py +++ b/web/app.py @@ -498,7 +498,7 @@ def create_app(): """Prepare and process the login form.""" # Authenticate username/email and login authenticated users. - + safe_next_url = self._get_safe_next_url('next', self.USER_AFTER_LOGIN_ENDPOINT) safe_reg_next = self._get_safe_next_url('reg_next', self.USER_AFTER_REGISTER_ENDPOINT) @@ -539,11 +539,14 @@ def create_app(): return self._do_login_user(user, safe_next_url, login_form.remember_me.data) # Render form + tos_db = Misc.query.filter_by(field_1='terms_of_service').first() + print(Misc.query.filter_by(field_1='terms_of_service').first()) self.prepare_domain_translations() template_filename = self.USER_LOGIN_AUTH0_TEMPLATE if self.USER_ENABLE_AUTH0 else self.USER_LOGIN_TEMPLATE return render_template(template_filename, form=login_form, login_form=login_form, + tos='hello there!', register_form=register_form) #user_manager = UserManager(app, db, User) @@ -580,6 +583,12 @@ def create_app(): time = datetime.datetime.utcnow() ) db.session.add(flash_entry_add) + tos_entry_add = Misc( + field_1 = 'terms_of_service', + field_2 = 'TOS', + time = datetime.datetime.utcnow() + ) + db.session.add(tos_entry_add) db.session.commit() # Query radioid.net for list of DMR IDs, then add to DB @@ -732,26 +741,19 @@ def create_app(): svr_content = '' for i in sl: svr_content = svr_content + ''' -
-
-Server: ''' + i.name + '''- |
-- ''' + i.public_notes + ''' - | - -
- |
- |
- Your passphrase for ''' + str(i[0]) + ''': -Copy and paste: ''' + str(gen_passphrase(int(i[0]))) + ''' -- - Phonetically spelled: ''' + convert_nato(str(gen_passphrase(int(i[0])))) + ''' - - |
-
+
''' + str(gen_passphrase(int(i[0]))) + '''+
''' + convert_nato(str(gen_passphrase(int(i[0])))) + '''
+
- Your passphrase for ''' + str(i[0]) + ''': -Copy and paste: ''' + str(gen_passphrase(int(i[0]))) + ''' -- - Phonetically spelled: ''' + convert_nato(str(gen_passphrase(int(i[0])))) + ''' - - |
-
+
''' + str(gen_passphrase(int(i[0]))) + '''+
''' + convert_nato(str(gen_passphrase(int(i[0])))) + '''
+
- Your passphrase for ''' + str(i[0]) + ''': -Copy and paste: ''' + legacy_passphrase + ''' -- Phonetically spelled: ''' + convert_nato(legacy_passphrase) + ''' - |
-
''' +
''' + legacy_passphrase + '''+
''' + convert_nato(legacy_passphrase) + '''
+
- Your passphrase for ''' + str(i[0]) + ''': -Copy and paste: ''' + str(i[1]) + ''' -- Phonetically spelled: ''' + convert_nato(str(i[1])) + ''' - |
-
+
''' + str(i[1]) + '''+
''' + convert_nato(str(i[1])) + '''
+- - - -
-
{% endblock %}