def login_complete() -> Response: current_language = current_user.language if current_language: Session.store_current_language(current_language) flash(i8n.LOGGED_IN, category='success') return redirect(url_for('home'))
def login_complete() -> Response: current_language = current_user.language if current_language: Session.store_current_language(current_language) flash(i8n.LOGGED_IN, category='success') return redirect(url_for('home'))
def language(locale: str) -> Response: if current_user.is_authenticated: current_user.language = locale current_user.save() Session.store_current_language(locale) return redirect(Session.get_last_visited_url() or url_for('home'))
def language(locale: str) -> Response: if current_user.is_authenticated: current_user.language = locale current_user.save() Session.store_current_language(locale) return redirect(Session.get_last_visited_url() or url_for('home'))