Ho provato a usare is_authenticated()
in una vista, ma ho ricevuto l'errore `TypeError: 'bool' l'oggetto non è richiamabile. Perché ricevo questo errore e come lo risolvo?is_authenticated() solleva TypeError TypeError: l'oggetto 'bool' non è callable
@auth.before_app_request
def before_request():
if current_user.is_authenticated() \
and not current_user.confirmed \
and request.endpoint[:5] != 'auth.' \
and request.endpoint != 'static':
return redirect(url_for('auth.unconfirmed'))
rilasciare le parentesi – hsfzxjy
Rimuovere '()'. –
grazie per il tuo aiuto! – Gaoyang