Changes between Version 59 and Version 60 of RemovingTheMagic


Ignore:
Timestamp:
02/03/06 18:10:10 (10 years ago)
Author:
adrian
Comment:

Added 'latest-object lookup' section to descriptor-fields example table.

Legend:

Unmodified
Added
Removed
Modified
  • RemovingTheMagic

    v59 v60  
    373373|| '''Date lookup'''                                      ||                                              ||
    374374|| {{{articles.get_pub_date_list('year')}}}                     || {{{Article.objects.dates('pub_date', 'year')}}} ||
     375|| '''Latest-object lookup'''                             ||                                               ||
     376|| {{{articles.get_latest()}}} (required {{{get_latest_by}}} in model) || {{{Article.objects.latest()}}} (with {{{get_latest_by}}} in model) ||
     377|| (Not previously possible)                                     || {{{Article.objects.latest('pub_date')}}} # Latest by pub_date (overrides {{{get_latest_by}}} field in model) ||
    375378|| '''Many-to-one related lookup'''                        ||                                              ||
    376379|| {{{article_obj.reporter_id}}}                                 || {{{article_obj.reporter.id}}} ||
Back to Top