diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt
index 6bd3058..a04ffae 100644
a
|
b
|
Optional arguments
|
36 | 36 | |
37 | 37 | ``context_instance`` |
38 | 38 | The context instance to render the template with. By default, the template |
39 | | will be rendered with a ``Context`` instance (filled with values from |
40 | | ``dictionary``). If you need to use :ref:`context processors |
41 | | <subclassing-context-requestcontext>`, render the template with a |
42 | | ``RequestContext`` instance instead. Your code might look something like |
43 | | this:: |
| 39 | will be rendered with a :class:`~django.template.Context` instance (filled |
| 40 | with values from ``dictionary``). If you need to use :ref:`context |
| 41 | processors <subclassing-context-requestcontext>`, render the template with |
| 42 | a :class:`~django.template.RequestContext` instance instead. Your code |
| 43 | might look something like this:: |
44 | 44 | |
45 | 45 | return render_to_response('my_template.html', |
46 | 46 | my_data_dictionary, |
47 | 47 | context_instance=RequestContext(request)) |
48 | 48 | |
49 | 49 | ``mimetype`` |
50 | | |
51 | | .. versionadded:: 1.0 |
52 | | |
53 | 50 | The MIME type to use for the resulting document. Defaults to the value of |
54 | 51 | the :setting:`DEFAULT_CONTENT_TYPE` setting. |
55 | 52 | |
| 53 | .. versionadded:: 1.0 |
| 54 | |
| 55 | |
56 | 56 | Example |
57 | 57 | ------- |
58 | 58 | |
… |
… |
This example is equivalent to::
|
85 | 85 | |
86 | 86 | .. versionadded:: 1.1 |
87 | 87 | |
88 | | Returns an HttpResponseRedirect to the apropriate URL for the arguments |
89 | | passed. |
| 88 | Returns an :class:`~django.http.HttpResponseRedirect` to the apropriate URL |
| 89 | for the arguments passed. |
90 | 90 | |
91 | 91 | The arguments could be: |
92 | 92 | |
… |
… |
This example is equivalent to::
|
97 | 97 | |
98 | 98 | * A URL, which will be used as-is for the redirect location. |
99 | 99 | |
100 | | By default issues a temporary redirect; pass permanent=True to issue a |
| 100 | By default issues a temporary redirect; pass ``permanent=True`` to issue a |
101 | 101 | permanent redirect |
102 | 102 | |
103 | 103 | Examples |
… |
… |
will be returned::
|
149 | 149 | .. function:: get_object_or_404(klass, *args, **kwargs) |
150 | 150 | |
151 | 151 | Calls :meth:`~django.db.models.QuerySet.get()` on a given model manager, |
152 | | but it raises ``django.http.Http404`` instead of the model's |
153 | | ``DoesNotExist`` exception. |
| 152 | but it raises :class:`~django.http.Http404` instead of the model's |
| 153 | :class:`~django.core.exceptions.DoesNotExist` exception. |
154 | 154 | |
155 | 155 | Required arguments |
156 | 156 | ------------------ |
157 | 157 | |
158 | 158 | ``klass`` |
159 | | A ``Model``, ``Manager`` or ``QuerySet`` instance from which to get the |
| 159 | A :class:`~django.db.models.Model`, :class:`~django.db.models.Manager` or |
| 160 | :class:`~django.db.models.query.QuerySet` instance from which to get the |
160 | 161 | object. |
161 | 162 | |
162 | 163 | ``**kwargs`` |
… |
… |
This example is equivalent to::
|
184 | 185 | except MyModel.DoesNotExist: |
185 | 186 | raise Http404 |
186 | 187 | |
187 | | Note: As with ``get()``, an ``MultipleObjectsReturned`` exception will be |
188 | | raised if more than one object is found. |
| 188 | Note: As with ``get()``, a |
| 189 | :class:`~django.core.exceptions.MultipleObjectsReturned` exception |
| 190 | will be raised if more than one object is found. |
189 | 191 | |
190 | 192 | ``get_list_or_404`` |
191 | 193 | =================== |
… |
… |
raised if more than one object is found.
|
193 | 195 | .. function:: get_list_or_404(klass, *args, **kwargs) |
194 | 196 | |
195 | 197 | Returns the result of :meth:`~django.db.models.QuerySet.filter()` on a |
196 | | given model manager, raising ``django.http.Http404`` if the resulting list |
197 | | is empty. |
| 198 | given model manager, raising :class:`~django.http.Http404` if the resulting |
| 199 | list is empty. |
198 | 200 | |
199 | 201 | Required arguments |
200 | 202 | ------------------ |
201 | 203 | |
202 | 204 | ``klass`` |
203 | | A ``Model``, ``Manager`` or ``QuerySet`` instance from which to get the |
204 | | object. |
| 205 | A :class:`~django.db.models.Model`, :class:`~django.db.models.Manager` or |
| 206 | :class:`~django.db.models.query.QuerySet` instance from which to get the |
| 207 | list. |
205 | 208 | |
206 | 209 | ``**kwargs`` |
207 | 210 | Lookup parameters, which should be in the format accepted by ``get()`` and |