aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/check_sphinx.py16
-rw-r--r--docs/conf.py10
-rw-r--r--docs/howto/setup.rst2
-rw-r--r--docs/index.rst1
-rw-r--r--docs/templates/layout.html3
5 files changed, 26 insertions, 6 deletions
diff --git a/docs/check_sphinx.py b/docs/check_sphinx.py
new file mode 100644
index 00000000..74874eed
--- /dev/null
+++ b/docs/check_sphinx.py
@@ -0,0 +1,16 @@
+import pytest
+import subprocess
+
+def test_linkcheck(tmpdir):
+ doctrees = tmpdir.join("doctrees")
+ htmldir = tmpdir.join("html")
+ subprocess.check_call(
+ ["sphinx-build", "-q", "-blinkcheck",
+ "-d", str(doctrees), ".", str(htmldir)])
+
+def test_build_docs(tmpdir):
+ doctrees = tmpdir.join("doctrees")
+ htmldir = "html" #we want to keep the docs
+ subprocess.check_call([
+ "sphinx-build", "-q", "-bhtml",
+ "-d", str(doctrees), ".", str(htmldir)])
diff --git a/docs/conf.py b/docs/conf.py
index 503b4059..0a9fe068 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -55,9 +55,13 @@ copyright = u'2011, Tom Christie'
# built documents.
#
# The short X.Y version.
-version = '0.1'
+
+import djangorestframework
+
+version = djangorestframework.__version__
+
# The full version, including alpha/beta/rc tags.
-release = '0.1'
+release = version
autodoc_member_order='bysource'
@@ -100,7 +104,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = 'sphinxdoc'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst
index b4fbc037..a9053f73 100644
--- a/docs/howto/setup.rst
+++ b/docs/howto/setup.rst
@@ -22,7 +22,7 @@ This will be the case by default so you shouldn't normally need to do anything h
Admin Styling
-------------
-Django REST framework uses the admin media for styling. When running using Django's testserver this is automatically served for you, but once you move onto a production server, you'll want to make sure you serve the admin media separately, exactly as you would do `if using the Django admin <http://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-the-admin-files>`_.
+Django REST framework uses the admin media for styling. When running using Django's testserver this is automatically served for you, but once you move onto a production server, you'll want to make sure you serve the admin media separately, exactly as you would do `if using the Django admin <https://docs.djangoproject.com/en/dev/howto/deployment/modpython/#serving-the-admin-files>`_.
* Ensure that the ``ADMIN_MEDIA_PREFIX`` is set appropriately and that you are serving the admin media. (Django's testserver will automatically serve the admin media for you)
diff --git a/docs/index.rst b/docs/index.rst
index 309effab..6038b7df 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -45,7 +45,6 @@ Requirements
Installation
------------
-
You can install Django REST framework using ``pip`` or ``easy_install``::
pip install djangorestframework
diff --git a/docs/templates/layout.html b/docs/templates/layout.html
index 6ba9e6ff..70532554 100644
--- a/docs/templates/layout.html
+++ b/docs/templates/layout.html
@@ -23,4 +23,5 @@
})();
</script>
-{% endblock %}
+{% endblock %}{% block footer %}
+<div class="footer"> <p> Documentation version {{ version }} {% endblock %}</p></div>