per page, with , order by , clip by
Results of 1 - 10 of about 93 for reverse (0.003 sec.)
django.urls ユーティリティ関数 15283
django.urls ユーティリティ関数 reverse() reverse() 関数は指定したビューと任意のパラメータに対して、 url タグと同様に、絶対パス参照を返すために使用します。 reverse ( viewname , urlconf = None , args = None , kwargs = None , current_app = Non ... hive/" , views . archive , name = "news-archive" ) URL を逆引きするために、以下の方法を使用できます: # using the named URL reverse ( "news-archive" ) # passing a callable object # (This is discouraged because you can't reverse namespaced views this way. ... ) from news import views reverse ( views . archive ) URLが引数を受け入れる場合は、 args にそれらを渡すことができます。例えば: from django.urls import rever ... se def myview ( request ): return HttpResponseRedirect ( reverse ( "arch-summary" , args = [ 1945 ])) kwargs を args の代わりに渡すこともできます。例えば: >>> reverse ( "admin:app_list" , ...
https://man.mtool.work/django/6.1/ref/urlresolvers.html
Django 1.4.11 リリースノート 10215
Django 1.4.11 リリースノート April 21, 2014 Django 1.4.11 fixes three security issues in 1.4.10. Additionally, Django's vendored version of six, django.utils.six , has been upgraded to the latest release (1.6.1). Unexpected code execution u ... sing reverse() Django's URL handling is based on a mapping of regex patterns (representing the URLs) to callable views, and Django's ow ... ted URL against those patterns to determine the appropriate view to invoke. Django also provides a convenience function -- reverse() -- which performs this process in the opposite direction. The reverse() function takes information about a view and retu ... rns a URL which would invoke that view. Use of reverse() is encouraged for application developers, as the output of reverse() is always based on the current URL patterns, meanin ...
https://man.mtool.work/django/6.1/releases/1.4.11.html
Django 1.5.6 リリースノート 10215
Django 1.5.6 リリースノート April 21, 2014 Django 1.5.6 fixes several bugs in 1.5.5, including three security issues. Unexpected code execution using reverse() Django's URL handling is based on a mapping of regex patterns (representing the ... ted URL against those patterns to determine the appropriate view to invoke. Django also provides a convenience function -- reverse() -- which performs this process in the opposite direction. The reverse() function takes information about a view and retu ... rns a URL which would invoke that view. Use of reverse() is encouraged for application developers, as the output of reverse() is always based on the current URL patterns, meanin ... g developers do not need to change other code when making changes to URLs. One argument signature for reverse() is to pass a dotted Python path to the desired view. In this situation, Django will import the module indicated by that ...
https://man.mtool.work/django/6.1/releases/1.5.6.html
Django 1.6.3 リリースノート 9381
Django 1.6.3 リリースノート April 21, 2014 Django 1.6.3 fixes several bugs in 1.6.2, including three security issues, and makes one backwards-incompatible change: Unexpected code execution using reverse() Django's URL handling is based on a ... ted URL against those patterns to determine the appropriate view to invoke. Django also provides a convenience function -- reverse() -- which performs this process in the opposite direction. The reverse() function takes information about a view and retu ... rns a URL which would invoke that view. Use of reverse() is encouraged for application developers, as the output of reverse() is always based on the current URL patterns, meanin ... g developers do not need to change other code when making changes to URLs. One argument signature for reverse() is to pass a dotted Python path to the desired view. In this situation, Django will import the module indicated by that ...
https://man.mtool.work/django/6.1/releases/1.6.3.html
マイグレーション・オペレーション 8958
マイグレーション・オペレーション マイグレーションファイルは一つ以上の オペレーション 、データベースに対してマイグレーションが行うべきオペレーションを宣言的に保持するオブジェクト、から構成されます。 Django はこれらの Operation オブジェクトも ... 指定したモデルの name という名前の制約を新たな constraint に置き換えます。 特別なオペレーション RunSQL class RunSQL ( sql , reverse_sql = None , state_operations = None , hints = None , elidable = False ) [ソース] データベース上で任意の SQL を実行できるよ ... うにします。Django が直接サポートしていない、データベースバックエンドのより高度な機能に便利です。 sql と reverse_sql があれば、データベースで実行する SQL の文字列を指定します。ほとんどのデータベースバックエンド (PostgreSQL 以外) では、 ... )]) クエリにパーセント文字リテラルを含ませたい場合、パラメータを渡していればパーセント文字を二重に記述する必要があります。 reverse_sql クエリはマイグレーションを元に戻す際に実行されます。これらのクエリは sql クエリで実行された内容を元に戻します。たとえば ...
https://man.mtool.work/django/6.1/ref/migration-operations.html
Django 1.11.22 リリースノート 8878
Django 1.11.22 リリースノート July 1, 2019 Django 1.11.22 fixes a security issue in 1.11.21. CVE-2019-12781: Incorrect HTTP detection with reverse-proxy connecting via HTTPS When deployed behind a reverse-proxy connecting to Django via HTTP ... figured, and the appropriate header is set on the request, for both HTTP and HTTPS requests. If you deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctl ...
https://man.mtool.work/django/6.1/releases/1.11.22.html
Django 2.1.10 リリースノート 8878
Django 2.1.10 リリースノート July 1, 2019 Django 2.1.10 fixes a security issue in 2.1.9. CVE-2019-12781: Incorrect HTTP detection with reverse-proxy connecting via HTTPS When deployed behind a reverse-proxy connecting to Django via HTTPS, d ... figured, and the appropriate header is set on the request, for both HTTP and HTTPS requests. If you deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctl ...
https://man.mtool.work/django/6.1/releases/2.1.10.html
Django 2.2.3 リリースノート 8627
Django 2.2.3 リリースノート July 1, 2019 Django 2.2.3 fixes a security issue and several bugs in 2.2.2. Also, the latest string translations from Transifex are incorporated. CVE-2019-12781: Incorrect HTTP detection with reverse-proxy connec ... ting via HTTPS When deployed behind a reverse-proxy connecting to Django via HTTPS, django.http.HttpRequest.scheme would incorrectly detect client requests made via HTT ... figured, and the appropriate header is set on the request, for both HTTP and HTTPS requests. If you deploy Django behind a reverse-proxy that forwards HTTP requests, and that connects to Django via HTTPS, be sure to verify that your application correctl ...
https://man.mtool.work/django/6.1/releases/2.2.3.html
クラスベースのビューでフォームを扱う 7873
クラスベースのビューでフォームを扱う フォームの処理には、一般に3つの場合分けが存在します。 最初の GET リクエスト (空白またはデフォルト値が埋め込まれたフォームを返す) 無効なデータの POST リクエスト (よくあるパターンは、エラー表示を追加したフ ... irst we need to add get_absolute_url() to our Author class: models.py from django.db import models from django.urls import reverse class Author ( models . Model ): name = models . CharField ( max_length = 200 ) def get_absolute_url ( self ): return reve ... ラスベースのビューのみを設定している点が重要です; 自分自身でロジックを書く必要はありません: views.py from django.urls import reverse_lazy from django.views.generic.edit import CreateView , DeleteView , UpdateView from myapp.models import Author class Auth ... iew ( UpdateView ): model = Author fields = [ "name" ] class AuthorDeleteView ( DeleteView ): model = Author success_url = reverse_lazy ( "author-list" ) 注釈 ファイルがインポートされるときに urls は読み込まれないので、 reverse_lazy() を reverse() の代わ ...
https://man.mtool.work/django/6.1/topics/class-based-views/generic-editing.html
はじめての Django アプリ作成、その 5 7714
はじめての Django アプリ作成、その 5 このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作ってみましょう。 困ったときは: このチュートリアルの実行に問題がある場合は、FAQ の Getting Hel ... r. >>> response . status_code 404 >>> # on the other hand we should expect to find something at '/polls/' >>> # we'll use 'reverse()' rather than a hardcoded URL >>> from django.urls import reverse >>> response = client . get ( reverse ( "polls:index" ) ... ションに基づいてテストを作成しましょう。 まず、 polls/tests.py に次の行を追加します。 polls/tests.py from django.urls import reverse そして、question を簡単に作れるようにするショートカット関数と、新しいテストクラスを作ります。 polls/tests.py def create_qu ... o_questions ( self ): """ If no questions exist, an appropriate message is displayed. """ response = self . client . get ( reverse ( "polls:index" )) self . assertEqual ( response . status_code , 200 ) self . assertContains ( response , "No polls are av ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT