Skip to content

Commit 2279b6e

Browse files
authored
Merge pull request #447 from bittner/feature/use-same-theme-for-docs-as-pytest
Pimp up the docs! (use same theme as pytest)
2 parents 7e1bf50 + cb71a35 commit 2279b6e

File tree

3 files changed

+40
-14
lines changed

3 files changed

+40
-14
lines changed

docs/_templates/sidebarintro.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<h3>About</h3>
2+
<p>
3+
pytest-django is a plugin for <a href="http://pytest.org/">pytest</a>.
4+
Better testing for your <a href="https://www.djangoproject.com/">Django</a> project!
5+
</p>

docs/changelog.rst

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Bug fixes
1010
* Auto clearing of ``mail.outbox`` has been re-introduced to not break
1111
functionality in 3.x.x release. This means that Compatibility issues
1212
mentioned in the 3.1.0 release are no longer present. Related issue:
13-
_`pytest-django issue <https://github.com/pytest-dev/pytest-django/issues/433>`
13+
`pytest-django issue <https://github.com/pytest-dev/pytest-django/issues/433>`__
1414

1515
3.1.1
1616
-----
@@ -20,8 +20,9 @@ Bug fixes
2020

2121
* Workaround `--pdb` interaction with Django TestCase. The issue is caused by
2222
Django TestCase not implementing TestCase.debug() properly but was brought to
23-
attention with recent changes in pytest 3.0.2. Related issues: `pytest issue <https://github.com/pytest-dev/pytest/issues/1977>`_,
24-
`Django issue <https://code.djangoproject.com/ticket/27391>`_.
23+
attention with recent changes in pytest 3.0.2. Related issues:
24+
`pytest issue <https://github.com/pytest-dev/pytest/issues/1977>`__,
25+
`Django issue <https://code.djangoproject.com/ticket/27391>`__
2526

2627
3.1.0
2728
-----
@@ -59,7 +60,7 @@ Bug fixes
5960

6061
* Fix error when Django happens to be imported before pytest-django runs.
6162
Thanks to Will Harris for `the bug report
62-
<https://github.com/pytest-dev/pytest-django/issues/289>`_.
63+
<https://github.com/pytest-dev/pytest-django/issues/289>`__.
6364

6465
Features
6566
^^^^^^^^
@@ -110,7 +111,7 @@ Bug fixes
110111

111112
* Fix regression introduced in 2.9.0 that caused TestCase subclasses with
112113
mixins to cause errors. Thanks MikeVL for `the bug report
113-
<https://github.com/pytest-dev/pytest-django/issues/280>`_.
114+
<https://github.com/pytest-dev/pytest-django/issues/280>`__.
114115

115116

116117
2.9.0
@@ -130,11 +131,12 @@ Bug fixes
130131
* Ensure urlconf is properly reset when using @pytest.mark.urls. Thanks to
131132
Sarah Bird, David Szotten, Daniel Hahler and Yannick PÉROUX for patch and
132133
discussions. Fixes `issue #183
133-
<https://github.com/pytest-dev/pytest-django/issues/183>`_.
134+
<https://github.com/pytest-dev/pytest-django/issues/183>`__.
134135

135136
* Call ``setUpClass()`` in Django ``TestCase`` properly when test class is
136137
inherited multiple places. Thanks to Benedikt Forchhammer for report and
137-
initial test case. Fixes `issue #265 <https://github.com/pytest-dev/pytest-django/issues/265>`_.
138+
initial test case. Fixes `issue #265
139+
<https://github.com/pytest-dev/pytest-django/issues/265>`__.
138140

139141
Compatibility
140142
^^^^^^^^^^^^^
@@ -145,7 +147,7 @@ Compatibility
145147
instead. If you previously relied on overriding the environment variable,
146148
you can instead specify ``addopts = --ds=yourtestsettings`` in the ini-file
147149
which will use the test settings. See `PR #199
148-
<https://github.com/pytest-dev/pytest-django/pull/199>`_.
150+
<https://github.com/pytest-dev/pytest-django/pull/199>`__.
149151

150152
* Support for Django 1.9.
151153

@@ -186,7 +188,9 @@ Features
186188
* Automatic discovery of Django projects to make it easier for new users. This
187189
change is slightly backward incompatible, if you encounter problems with it,
188190
the old behaviour can be restored by adding this to ``pytest.ini``,
189-
``setup.cfg`` or ``tox.ini``::
191+
``setup.cfg`` or ``tox.ini``:
192+
193+
.. code-block:: ini
190194
191195
[pytest]
192196
django_find_project = false
@@ -366,7 +370,7 @@ way for easier additions of new and exciting features in the future!
366370
1.3
367371
---
368372
* Added ``--reuse-db`` and ``--create-db`` to allow database re-use. Many
369-
thanks to `django-nose <https://github.com/jbalogh/django-nose>`_ for
373+
thanks to `django-nose <https://github.com/jbalogh/django-nose>`__ for
370374
code and inspiration for this feature.
371375

372376
1.2.2
@@ -389,7 +393,8 @@ way for easier additions of new and exciting features in the future!
389393
1.1
390394
---
391395

392-
* The initial release of this fork from `Ben Firshman original project <http://github.com/bfirsh/pytest_django>`_
396+
* The initial release of this fork from `Ben Firshman original project
397+
<http://github.com/bfirsh/pytest_django>`__
393398
* Added documentation
394399
* Uploaded to PyPI for easy installation
395400
* Added the ``transaction_test_case`` decorator for tests that needs real transactions

docs/conf.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,25 @@
3333
exclude_patterns = ['_build']
3434

3535
pygments_style = 'sphinx'
36-
html_theme = 'default'
37-
html_style = 'rtd.css'
38-
RTD_NEW_THEME = True
36+
html_theme = 'flask'
37+
html_theme_options = {
38+
# 'index_logo': '',
39+
'github_fork': 'pytest-dev/pytest-django',
40+
}
41+
html_sidebars = {
42+
'index': [
43+
'sidebarintro.html',
44+
'globaltoc.html',
45+
'searchbox.html'
46+
],
47+
'**': [
48+
'globaltoc.html',
49+
'relations.html',
50+
'searchbox.html'
51+
]
52+
}
53+
# html_style = 'rtd.css'
54+
# RTD_NEW_THEME = True
3955

4056
# Add any paths that contain custom static files (such as style sheets) here,
4157
# relative to this directory. They are copied after the builtin static files,

0 commit comments

Comments
 (0)