瀏覽代碼

Documentation: Added development docs warning on top of all pages.

Closes #237.
Ask Solem 14 年之前
父節點
當前提交
b32aa95be0
共有 3 個文件被更改,包括 33 次插入3 次删除
  1. 21 0
      docs/.templates/page.html
  2. 8 0
      docs/_theme/celery/static/celery.css_t
  3. 4 3
      docs/getting-started/first-steps-with-celery.rst

+ 21 - 0
docs/.templates/page.html

@@ -0,0 +1,21 @@
+{% extends "layout.html" %}
+{% block body %}
+<div class="deck">
+
+    {% if version == "2.2" %}
+        <p class="developmentversion">
+        This document is for Celery's development version, which can be
+        significantly different from previous releases. Get old docs here:
+
+        <a href="http://celeryproject.org/docs/{{ pagename }}{{ file_suffix }}">2.1</a>.
+        </p>
+        {% else %}
+        <p>
+        This document describes Celery {{ version }}. For development docs,
+        <a href="http://ask.github.com/celery/{{ pagename }}{{ file_suffix }}">go here</a>.
+        </p>
+    {% endif %}
+
+</div>
+    {{ body }}
+{% endblock %}

+ 8 - 0
docs/_theme/celery/static/celery.css_t

@@ -30,6 +30,14 @@ div.document {
     margin: 0 auto;
 }
 
+div.deck {
+    font-size: 18px;
+}
+
+p.developmentversion {
+    color: red;
+}
+
 div.related {
     width: {{ page_width - 20 }}px;
     padding: 5px 10px;

+ 4 - 3
docs/getting-started/first-steps-with-celery.rst

@@ -15,9 +15,10 @@ Creating a simple task
 In this tutorial we are creating a simple task that adds two
 numbers.  Tasks are defined in normal Python modules.
 
-By convention we will call our moudule :file:`tasks.py`, and it looks
+By convention we will call our module :file:`tasks.py`, and it looks
+like this:
 
-**:file:`tasks.py`:**
+:file: `tasks.py`
 
 .. code-block:: python
 
@@ -29,7 +30,7 @@ By convention we will call our moudule :file:`tasks.py`, and it looks
 
 
 All Celery tasks are classes that inherits from the
-:class:`~clery.task.base.Task` class.  In this example we're using a
+:class:`~celery.task.base.Task` class.  In this example we're using a
 decorator that wraps the add function in an appropriate class for us
 automatically.