Changes between Version 21 and Version 22 of DescriptorFields


Ignore:
Timestamp:
01/25/06 17:04:42 (9 years ago)
Author:
adrian
Comment:

Added a few examples

Legend:

Unmodified
Added
Removed
Modified
  • DescriptorFields

    v21 v22  
    77||Foreign key field||{{{article.reporter_id}}} (Doesn't do a DB query)||{{{article.reporter.id}}} (Doesn't do a DB query)||
    88||Foreign key (other end)||{{{reporter.get_article_list()}}}||{{{reporter.article_set}}}||
     9||Foreign key (other end, count)||{{{reporter.get_article_count()}}}||{{{reporter.article_set.count()}}}||
    910||Foreign key (other end)||{{{reporter.get_article_list(headline__startswith="This")}}}||{{{reporter.article_set.filter(headline__startswith="This")}}}||
     11||Distinct||{{{reporters.get_list(distinct=True)}}}||{{{reporters.objects.distinct()}}}||
    1012||Adding related objects||{{{reporter.add_article(headline="John's second story", pub_date=datetime(2005, 7, 29))}}}||{{{reporter.article_set.add(headline="John's second story", pub_date=datetime(2005, 7, 29))}}}||
    1113||Many-to-many||{{{article.get_site_list()}}}||{{{article.site_set}}}||
Back to Top