Skip to content

Commit

Permalink
Merge pull request #174 from johnthagen/doc-code-fix
Browse files Browse the repository at this point in the history
Fix doc code include in ObjectDownloadView
  • Loading branch information
Natim authored Jan 21, 2021
2 parents c602c32 + ed3d470 commit 9b5fee2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/views/object.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ Setup a view to stream the ``file`` attribute:

.. literalinclude:: /../demo/demoproject/object/views.py
:language: python
:lines: 1-5, 7
:lines: 1-6

:class:`~django_downloadview.views.object.ObjectDownloadView` inherits from
:class:`~django.views.generic.detail.BaseDetailView`, i.e. it expects either
``slug`` or ``pk``:

.. literalinclude:: /../demo/demoproject/object/urls.py
:language: python
:lines: 1-7, 8-11, 20
:lines: 1-7, 8-11, 27


************
Expand Down Expand Up @@ -69,7 +69,7 @@ Then here is the code to serve "another_file" instead of the default "file":

.. literalinclude:: /../demo/demoproject/object/views.py
:language: python
:lines: 1-5, 10-12
:lines: 1-4, 8-11


**********************************
Expand All @@ -90,7 +90,7 @@ Then you can configure the :attr:`ObjectDownloadView.basename_field` option:

.. literalinclude:: /../demo/demoproject/object/views.py
:language: python
:lines: 1-5, 16-18
:lines: 1-4, 13-17

.. note::

Expand Down

0 comments on commit 9b5fee2

Please sign in to comment.