def _login(self): if current_user.is_authenticated: return redirect(current_user.get_user_index_url()) form = LoginForm() form.language.choices = self._build_language_list() if form.validate_on_submit(): if not form.csrf_token.validate(form): return render_template('authentication/login.html', form=form) session['language'] = form.language.data login_user(form.user) refresh_instance_tenants() return redirect(current_user.get_user_index_url()) return render_template('authentication/login.html', form=form)
def delete(self, id): result = super().delete(id) refresh_instance_tenants() return result
def put(self, id): result = super().put(id) refresh_instance_tenants() return result
def post(self): result = super().post() refresh_instance_tenants() return result