Add user settings with time zones

This commit is contained in:
2018-07-03 13:15:17 +02:00
parent d07e34a182
commit bba44a3c7f
4 changed files with 64 additions and 0 deletions

View File

@@ -183,5 +183,26 @@ class CalendarSocialApp(Flask):
return render_template('event-edit.html', form=form)
@staticmethod
@route('/settings', methods=['GET', 'POST'])
@login_required
def settings():
"""View for user settings
"""
from .forms import SettingsForm
from .models import db
form = SettingsForm(current_user)
if form.validate_on_submit():
form.populate_obj(current_user)
db.session.commit()
return redirect(url_for('hello'))
return render_template('user-settings.html', form=form)
app = CalendarSocialApp(__name__)