mod template

This commit is contained in:
KF7EEL 2021-08-01 16:26:26 -07:00
parent 8aee058e73
commit aeaea3a135
2 changed files with 22 additions and 1 deletions

View File

@ -440,6 +440,18 @@ def create_app():
subject = db.Column(db.String(100), nullable=False, server_default='')
text = db.Column(db.String(100), nullable=False, server_default='')
date = db.Column(db.String(100), nullable=False, server_default='')
class Misc(db.Model):
__tablename__ = 'misc'
id = db.Column(db.Integer(), primary_key=True)
field_1 = db.Column(db.String(100), nullable=False, server_default='')
field_2 = db.Column(db.String(100), nullable=False, server_default='')
field_3 = db.Column(db.String(100), nullable=False, server_default='')
int_1 = db.Column(db.Integer(), primary_key=False)
int_2 = db.Column(db.Integer(), primary_key=False)
int_3 = db.Column(db.Integer(), primary_key=False)
time = db.Column(db.DateTime())
@ -1553,6 +1565,12 @@ def create_app():
content = content + '</tbody></table>'
return render_template('flask_user_layout.html', markup_content = Markup(content))
@app.route('/news') #, methods=['POST', 'GET'])
## @login_required
def view_news():
content = 'news'
return render_template('flask_user_layout.html', markup_content = Markup(content))
@app.route('/user_tg')
def tg_status():
cu = current_user

View File

@ -39,7 +39,10 @@
<tr>
<td style="text-align: center;"><a href={{url}}/>Home</a></td>
<td style="text-align: center;"><a href={{url}}/talkgroups>Talkgroups</a></td>
<td style="text-align: center;"><a href={{url}}/talkgroups>Talkgroups</a></td>
<td style="text-align: center;"><a href={{url}}/news>News</a></td>
{% if not call_or_get(current_user.is_authenticated) %}
<td style="text-align: center;"><a href={{ url_for('user.register') }}>Register</a></td>
<td style="text-align: center;"><a href={{ url_for('user.login') }}>Sign in</a></td>