Merge branch 'master' of https://repo.cimeyclust.com/CimeyClust/HabitTracker
This commit is contained in:
commit
a33e349f63
10
app.py
10
app.py
@ -35,12 +35,15 @@ def index():
|
|||||||
|
|
||||||
if current_user.is_authenticated:
|
if current_user.is_authenticated:
|
||||||
habits = current_user.get_habits()
|
habits = current_user.get_habits()
|
||||||
|
name = "Hallo " + current_user.name
|
||||||
else:
|
else:
|
||||||
habits = []
|
habits = []
|
||||||
|
name = "Bitte melde dich an."
|
||||||
|
|
||||||
# habits = [("lesen", "eine Seite vor dem schlafen gehen"), ("sport", "3x Gym")]
|
# habits = [("lesen", "eine Seite vor dem schlafen gehen"), ("sport", "3x Gym")]
|
||||||
return render_template(
|
return render_template(
|
||||||
'index.html',
|
'index.html',
|
||||||
|
title=name,
|
||||||
utc_dt=datetime.datetime.now().strftime("%d.%m.%Y %H:%M %A"),
|
utc_dt=datetime.datetime.now().strftime("%d.%m.%Y %H:%M %A"),
|
||||||
habits=habits,
|
habits=habits,
|
||||||
errors={},
|
errors={},
|
||||||
@ -221,13 +224,6 @@ def habit_create():
|
|||||||
errors=errors,
|
errors=errors,
|
||||||
)
|
)
|
||||||
|
|
||||||
@app.route('/test1')
|
|
||||||
def test1():
|
|
||||||
return render_template('layouts/indextest1.html', errors={})
|
|
||||||
|
|
||||||
@app.route('/test2')
|
|
||||||
def test2():
|
|
||||||
return render_template('layouts/indextest2.html', errors={})
|
|
||||||
|
|
||||||
# Run the application
|
# Run the application
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user