Skip to content

add add'l intersphinx references, tweak makefile, minor typos and link cleanup #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 9, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@

intersphinx_mapping = {
'pymongo': ('http://api.mongodb.org/python/current/', None),
'python' : ('http://docs.python.org/', None)
'python' : ('http://docs.python.org/', None),
'django': ('https://django.readthedocs.org/en/latest/',None),
'djangomongodbengine': ('http://django-mongodb.org/',None),
'djangotoolbox' : ('http://djangotoolbox.readthedocs.org/en/latest/', None),
}

# -- Options for HTML output ---------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ SPHINXOPTS = -c ./
SPHINXBUILD = sphinx-build

ifdef NITPICK
timestamp := $(shell date +%Y%m%d%H%M)
SPHINXOPTS += -n -w $(branch-output)/build.$(timestamp).log
endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ have a basic familiarity with MongoDB operation and have

.. note::

`Django MongoDB Engine`_ uses the a forked version of Django 1.3
`Django MongoDB Engine`_ uses a forked version of Django 1.3
that adds non-relational support.

.. _Django: http://www.djangoproject.com
Expand All @@ -47,7 +47,7 @@ Prerequisite
This tutorial uses pip_ to install packages and virtualenv_ to isolate
Python environments. While these tools and this configuration are not
required as such, they ensure a standard environment and are strongly
recommended. Issue the following command at the system prompt:
recommended. Issue the following commands at the system prompt:

.. code-block:: sh

Expand All @@ -59,7 +59,7 @@ Respectively, these commands: install the ``virtualenv`` program
project (named ``myproject``.)

To activate ``myproject`` environment at the system prompt, use the
following command:
following commands:

.. code-block:: bash

Expand Down Expand Up @@ -133,7 +133,7 @@ The first step in writing a tumblelog in `Django`_ is to define the
"models" or in MongoDB's terminology :term:`documents <document>`.

In this application, you will define posts and comments, so that each
:py:class:`Post` can contain a list of :py:class:`Comments`. Edit the
``Post`` can contain a list of ``Comments``. Edit the
:file:`tumblelog/models.py` file so it resembles the following:

.. code-block:: python
Expand Down Expand Up @@ -167,17 +167,17 @@ In this application, you will define posts and comments, so that each
author = models.CharField(verbose_name="Name", max_length=255)


The Django "nonrel" code looks the same as vanilla Django however,
The Django "nonrel" code looks the same as vanilla Django, however
there is no built in support for some of MongoDB's native data types
like Lists and Embedded data. :py:mod:`djangotoolbox` handles these
like Lists and Embedded data. :py:mod:`djangotoolbox:djangotoolbox` handles these
definitions.

.. see:: The Django MongoDB Engine fields_ documentation for more.

The models declare an index to :py:class:`Post`. One for the
:py:obj:`created_at` date as our frontpage will order by date: there
is no need to add :py:obj:`db_index` on :py:obj:`SlugField` because
there is a default index on :py:obj:`SlugField`.
The models declare an index to the ``Post`` class. One for the
``created_at`` date as our frontpage will order by date: there
is no need to add ``db_index`` on ``SlugField`` because
there is a default index on ``SlugField``.

.. _fields: http://django-mongodb.org/reference/fields.html

Expand Down Expand Up @@ -268,7 +268,7 @@ and :file:`templates/tumblelog` for storing the tumblelog templates:
mkdir -p templates/tumblelog

Configure Django so it can find the templates by updating
:py:obj:`TEMPLATE_DIRS` in the :file:`settings.py` file to the
``TEMPLATE_DIRS`` in the :file:`settings.py` file to the
following:

.. code-block:: python
Expand Down Expand Up @@ -441,7 +441,7 @@ the following to the :file:`views.py` file:

.. note::

:py:class:`PostDetailView` extends the :py:class:`DetailView` so
The ``PostDetailView`` class extends the ``DetailView`` class so
that it can handle ``GET`` and ``POST`` requests. On ``POST``,
:py:func:`post` validates the comment: if valid, :py:func:`post`
appends the comment to the post.
Expand Down Expand Up @@ -511,19 +511,19 @@ can easily create an administrative interface for posts with
Django. Enable the admin by adding the following apps to
:py:obj:`INSTALLED_APPS` in :file:`settings.py`.

- :py:mod:`django.contrib.admin`
- :py:mod:`django_mongodb_engine`
- :py:mod:`djangotoolbox`
- :py:mod:`django:django.contrib.admin`
- :py:mod:`djangomongodbengine`
- :py:mod:`djangotoolbox:djangotoolbox`
- :py:mod:`tumblelog`

.. warning::

This application does not require the :py:class:`Sites`
framework. As a result, remove :py:mod:`django.contrib.sites` from
framework. As a result, remove :py:mod:`django:django.contrib.sites` from
:py:obj:`INSTALLED_APPS`. If you need it later please read
`SITE_ID issues`_ document.

Create a :file:`admin.py` file and register the :py:class:`Post` model
Create a :file:`admin.py` file and register the ``Post`` model
with the admin app:

.. code-block:: python
Expand All @@ -536,7 +536,7 @@ with the admin app:
.. note::

The above modifications deviate from the default django-nonrel_ and
:py:mod:`djangotoolbox` mode of operation. Django's administration
:py:mod:`djangotoolbox:djangotoolbox` mode of operation. Django's administration
module will not work unless you exclude the ``comments`` field. By
making the ``comments`` field non-editable in the "admin" model
definition, you will allow the administrative interface to function.
Expand Down
2 changes: 1 addition & 1 deletion source/use-cases/storing-log-data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ The :term:`aggregation framework` provides the capacity for queries
that select, process, and aggregate results from large numbers of
documents. The :method:`aggregate() <db.collection.aggregate()>` (and :dbcommand:`aggregate`
:term:`command <database command>`) offers greater flexibility,
capacity with less complexity than the existing :dbcommand:`mapReduce`
capacity with less complexity than the existing :dbcommand:`mapReduce <mapReduce>`
and :dbcommand:`group` aggregation.

Consider the following aggregation :term:`pipeline`: [#sql-aggregation-equivalents]_
Expand Down