... ast_login ¶ ユーザーが最後にログインした日時です。 date_joined ¶ アカウントが作成された日時。 属性 ¶ class models. User is_authenticated ¶ ( AnonymousUser.is_authenticated が常に False なのとは対照的に) 常に True の読み取り専用属性です。ユーザが認証済みかどう ... mous ¶ 常に False の読み取り専用属性です。 User オブジェクトと AnonymousUser オブジェクトを区別する方法です。一般的に、 is_authenticated を使う方が好ましいと言えます。 メソッド ¶ class models. User get_username () ¶ ユーザのユーザ名を返します。 User モデルは ... username が常に空の文字列です。 get_username() が常に空の文字列を返します。 is_anonymous が False ではなく True です。 is_authenticated が False ではなく True です。 is_staff と is_superuser が常に False です。 is_active が常に False です。 groups と user_p ... ... ast_login ¶ ユーザーが最後にログインした日時です。 date_joined ¶ アカウントが作成された日時。 属性 ¶ class models. User is_authenticated ¶ ( AnonymousUser.is_authenticated が常に False なのとは対照的に) 常に True の読み取り専用属性です。ユーザが認証済みかどう ... mous ¶ 常に False の読み取り専用属性です。 User オブジェクトと AnonymousUser オブジェクトを区別する方法です。一般的に、 is_authenticated を使う方が好ましいと言えます。 メソッド ¶ class models. User get_username () ¶ ユーザのユーザ名を返します。 User モデルは ... username が常に空の文字列です。 get_username() が常に空の文字列を返します。 is_anonymous が False ではなく True です。 is_authenticated が False ではなく True です。 is_staff と is_superuser が常に False です。 is_active が常に False です。 groups と user_p ... ... o maintains a list of "authentication backends" that it checks for authentication. When somebody calls django.contrib.auth.authenticate() -- as described in How to log a user in -- Django tries authenticating across all of its authentication backends. If the ... lete() の実行です。 認証バックエンドの実装 ¶ 認証 (authentication) バックエンドは、2つの必須メソッド: get_user(user_id) と authenticate(request, **credentials) を実装したクラスであり、パーミッションに関連した省略可能な 認可 (authorization) メソッド もあります ... 何でもかまいませんが、ユーザーオブジェクトの主キーである必要があります。そして、ユーザーオブジェクトまたは None を返します。 authenticate メソッドは request 引数と credentials キーワード引数を取ります。殆どの場合、これは次のようになります。 from django.contrib ... ... o maintains a list of "authentication backends" that it checks for authentication. When somebody calls django.contrib.auth.authenticate() -- as described in How to log a user in -- Django tries authenticating across all of its authentication backends. If the ... lete() の実行です。 認証バックエンドの実装 ¶ 認証 (authentication) バックエンドは、2つの必須メソッド: get_user(user_id) と authenticate(request, **credentials) を実装したクラスであり、パーミッションに関連した省略可能な 認可 (authorization) メソッド もあります ... 何でもかまいませんが、ユーザーオブジェクトの主キーである必要があります。そして、ユーザーオブジェクトまたは None を返します。 authenticate メソッドは request 引数と credentials キーワード引数を取ります。殆どの場合、これは次のようになります。 from django.contrib ... ... セッションは全てログアウトされます。詳細は パスワード変更時にセッションを無効化する を参照してください。 ユーザを認証する ¶ authenticate ( request = None , ** credentials ) [ソース] ¶ aauthenticate ( request = None , ** credentials ) ¶ 非同期バージョン : aaut ... henticate() 認証情報のセットを検証するには authenticate() を使います。デフォルトでは username と password をキーワード引数として受け取り、それぞれの 認証バックエンド に問い合わせ ... 。どの認証バックエンドでも無効か、 PermissionDenied を返した場合、 None が返却されます。例: from django.contrib.auth import authenticate user = authenticate ( username = "john" , password = "secret" ) if user is not None : # A backend authenticated the creden ... ... セッションは全てログアウトされます。詳細は パスワード変更時にセッションを無効化する を参照してください。 ユーザを認証する ¶ authenticate ( request = None , ** credentials ) [ソース] ¶ aauthenticate ( request = None , ** credentials ) ¶ 非同期バージョン : aaut ... henticate() 認証情報のセットを検証するには authenticate() を使います。デフォルトでは username と password をキーワード引数として受け取り、それぞれの 認証バックエンド に問い合わせ ... 。どの認証バックエンドでも無効か、 PermissionDenied を返した場合、 None が返却されます。例: from django.contrib.auth import authenticate user = authenticate ( username = "john" , password = "secret" ) if user is not None : # A backend authenticated the creden ... ... del has two foreign keys to the same model and a target model is deleted ( #29016 ). Fixed a regression where contrib.auth.authenticate() crashes if an authentication backend doesn't accept request and a later one does ( #29071 ). Fixed crash when entering a ... ... del has two foreign keys to the same model and a target model is deleted ( #29016 ). Fixed a regression where contrib.auth.authenticate() crashes if an authentication backend doesn't accept request and a later one does ( #29071 ). Fixed crash when entering a ... ... lid IPv6 URLs ( #28142 ). Fixed regression causing pickling of model fields to crash ( #28188 ). Fixed django.contrib.auth.authenticate() when multiple authentication backends don't accept a positional request argument ( #28207 ). Fixed introspection of inde ... ... regression where a queryset that annotates with geometry objects crashes ( #29054 ). Fixed a regression where contrib.auth.authenticate() crashes if an authentication backend doesn't accept request and a later one does ( #29071 ). Fixed a regression where ma ... 2026年10月08日