Did I find the right examples for you? yes no

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/d/j/django-user-tags-1.1/user_tags/forms.py   django-user-tags(Download)
            try:
                tagged_item = TaggedItem.objects.get(
                    content_type=ContentType.objects.get_for_model(instance),
                    object_id=instance.pk)
            except TaggedItem.DoesNotExist:

src/d/j/django-user-tags-1.1/user_tags/tests/forms_tests.py   django-user-tags(Download)
 
        tagged_item = TaggedItem.objects.get(
            content_type=ContentType.objects.get_for_model(instance),
            object_id=instance.pk)
        self.assertEqual(tagged_item.user_tags.all().count(), 5)
        instance = form.save()
        tagged_item = TaggedItem.objects.get(
            content_type=ContentType.objects.get_for_model(instance),
            object_id=instance.pk)
        self.assertEqual(tagged_item.user_tags.all().count(), 4)