per page, with , order by , clip by
Results of 1 - 10 of about 90 for use case (0.006 sec.)
use (242), case (107)
条件式 20543
条件式 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 ... ccount_type = Client . GOLD , then = "name" ) >>> When ( account_type = Client . GOLD , then = F ( "name" )) >>> # You can use field lookups in the condition >>> from datetime import date >>> When ( ... registered_on__gt = date ( 2014 , 1 , 1 ), ... ... 性があります。これは 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 ...
https://man.mtool.work/django/6.1/ref/models/conditional-expressions.html
Django 1.8.2 リリースノート 16438
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 ... string rather than None . An empty string is treated as a valid session key and the session cookie is set accordingly. Any users with an empty string in their session cookie will use the same session store. session.flush() is called by django.contri ... b.auth.logout() and, more seriously, by django.contrib.auth.login() when a user switches accounts. If a user is logged in and logs in again to a different account (without logging out) the session is f ... 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 ...
https://man.mtool.work/django/6.1/releases/1.8.2.html
Django 1.7 リリースノート 15504
Django 1.7 リリースノート September 2, 2014 Django 1.7 へようこそ! このリリースノートでは、 バージョン 1.7 の新機能 と、Django 1.6 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した ... Python 2.6. Django 1.7 is the first release to support Python 3.4. This change should affect only a small number of Django users, as most operating-system vendors today are shipping Python 2.7 or newer as their default version. If you're still using ... migrations; in particular, Django will no longer emulate rollbacks on non-transactional databases or inside TransactionTestCase unless specifically requested . It is not advised to have apps without migrations depend on (have a ForeignKey or ManyToMa ... d to models. A singleton known as the "app cache" dealt with both installed applications and models. The models module was used as an identifier for applications in many APIs. As the concept of Django applications matured, this code showed some shor ...
https://man.mtool.work/django/6.1/releases/1.7.html
Coding style 15115
Coding style Please follow these coding standards when writing code for inclusion in Django. Pre-commit checks pre-commit is a framework for managing pre-commit hooks. These hooks help to identify simple issues before committing code for re ... code review it allows the reviewer to focus on the change itself, and it can also help to reduce the number of CI runs. To use the tool, first install pre-commit and then the git hooks: /  $ python -m pip install pre-commit $ pre-commit install . ... e. We recommend using a text editor with EditorConfig support to avoid indentation and whitespace issues. The Python files use 4 spaces for indentation and the HTML files use 2 spaces. Unless otherwise specified, follow PEP 8 . Use flake8 to check f ... guide, f-strings should use only plain variable and property access, with prior local variable assignment for more complex cases: # Allowed f "hello { user } " f "hello { user . name } " f "hello { self . user . name } " # Disallowed f "hello { get_u ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/coding-sty...
Porting your apps from Django 0.96 to 1.0 14389
Porting your apps from Django 0.96 to 1.0 Django 1.0 breaks compatibility with 0.96 in some areas. This guide will help you port 0.96 projects and apps to 1.0. The first part of this document includes the common changes needed to run with 1 ... めの手助けをすることに重点を置いています。 Common changes This section describes the changes between 0.96 and 1.0 that most users will need to make. Use Unicode Change string literals ( 'foo' ) into Unicode literals ( u'foo' ). Django now uses Unicod ... e strings throughout. In most places, raw strings will continue to work, but updating to use Unicode literals will prevent some obscure problems. See Unicode データ for full details. モデル Common changes to your mo ... a row no longer calls save() Previously, loading a row automatically ran the model's save() method. This is no longer the case, so any fields (for example: timestamps) that were auto-populated by a save() now need explicit values in any fixture. 設定 ...
https://man.mtool.work/django/6.1/releases/1.0-porting-guide.html
Django 1.8.3 リリースノート 14242
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. ... s simply by sending repeated requests with unknown session keys, potentially filling up the session store or causing other users' session records to be evicted. The built-in session backends now create a session record only if the session is actuall ... created. Thus this potential DoS is now only possible if the site chooses to expose a session-modifying view to anonymous users. As each built-in session backend was fixed separately (rather than a fix in the core sessions framework), maintainers o ... 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 ...
https://man.mtool.work/django/6.1/releases/1.8.3.html
Django 1.2 リリースノート 14123
Django 1.2 リリースノート 2010 年 5 月 17 日 Django 1.2 へようこそ! Nearly a year in the making, Django 1.2 packs an impressive list of new features and lots of bug fixes. These release notes cover the new features, as well as important cha ... lidation inspired by Django's form validation. Vastly improved protection against Cross-Site Request Forgery (CSRF). A new user "messages" framework with support for cookie- and session-based message for both anonymous and authenticated users. Hooks ... for object-level permissions , permissions for anonymous users , and more flexible username requirements . Customization of email sending via email backends . New "smart" if template ... ate date and time formats. They were translatable translation strings that could be recognized because they were all upper case (for example DATETIME_FORMAT , DATE_FORMAT , TIME_FORMAT ). They have been deprecated in favor of the new 表示形式のローカ ...
https://man.mtool.work/django/6.1/releases/1.2.html
Django 1.6 リリースノート 14108
Django 1.6 リリースノート 注釈 Dedicated to Malcolm Tredinnick On March 17, 2013, the Django project and the free software community lost a very dear friend and developer. Malcolm was a long-time contributor to Django, a model community mem ... upport will be added in Django 1.7. Django 1.6 の新機能 Simplified default project and app templates The default templates used by startproject and startapp have been simplified and modernized. The admin is now enabled by default in new projects; th ... jacking prevention is now on and the database defaults to SQLite. If the default templates don't suit your tastes, you can use custom project and app templates . Improved transaction management Django's transaction management was overhauled. Databas ... test to nominate specific tests to run must now be full Python dotted paths (or directory paths), rather than applabel.TestCase.test_method_name pseudo-paths. This allows running tests located anywhere in your codebase, rather than only in INSTALLED_ ...
https://man.mtool.work/django/6.1/releases/1.6.html
Django 1.8 リリースノート 13970
Django 1.8 リリースノート April 1, 2015 Django 1.8 へようこそ! このリリースノートでは、 バージョン 1.8 の新機能 と、Django 1.7 以前からアップグレードする際に注意すべき、 後方互換性のない変更 について説明します。 非推奨サイクルが終了した機能 ... similar to F() objects. order_by() has also gained the ability to accept expressions. Conditional Expressions allow you to use if ... elif ... else logic within queries. A collection of database functions is also included with functionality such as ... Coalesce , Concat , and Substr . TestCase data setup TestCase has been refactored to allow for data initialization at the class level using transactions and savepoi ... . Tests are now run within two nested atomic() blocks: one for the whole class and one for each test. The class method TestCase.setUpTestData() adds the ability to set up test data at the class level. Using this technique can speed up the tests as co ...
https://man.mtool.work/django/6.1/releases/1.8.html
Working with Git and GitHub 13903
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 ... Django. You could also upload a traditional patch to Trac, but it's less practical for reviews. Git のインストール Django uses Git for its source control. You can download Git, but it's often easier to install with your operating system's package m ... ork using GitHub. After installing Git, the first thing you should do is set up your name and email: $ git config --global user.name "Your Real Name" $ git config --global user.email "you@email.com" Note that user.name should be your real name, not ... 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 ...
https://man.mtool.work/django/6.1/internals/contributing/writing-code/working-wi...
PREV 1 2 3 4 5 6 7 8 9 NEXT