Ticket #6331: shortcuts.txt.diff
File shortcuts.txt.diff, 665 bytes (added by , 17 years ago) |
---|
-
docs/shortcuts.txt
94 94 95 95 def my_view(request): 96 96 try: 97 my_object = MyModel.object .get(pk=1)97 my_object = MyModel.objects.get(pk=1) 98 98 except MyModel.DoesNotExist: 99 99 raise Http404 100 100 … … 136 136 from django.http import Http404 137 137 138 138 def my_view(request): 139 my_objects = MyModel s.object.filter(published=True)139 my_objects = MyModel.objects.filter(published=True) 140 140 if not my_objects: 141 141 raise Http404 142 142