Changes between Version 27 and Version 28 of QuerysetRefactorBranch


Ignore:
Timestamp:
Oct 29, 2009, 1:53:03 AM (15 years ago)
Author:
KevinSmith
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QuerysetRefactorBranch

    v27 v28  
    3030
    3131=== Most visible ===
    32  * The {{{OneToOneField}}} class has finally been updated, as the documentation has indicated would be happening for a long while. There are few externally visible changes, with one exception: a {{{OneToOneField}}} is no longer automatically the primary key for a model that includes it. It still accepts the {{{primary_key}}} attribute, however, so you should add {{{primary_key=True}}} to the declaration of any existing {{{OneToOneField}}} instances in your code to preserve backwards compatibility.
     32 * The {{{OneToOneField}}} class has finally been updated, as the documentation has indicated would be happening for a long while. There are few externally visible changes, with one exception: a {{{OneToOneField}}} is no longer automatically the primary key for a model that includes it. It still accepts the {{{primary_key}}} attribute, however, so you should add {{{primary_key=True}}} to the declaration of any existing {{{OneToOneField}}} instances in your code to preserve backwards compatibility.[http://www.mustuniversity.com/Programs/Degree/Masters-Degree.html online Masters degree]
    3333 * If you pass a bad field name into a filter or {{{order_by()}}}, Django now raises {{{FieldError}}} (from {{{django.core.exceptions}}}), rather than Python's built in {{{TypeError}}}. Also, the list of legal field names is now sorted alphabetically for easier searching. This should have no effect on most production code, however some test suites may need to be updated to accommodate the changed traceback output.
    3434 * There is a slight difference between these two filter statements
     
    3838qs.objects.filter(f1, f2)
    3939   }}}
    40    This difference only applies when `f1` and `f2` are referencing the same multi-valued relationship (a `ManyToManyField` or reverse `ForeignKey`). The first version allows filtering against different items from the relationship (things that match `f1` on one object in the related table as well as `f2` on another object in the related table), whereas the second version's filters will be applied to the same item. See the [http://www.djangoproject.com/documentation/db-api/#lookups-that-span-relationships database api documentation] for details.
     40   This difference only applies when `f1` and `f2` are referencing the same multi-valued relationship (a `ManyToManyField` or reverse `ForeignKey`). The first version allows filtering against different items from the relationship (things that match `f1` on one object in the related table as well as `f2` on another object in the related table), whereas the second version's filters will be applied to the same item. See the [http://www.djangoproject.com/documentation/db-api/#lookups-that-span-relationships database api documentation] for details. [http://www.mustuniversity.com/Programs/Degree/degree.asp Online degrees] | [http://www.mustuniversity.com/Programs/Degree/PhD-Degree.html phd degree]
     41
    4142 * It is possible to use extra select fields -- those included via {{{extra(select=...)}}} -- for ordering the results. Previously, those fields could be specified to the {{{order_by()}}} method. Due to increased error checking, that is no longer practical. Instead, pass those extra columns to the {{{order_by}}} argument of the {{{extra()}}} method:
    4243   {{{
Back to Top