per page, with , order by , clip by
Results of 1 - 10 of about 41 for setup (0.004 sec.)
クラスベースのジェネリックビュー: フラットインデックス 15915
クラスベースのジェネリックビュー: フラットインデックス この索引は、クラスベースビューのリファレンス文書を、異なる観点から編成したものです。ビューごとに、クラスツリーの有効な属性とメソッドが表されます。動作を定義するクラスの観点から編集された ... class View 属性 (とオプションのアクセサ): http_method_names メソッド as_view() dispatch() head() http_method_not_allowed() setup() TemplateView class TemplateView 属性 (とオプションのアクセサ): content_type extra_context http_method_names response_cla ... ate_names() ] メソッド as_view() dispatch() get() get_context_data() head() http_method_not_allowed() render_to_response() setup() RedirectView class RedirectView 属性 (とオプションのアクセサ): http_method_names pattern_name permanent query_string url ... get_redirect_url() ] メソッド as_view() delete() dispatch() get() head() http_method_not_allowed() options() post() put() setup() 詳細ビュー DetailView class DetailView 属性 (とオプションのアクセサ): content_type context_object_name [ get_context_obj ...
https://man.mtool.work/django/6.1/ref/class-based-views/flattened-index.html
テストに関する高度なトピック 10755
テストに関する高度なトピック RequestFactory(リクエスト ファクトリ) class RequestFactory [ソース] RequestFactory はテストクライアントと同じ API を共有しています。しかし、ブラウザのように動作するのではなく、 RequestFactory は任意のビューの最 ... r from django.test import RequestFactory , TestCase from .views import MyView , my_view class SimpleTest ( TestCase ): def setUp ( self ): # Every test needs access to the request factory. self . factory = RequestFactory () self . user = User . object ... クラスベースのビューをテストする リクエスト/レスポンスサイクルの外でクラスベースのビューをテストするには、インスタンス化後に setup() を呼び出して、正しく設定されていることを確認する必要があります。 たとえば、以下のようなクラスベースのビューを想定します: ... super () . get_context_data ( ** kwargs ) get_context_data() メソッドを直接テストするには、まずビューをインスタンス化して setup() に request を渡します: tests.py from django.test import RequestFactory , TestCase from .views import HomeView class Home ...
https://man.mtool.work/django/6.1/topics/testing/advanced.html
Djangoの設定 10615
Djangoの設定 Djangoの設定ファイルには、インストールしたDjangoの全ての設定が含まれています。このドキュメントでは、各設定の役割と、どのような設定を利用できるか説明していきます。 基礎 設定ファイルはモジュールレベルの変数が記述された、ただのPyt ... E のどちらか片方だけを使ってください。両方使うのも、両方使わないのもいけません。 スタンドアロンで Django を使うには django.setup() を呼び出す必要がある Django のコンポーネントを "スタンドアロン" で使う場合、たとえば、 Django テンプレートを読み込んでレ ... 必要なステップがあります。 After you've either set DJANGO_SETTINGS_MODULE or called configure() , you'll need to call django.setup() to load your settings and populate Django's application registry. For example: import django from django.conf import set ... tings from myapp import myapp_defaults settings . configure ( default_settings = myapp_defaults , DEBUG = True ) django . setup () # Now this script or any imported module can use any part of Django it needs. from myapp import models django.setup() を ...
https://man.mtool.work/django/6.1/topics/settings.html
ベース・ビュー 9558
ベース・ビュー 以下の3つのクラスは、Django のビューの作成に必要な多くの機能を提供します。これらは Django ビューの 親の ビューとみなすことができ、それ自体で使うことも継承して使うこともできます。プロジェクトに必要な全ての機能を提供するわけでは ... 承します。厳密にはジェネリックビューではないので、 django.views からインポートすることもできます。 メソッドのフローチャート setup() dispatch() http_method_not_allowed() options() Example views.py : from django.http import HttpResponse from django.views ... れたビューは、 view_class と view_initkwargs 属性を持っています。 リクエスト/レスポンスサイクル中にビューが呼び出されると、 setup() メソッドは HttpRequest をビューの request 属性に割り当て、 URLパターンからキャプチャされた位置引数および/またはキーワード ... async def ) と同期ハンドラ ( def ) の両方が1つのビュークラスで定義されている場合、 ImproperlyConfigured 例外が発生します。 setup ( request , * args , ** kwargs ) dispatch() の前に、ビューの初期化のための重要な処理を実行します。 ビューの request 属性に ...
https://man.mtool.work/django/6.1/ref/class-based-views/base.html
ジェネリック表示ビュー (Generic display view) 8377
ジェネリック表示ビュー (Generic display view) 以下の2つのクラスベースのジェネリックビューは、データを表示 (display) するために設計されています。多くのプロジェクトで、これらは最もよく使われるビューです。 DetailView class django.views.generic ... etail.BaseDetailView django.views.generic.detail.SingleObjectMixin django.views.generic.base.View メソッドのフローチャート setup() dispatch() http_method_not_allowed() get_template_names() get_slug_field() get_queryset() get_object() get_context_objec ... ic.list.BaseListView django.views.generic.list.MultipleObjectMixin django.views.generic.base.View メソッドのフローチャート setup() dispatch() http_method_not_allowed() get_template_names() get_queryset() get_context_object_name() get_context_data() ge ...
https://man.mtool.work/django/6.1/ref/class-based-views/generic-display.html
はじめての Django アプリ作成、その 5 7973
はじめての Django アプリ作成、その 5 このチュートリアルは チュートリアル 4 の続きです。Web 投票アプリケーションが完成したので、今度は自動テストを作ってみましょう。 困ったときは: このチュートリアルの実行に問題がある場合は、FAQ の Getting Hel ... ト環境をセットアップすることです。 /  $ python manage.py shell ...\> py manage.py shell >>> from django.test.utils import setup_test_environment >>> setup_test_environment () setup_test_environment() は、テンプレートのレンダラーをインストールします。 ... t address; if you instead see an >>> # "Invalid HTTP_HOST header" error and a 400 response, you probably >>> # omitted the setup_test_environment() call described earlier. >>> response . status_code 404 >>> # on the other hand we should expect to find ...
https://man.mtool.work/django/6.1/intro/tutorial05.html
Django 1.11 リリースノート 7973
Django 1.11 リリースノート April 4, 2017 Django 1.11 へようこそ! このリリースノートでは、Django 1.10 および過去のバージョンからアップグレードする際に知っておくべきいくつかの 後方互換性のない変更 に加え、 新機能 を説明しています。 いくつかの ... st --debug-mode option to help troubleshoot test failures by setting the DEBUG setting to True . The new django.test.utils.setup_databases() (moved from django.test.runner ) and teardown_databases() functions make it easier to build custom test runner ... するようになりました。 保存した値を失わないように、 teardown_test_environment() を呼び出す前に 2 度めの呼び出しをした場合、 setup_test_environment() がエラーを投げるようになりました。 DjangoJSONEncoder (Django 1.0 でリネームされました) に対する、ドキュ ... 、 password_reset_done() 、 password_reset_confirm() 、 password_reset_complete() は非推奨となりました。 django.test.runner.setup_databases() が django.test.utils.setup_databases() に移動しました。旧来の場所は非推奨となります。 django.utils.text.format ...
https://man.mtool.work/django/6.1/releases/1.11.html
Django 3.2 リリースノート 7973
Django 3.2 リリースノート April 6, 2021 Django 3.2 へようこそ! このリリースノートでは、 バージョン 3.2 の新機能 と、Django 3.1 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。また、 一部の機能を非推奨 とし ... Cached template loaders are now correctly reloaded in development. テスト Objects assigned to class attributes in TestCase.setUpTestData() are now isolated for each test method. Such objects are now required to support creating deep copies with copy.d ... he test --no-faulthandler option. DiscoverRunner and the test management command can now track timings, including database setup and total run time. This can be enabled by using the test --timing option. Client now preserves the request query string w ... ior. See Django 3.2 の新機能 for more details. Instantiating an abstract model now raises TypeError . Keyword arguments to setup_databases() are now keyword-only. The undocumented django.utils.http.limited_parse_qsl() function is removed. Please use u ...
https://man.mtool.work/django/6.1/releases/3.2.html
Django 1.5.2 リリースノート 7849
Django 1.5.2 リリースノート August 13, 2013 This is Django 1.5.2, a bugfix and security release for Django 1.5. Mitigated possible XSS attack via user-supplied redirect URLs Django relies on user input in some cases (e.g. django.contrib.aut ... 20257). Fixed a regression in django.contrib.gis in the Google Map output on Python 3 (#20773). Made DjangoTestSuiteRunner.setup_databases properly handle aliases for the default database (#19940) and prevented teardown_databases from attempting to te ...
https://man.mtool.work/django/6.1/releases/1.5.2.html
Django 2.2.8 リリースノート 7849
Django 2.2.8 リリースノート 2019年12月2日 Django 2.2.8 fixes a security issue, several bugs in 2.2.7, and adds compatibility with Python 3.8. CVE-2019-19118: Privilege escalation in the Django admin. Since Django 2.1, a Django model admin d ... ixed a regression in Django 2.2.1 that caused a crash when migrating permissions for proxy models with a multiple database setup if the default entry was empty ( #31021 ). Fixed a data loss possibility in the select_for_update() . When using 'self' in ...
https://man.mtool.work/django/6.1/releases/2.2.8.html
PREV 1 2 3 4 5 NEXT