per page, with , order by , clip by
Results of 1 - 10 of about 59 for username (0.006 sec.)
Django の認証方法のカスタマイズ 13611
Django の認証方法のカスタマイズ Django がデフォルトで提供する認証機能は、ほとんどの一般的なケースでは十分なものですが、デフォルトではニーズにマッチしない場合もあると思います。自分のプロジェクトで認証のカスタマイズを行うためには、Django が提 ... from django.contrib.auth.backends import BaseBackend class MyBackend ( BaseBackend ): def authenticate ( self , request , username = None , password = None ): # Check the username/password and return a user. ... 一方、次のように認証トークンでも表せます。 ... = 'pbkdf2_sha256$30000$Vo0VlMnkR4Bk$qEvtdyZRWTcOsCnI/oQ7fVOu1XAURIZYoOZ3iq8Dr4M=' """ def authenticate ( self , request , username = None , password = None ): login_valid = settings . ADMIN_LOGIN == username pwd_valid = check_password ( password , setti ... ngs . ADMIN_PASSWORD ) if login_valid and pwd_valid : try : user = User . objects . get ( username = username ) except User . DoesNotExist : # Create a new user. There's no need to set a password # because only the passwo ...
https://man.mtool.work/django/6.1/topics/auth/customizing.html
django.contrib.auth 12824
django.contrib.auth このドキュメントでは、Django の 認証システムのコンポーネントの API リファレンス資料を提供しています。 これらのコンポーネントの使い方や、認証と認可をカスタマイズする方法の詳細は、 認証トピックガイド を参照してください。 U ... ser モデル class models. User フィールド class models. User User オブジェクトには、以下のフィールドがあります: username 必須です。150 文字以下です。英数字のほか、 _ 、 @ 、 + 、 . 、 - が使えます。 大半のユースケースでは、 max_length の設定で ... オブジェクトを区別する方法です。一般的に、 is_authenticated を使う方が好ましいと言えます。 メソッド class models. User get_username () ユーザのユーザ名を返します。 User モデルはスワップアウトされることがあるので、ユーザ名を直接参照する代わりにこのメソッド ... BaseUserManager で提供されるメソッドに加えて) 以下のヘルパーメソッドを有する独自のマネージャを持っています: create_user ( username , email = None , password = None , ** extra_fields ) acreate_user ( username , email = None , password = None , ** extra_f ...
https://man.mtool.work/django/6.1/ref/contrib/auth.html
Djangoの認証システムを使用する 10227
Djangoの認証システムを使用する このドキュメントでは、デフォルト設定でのDjangoの認証システムの使用方法を説明します。この設定は、タスクの適切な範囲を管理することで、最も一般的なプロジェクトのニーズにかなうよう徐々に発展してきました。そして、パ ... と異なるクラスではなく、特別な属性セットを持ったUserオブジェクトなのです。 デフォルトのユーザの主要な属性は次のとおりです。 username password email first_name last_name See the User API documentation for a complete reference. The documentation that follow ... ーユーザを作成する createsuperuser コマンドを使ってスーパーユーザーを作成します: /  $ python manage.py createsuperuser --username = joe --email = joe@example.com ...\> py manage.py createsuperuser --username=joe --email=joe@example.com パスワードを入力 ... するように促されます。入力後、ただちにユーザが作成されます。 --username または --email オプションを使用しなければ、これらの値を入力するように促されます。 パスワードを変更する Djangoはユーザモデル ...
https://man.mtool.work/django/6.1/topics/auth/default.html
Migrating email to mailers 9322
Migrating email to mailers Django 6.1 introduced the MAILERS setting, replacing EMAIL_BACKEND and several other EMAIL_* settings. It also introduced mail.mailers for obtaining configured email backend instances, replacing mail.get_connectio ... OPTIONS" : { "host" : "mail.example.net" , "use_tls" : True , # port is not needed: it defaults to 587 with use_tls True. "username" : "user@example.net" , "password" : "password" , }, }, } The complete list of deprecated EMAIL_* settings and where they ... default value for the deprecated setting). EMAIL_HOST_PASSWORD becomes "password" in "OPTIONS" . EMAIL_HOST_USER becomes "username" in "OPTIONS" . (Note "username" doesn't quite follow the naming pattern for the other deprecated settings.) EMAIL_PORT be ... th_password arguments to send_mail() and send_mass_mail() can be replaced by defining a custom MAILERS configuration with "username" and "password" "OPTIONS" , and refer to that configuration with the using argument when sending mail. For example, to upg ...
https://man.mtool.work/django/6.1/howto/mailers-migration.html
フォーム フィールド 9191
フォーム フィールド class Field [ソース] Form クラスを作成時の一番重要な部分は、form のフィールド (field) の定義です。各フィールドにはカスタムの検証ロジックがあり、他にいくつかのフックもあります。 Field. clean ( value ) [ソース] Field クラス ... ない場合はウィジェットの <input> 要素に追加されます。 >>> from django import forms >>> class UserForm ( forms . Form ): ... username = forms . CharField ( max_length = 255 , help_text = "e.g., user@example.com" ) ... >>> f = UserForm () >>> print ( f ) <d ... iv> <label for="id_username">Username:</label> <div class="helptext" id="id_username_helptext">e.g., user@example.com</div> <input type="text" name="u ... sername" maxlength="255" required aria-describedby="id_username_helptext" id="id_username"> </div> カスタム aria-describedby 属性を追加する際には、使用している場合は help_text 要素の id ...
https://man.mtool.work/django/6.1/ref/forms/fields.html
Django 1.3.4 リリースノート 9191
Django 1.3.4 リリースノート October 17, 2012 This is the fourth release in the Django 1.3 series. Host header poisoning Some parts of Django -- independent of end-user-written applications -- make use of full URLs, including domain name, wh ... r parsing in Django 1.3.3 and Django 1.4.1 -- specifically, django.http.HttpRequest.get_host() -- was incorrectly handling username/password information in the header. Thus, for example, the following Host header would be accepted by Django when running ... the parsing in HttpRequest.get_host() is being modified; Host headers which contain potentially dangerous content (such as username/password pairs) now raise the exception django.core.exceptions.SuspiciousOperation . Details of this issue were initially ...
https://man.mtool.work/django/6.1/releases/1.3.4.html
モデル _meta API 9060
モデル _meta API class Options [ソース] モデルの _meta API は、Django ORM のコアにあります。これにより、ルックアップ、クエリ、フォーム、admin などのシステムの他のパーツは、各モデルの機能を理解できるようになります。API は、各モデルクラスの _ ... 例外が発生します。 >>> from django.contrib.auth.models import User # A field on the model >>> User . _meta . get_field ( "username" ) <django.db.models.fields.CharField: username> # A field from another model that has a relation with the current model > ... elds.DateTimeField: last_login>, <django.db.models.fields.BooleanField: is_superuser>, <django.db.models.fields.CharField: username>, <django.db.models.fields.CharField: first_name>, <django.db.models.fields.CharField: last_name>, <django.db.models.field ... elds.DateTimeField: last_login>, <django.db.models.fields.BooleanField: is_superuser>, <django.db.models.fields.CharField: username>, <django.db.models.fields.CharField: first_name>, <django.db.models.fields.CharField: last_name>, <django.db.models.field ...
https://man.mtool.work/django/6.1/ref/models/meta.html
Django 1.4.2 リリースノート 8666
Django 1.4.2 リリースノート October 17, 2012 This is the second security release in the Django 1.4 series. Host header poisoning Some parts of Django -- independent of end-user-written applications -- make use of full URLs, including domain ... r parsing in Django 1.3.3 and Django 1.4.1 -- specifically, django.http.HttpRequest.get_host() -- was incorrectly handling username/password information in the header. Thus, for example, the following Host header would be accepted by Django when running ... the parsing in HttpRequest.get_host() is being modified; Host headers which contain potentially dangerous content (such as username/password pairs) now raise the exception django.core.exceptions.SuspiciousOperation . Details of this issue were initially ...
https://man.mtool.work/django/6.1/releases/1.4.2.html
Django 2.0.3 リリースノート 8666
Django 2.0.3 リリースノート 2018年3月6日 Django 2.0.3 では、2.0.2 にあった2つのセキュリティの問題と、いくつかのバグを修正しました。また、Transifex の最新の翻訳文字列も組み込まれました。 CVE-2018-7536: urlize と urlizetrunc テンプレートフィル ... rashes ( #29166 ). Fixed crash when using a Window() expression in a subquery ( #29172 ). Fixed AbstractBaseUser.normalize_username() crash if the username argument isn't a string ( #29176 ). ...
https://man.mtool.work/django/6.1/releases/2.0.3.html
PostgreSQL 固有のモデルインデックス 8272
PostgreSQL 固有のモデルインデックス 以下はPostgreSQL固有の django.contrib.postgres.indexes モジュールから利用可能な インデックス です。 BloomIndex class BloomIndex ( * expressions , length = None , columns = () , ** options ) [ソース] bloom ... .postgres' を追加する必要があります。 name パラメータを operator class の名前に設定します。 例: Index ( OpClass ( Lower ( "username" ), name = "varchar_pattern_ops" ), name = "lower_username_idx" , ) varchar_pattern_ops を使用して Lower('username') にイン ...
https://man.mtool.work/django/6.1/ref/contrib/postgres/indexes.html
PREV 1 2 3 4 5 6 NEXT