मैंने एक दृश्य में is_authenticated()
का उपयोग करने का प्रयास किया, लेकिन त्रुटि 'TypeError:' bool 'ऑब्जेक्ट को कॉल करने योग्य नहीं मिला। मुझे यह त्रुटि क्यों मिल रही है और मैं इसे कैसे ठीक करूं?is_authenticated() टाइपर टाइप टाइपर: 'बूल' ऑब्जेक्ट कॉल करने योग्य नहीं है
@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'))
कोष्ठक ड्रॉप – hsfzxjy
'()' हटाएं। –
आपकी मदद के लिए धन्यवाद! – Gaoyang