per page, with , order by , clip by
Results of 1 - 10 of about 107 for Case (0.004 sec.)
条件式 15984
条件式 Conditional expressions let you use if ... elif ... else logic within filters, annotations, aggregations, and updates. A conditional expression evaluates a series of conditions for each row of a table and returns the matching result ... 性があります。これは 2 つの方法で解決できます: >>> When ( then__exact = 0 , then = 1 ) >>> When ( Q ( then = 0 ), then = 1 ) Case class Case ( * cases , ** extra ) [ソース] Case() 式は Python の if ... elif ... else 文のようなものです。指定された When( ... オブジェクトの result 式が返されます。 例: >>> >>> from datetime import date , timedelta >>> from django.db.models import Case , Value , When >>> Client . objects . create ( ... name = "Jane Doe" , ... account_type = Client . REGULAR , ... registere ... ), ... ) >>> # Get the discount for each Client based on the account type >>> Client . objects . annotate ( ... discount = Case ( ... When ( account_type = Client . GOLD , then = Value ( "5%" )), ... When ( account_type = Client . PLATINUM , then = V ...
https://man.mtool.work/django/6.1/ref/models/conditional-expressions.html
Django 1.8.2 リリースノート 11828
Django 1.8.2 リリースノート May 20, 2015 Django 1.8.2 fixes a security issue and several bugs in 1.8.1. Fixed session flushing in the cached_db backend A change to session.flush() in the cached_db session backend in Django 1.8 mistakenly se ... into that account. バグ修正 Fixed check for template engine alias uniqueness ( #24685 ). Fixed crash when reusing the same Case instance in a query ( #24752 ). Corrected join promotion for Case expressions. For example, annotating a query with a Case ... expression could unexpectedly filter out results ( #24766 ). Fixed negated Q objects in expressions. Cases like Case(When(~Q(friends__age__lte=30))) tried to generate a subquery which resulted in a crash ( #24705 ). Fixed incorr ...
https://man.mtool.work/django/6.1/releases/1.8.2.html
Django 1.11.2 リリースノート 8670
Django 1.11.2 リリースノート June 1, 2017 Django 1.11.2 adds a minor feature and fixes several bugs in 1.11.1. Also, the latest string translations from Transifex are incorporated. Minor feature The new LiveServerTestCase.port attribute rea ... llows the use case of binding to a specific port following the bind to port zero change in Django 1.11. バグ修正 Added detection for GDAL 2.1 ... ed the ImageField file extension validation added in Django 1.11 from the model field to the form field to reallow the use case of storing images without an extension ( #28242 ). ...
https://man.mtool.work/django/6.1/releases/1.11.2.html
Django 1.8.3 リリースノート 8670
Django 1.8.3 リリースノート July 8, 2015 Django 1.8.3 fixes several security issues and bugs in 1.8.2. Also, django.utils.deprecation.RemovedInDjango20Warning was renamed to RemovedInDjango110Warning as the version roadmap was revised to 1. ... Fixed recording of applied status for squashed (replacement) migrations ( #24628 ). Fixed queryset annotations when using Case expressions with exclude() ( #24833 ). Corrected join promotion for multiple Case expressions. Annotating a query with mul ... tiple Case expressions could unexpectedly filter out results ( #24924 ). Fixed usage of transforms in subqueries ( #24744 ). Fixed Si ... mpleTestCase.assertRaisesMessage() on Python 2.7.10 ( #24903 ). Provided better backwards compatibility for the verbosity argument in o ...
https://man.mtool.work/django/6.1/releases/1.8.3.html
配信 (syndication) フィード フレームワーク 8005
配信 (syndication) フィード フレームワーク Django には、 RSS と Atom フィードを作成するための高レベルな配信 (syndication) フィード生成フレームワークが付属しています。 任意の配信フィードを作成するには、短い Python クラスを書くだけで済みます。 ... uthor email. # AUTHOR LINK --One of the following three is optional. The framework # looks for them in this order. In each case, the URL should include # the scheme (such as "https://") and domain name. def author_link ( self , obj ): """ Takes the o ... author URL. # CATEGORIES -- One of the following three is optional. The framework # looks for them in this order. In each case, the method/attribute # should return an iterable object that returns strings. def categories ( self , obj ): """ Takes th ... email. # ITEM AUTHOR LINK -- One of the following three is optional. The # framework looks for them in this order. In each case, the URL should # include the scheme (such as "https://") and domain name. # # If you specify this, you must specify item_ ...
https://man.mtool.work/django/6.1/ref/contrib/syndication.html
Working with Git and GitHub 7672
Working with Git and GitHub This section explains how the community can contribute code to Django via pull requests. If you're interested in how mergers handle them, see プルリクエストの取り扱い . Below, we are going to show how to create a ... you need to do additional work on your branch, commit as often as necessary: git commit -m 'Added two more tests for edge cases.' Publishing work You can publish your work on GitHub by running: git push origin ticket_xxxxx When you go to your GitHub ... t fetch upstream git rebase upstream/main The work is automatically rebased using the branch you forked on, in the example case using upstream/main . The rebase command removes all your local commits temporarily, applies the upstream commits, and the ... After review It is unusual to get any non-trivial amount of code into core without changes requested by reviewers. In this case, it is often a good idea to add the changes as one incremental commit to your work. This allows the reviewer to easily che ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/working-wi...
Django 1.2.5 リリースノート 7672
Django 1.2.5 リリースノート Django 1.2.5 へようこそ! This is the fifth "bugfix" release in the Django 1.2 series, improving the stability and performance of the Django 1.2 codebase. With four exceptions, Django 1.2.5 maintains backwards com ... technically backwards-incompatible, but the security risks have been judged to outweigh the compatibility concerns in this case. Additionally, Django will now accept the CSRF token in the custom HTTP header X-CSRFTOKEN, as well as in the form submiss ... pletely worked as advertised. When using database backends that don't support transactions, or when using a TransactionTestCase, data that has been inserted using custom SQL will not be visible during the testing process. Unfortunately, there was no ... o exist during test conditions, you should either insert it using test fixtures , or using the setUp() method of your test case. ModelAdmin.lookup_allowed signature changed Django 1.2.4 introduced a method lookup_allowed on ModelAdmin , to cope with ...
https://man.mtool.work/django/6.1/releases/1.2.5.html
Django 1.11.27 リリースノート 7506
Django 1.11.27 リリースノート December 18, 2019 Django 1.11.27 fixes a security issue and a data loss bug in 1.11.26. CVE-2019-19844: Potential account hijack via password reset form By submitting a suitably crafted email address making use ... of Unicode characters, that compared equal to an existing user email when lower-cased for comparison, an attacker could be sent a password reset token for the matched account. In order to avoid this vulnerab ... ility, password reset requests now compare the submitted email using the stricter, recommended algorithm for case-insensitive comparison of two identifiers from Unicode Technical Report 36, section 2.11.2(B)(2) . Upon a match, the email ...
https://man.mtool.work/django/6.1/releases/1.11.27.html
Django 2.2.9 リリースノート 7506
Django 2.2.9 リリースノート December 18, 2019 Django 2.2.9 fixes a security issue and a data loss bug in 2.2.8. CVE-2019-19844: Potential account hijack via password reset form By submitting a suitably crafted email address making use of Un ... icode characters, that compared equal to an existing user email when lower-cased for comparison, an attacker could be sent a password reset token for the matched account. In order to avoid this vulnerab ... ility, password reset requests now compare the submitted email using the stricter, recommended algorithm for case-insensitive comparison of two identifiers from Unicode Technical Report 36, section 2.11.2(B)(2) . Upon a match, the email ...
https://man.mtool.work/django/6.1/releases/2.2.9.html
Django 1.1 リリースノート 7340
Django 1.1 リリースノート July 29, 2009 Django 1.1 へようこそ! Django 1.1 includes a number of nifty new features , lots of bug fixes, and an easy upgrade path from Django 1.0. Backwards-incompatible changes in 1.1 Django has a policy of AP ... that was created with 64-bit constraints, you will need to manually drop the old constraint prior to invoking reset . Test cases are now run in a transaction Django 1.1 runs tests inside a transaction, allowing better test performance (see test perfo ... transactional behavior, if they rely on invalid assumptions about the test environment, or if they require a specific test case ordering. For these cases, TransactionTestCase can be used instead. This is a just a quick fix to get around test case err ... ors revealed by the new rollback approach; in the long-term tests should be rewritten to correct the test case. Removed SetRemoteAddrFromForwardedFor middleware For convenience, Django 1.0 included an optional middleware class -- dja ...
https://man.mtool.work/django/6.1/releases/1.1.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT