Django

Code

Ticket #6600: docs.contenttypes-typos.patch

File docs.contenttypes-typos.patch, 0.9 kB (added by anonymous, 9 months ago)
  • docs/contenttypes.txt

    old new  
    215215object it's related to, and you can also assign to that field or use it when 
    216216creating a ``TaggedItem``:: 
    217217 
    218     >>> from django.contrib.models.auth import User 
     218    >>> from django.contrib.auth.models import User 
    219219    >>> guido = User.objects.get(username='Guido') 
    220220    >>> t = TaggedItem(content_object=guido, tag='bdfl') 
    221221    >>> t.save() 
     
    235235``Bookmark`` instances will each have a ``tags`` attribute, which can 
    236236be used to retrieve their associated ``TaggedItems``:: 
    237237 
    238     >>> b = Bookmark('http://www.djangoproject.com/') 
     238    >>> b = Bookmark(url='http://www.djangoproject.com/') 
    239239    >>> b.save() 
    240240    >>> t1 = TaggedItem(content_object=b, tag='django') 
    241241    >>> t1.save()