Ticket #2195: generic_relation_modeltests_spelling.diff

File generic_relation_modeltests_spelling.diff, 1.4 KB (added by Tom Tobin <korpios@…>, 18 years ago)

Fix spelling in generic relations modeltest

  • trunk/tests/modeltests/generic_relations/models.py

     
    55content-type/object-id field. A generic foreign key can point to any object,
    66be it animal, vegetable, or mineral.
    77
    8 The cannonical example is tags (although this example implementation is *far*
     8The canonical example is tags (although this example implementation is *far*
    99from complete).
    1010"""
    1111
     
    8585<Vegetable: Bacon>
    8686
    8787# Recall that the Mineral class doesn't have an explicit GenericRelation
    88 # defined. That's OK since you can create TaggedItems explicitally.
     88# defined. That's OK since you can create TaggedItems explicitly.
    8989>>> tag1 = TaggedItem(content_object=quartz, tag="shiny")
    9090>>> tag2 = TaggedItem(content_object=quartz, tag="clearish")
    9191>>> tag1.save()
    9292>>> tag2.save()
    9393
    94 # However, not having the convience takes a small toll when it comes
     94# However, not having the convenience takes a small toll when it comes
    9595# to do lookups
    9696>>> from django.contrib.contenttypes.models import ContentType
    9797>>> ctype = ContentType.objects.get_for_model(quartz)
     
    105105[<TaggedItem: shiny>]
    106106>>> TaggedItem.objects.filter(content_type__pk=ctype.id, object_id=quartz.id)
    107107[<TaggedItem: clearish>]
    108 """
    109  No newline at end of file
     108"""
Back to Top