Changes between Initial Version and Version 1 of Ticket #11106


Ignore:
Timestamp:
May 13, 2009, 3:18:24 PM (16 years ago)
Author:
Alex Gaynor
Comment:

Fixed formatting.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11106 – Description

    initial v1  
    11I think in http://docs.djangoproject.com/en/dev/topics/db/models/#topics-db-models
    2 
     2{{{
    33>>> Groups.objects.filter(members__name__startswith='Paul')
    4 
     4}}}
    55should be
    6 
     6{{{
    77>>> Group.objects.filter(members__name__startswith='Paul')
    8 
     8}}}
    99Moreover, memberships for paul and ringo are created differently:
    10 
     10{{{
    1111m1 = Membership(person=ringo, group=beatles, date_joined=date(1962, 8, 16), invite_reason= "Needed a new drummer.")
    1212m2 = Membership.objects.create(person=paul, group=beatles, date_joined=date(1960, 8, 1), invite_reason= "Wanted to form a band.")
    13 
     13}}}
    1414Only the second version (using Membership.objects.create) seems to work.
    15 
     15{{{
    1616>>> for group in Group.objects.all():
    1717...    print group.name
     
    2020The Beatles
    2121[<Person: Paul McCartney>]
    22 
    23 
    24 
    25 
     22}}}
Back to Top