Skip to content

Commit

Permalink
Updated and rendered docs
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Jul 12, 2012
1 parent 53a203a commit 234bc9f
Show file tree
Hide file tree
Showing 23 changed files with 151 additions and 177 deletions.
20 changes: 5 additions & 15 deletions doc_src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,17 @@ Django Categories grew out of our need to provide a basic hierarchical taxonomy

As a news site, our stories, photos, and other content get divided into "sections" and we wanted all the apps to use the same set of sections. As our needs grew, the Django Categories grew in the functionality it gave to category handling within web pages.

New in 1.0
New in 1.1
==========

**Abstract Base Class for generic hierarchical category models**
When you want a multiple types of categories and don't want them all part of the same model, you can now easily create new models by subclassing ``CategoryBase``. You can also add additional metadata as necessary.

Your model's can subclass ``CategoryBaseAdminForm`` and ``CategoryBaseAdmin`` to get the hierarchical management in the admin.

See the docs for more information.
* Fixed a cosmetic bug in the Django 1.4 admin. Action checkboxes now only appear once.

**Increased the default caching time on views**
The default setting for ``CACHE_VIEW_LENGTH`` was ``0``, which means it would tell the browser to *never* cache the page. It is now ``600``, which is the default for `CACHE_MIDDLEWARE_SECONDS <https://docs.djangoproject.com/en/1.3/ref/settings/#cache-middleware-seconds>`_
* Template tags are refactored to allow easy use of any model derived from ``CategoryBase``.

**Updated for use with Django-MPTT 0.5**
Just a few tweaks.
* Improved test suite.

**Initial compatibility with Django 1.4**
More is coming, but at least it works.
* Improved some of the documentation.

**Slug transliteration for non-ASCII characters**
A new setting, ``SLUG_TRANSLITERATOR``, allows you to specify a function for converting the non-ASCII characters to ASCII characters before the slugification. Works great with `Unidecode <http://pypi.python.org/pypi/Unidecode>`_.


Contents
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/custom_categories.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For many cases, you want a simple user-managed lookup table. You can do this wit

#. Create a subclass of CategoryBaseAdmin.

.. literalinclude:: code_examples/custom_categories1.py
.. literalinclude:: code_examples/custom_categories2.py
:linenos:

#. Register your model and custom model admin class.
Expand Down
20 changes: 5 additions & 15 deletions docs/_sources/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,17 @@ Django Categories grew out of our need to provide a basic hierarchical taxonomy

As a news site, our stories, photos, and other content get divided into "sections" and we wanted all the apps to use the same set of sections. As our needs grew, the Django Categories grew in the functionality it gave to category handling within web pages.

New in 1.0
New in 1.1
==========

**Abstract Base Class for generic hierarchical category models**
When you want a multiple types of categories and don't want them all part of the same model, you can now easily create new models by subclassing ``CategoryBase``. You can also add additional metadata as necessary.

Your model's can subclass ``CategoryBaseAdminForm`` and ``CategoryBaseAdmin`` to get the hierarchical management in the admin.

See the docs for more information.
* Fixed a cosmetic bug in the Django 1.4 admin. Action checkboxes now only appear once.

**Increased the default caching time on views**
The default setting for ``CACHE_VIEW_LENGTH`` was ``0``, which means it would tell the browser to *never* cache the page. It is now ``600``, which is the default for `CACHE_MIDDLEWARE_SECONDS <https://docs.djangoproject.com/en/1.3/ref/settings/#cache-middleware-seconds>`_
* Template tags are refactored to allow easy use of any model derived from ``CategoryBase``.

**Updated for use with Django-MPTT 0.5**
Just a few tweaks.
* Improved test suite.

**Initial compatibility with Django 1.4**
More is coming, but at least it works.
* Improved some of the documentation.

**Slug transliteration for non-ASCII characters**
A new setting, ``SLUG_TRANSLITERATOR``, allows you to specify a function for converting the non-ASCII characters to ASCII characters before the slugification. Works great with `Unidecode <http://pypi.python.org/pypi/Unidecode>`_.


Contents
Expand Down
5 changes: 3 additions & 2 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -413,7 +413,7 @@ dl.glossary dt {
}

.footnote:target {
background-color: #ffa
background-color: #ffa;
}

.line-block {
Expand Down Expand Up @@ -444,6 +444,7 @@ dl.glossary dt {

pre {
overflow: auto;
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}

td.linenos pre {
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilties for all documentation.
*
* :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilties for the full-text search.
*
* :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Once the browser is closed the cookie is deleted and the position
* reset to the default (expanded).
*
* :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
10 changes: 5 additions & 5 deletions docs/adding_the_fields.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Adding the fields to the database &mdash; Django Categories v1.0.5 documentation</title>
<title>Adding the fields to the database &mdash; Django Categories v1.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.0.5',
VERSION: '1.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
Expand All @@ -21,13 +21,13 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Django Categories v1.0.5 documentation" href="index.html" />
<link rel="top" title="Django Categories v1.1 documentation" href="index.html" />
<link rel="next" title="Creating Custom Categories" href="custom_categories.html" />
<link rel="prev" title="Registering Models" href="registering_models.html" />
</head>
<body>
<div id="docstitle">
<p>Django Categories v1.0.5 documentation</p>
<p>Django Categories v1.1 documentation</p>
</div>
<div id="header">
<div id="title"><h1>Adding the fields to the database</h1></div>
Expand Down Expand Up @@ -113,7 +113,7 @@ <h2>Reconfiguring Fields<a class="headerlink" href="#reconfiguring-fields" title
<div class="footer">
<p>
&copy; Copyright 2010-2012, Corey Oordt.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.5.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</p>
</div>
<div class="clearer"></div>
Expand Down
44 changes: 23 additions & 21 deletions docs/custom_categories.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Creating Custom Categories &mdash; Django Categories v1.0.5 documentation</title>
<title>Creating Custom Categories &mdash; Django Categories v1.1 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
VERSION: '1.0.5',
VERSION: '1.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
Expand All @@ -21,13 +21,13 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Django Categories v1.0.5 documentation" href="index.html" />
<link rel="top" title="Django Categories v1.1 documentation" href="index.html" />
<link rel="next" title="Reference" href="reference/index.html" />
<link rel="prev" title="Adding the fields to the database" href="adding_the_fields.html" />
</head>
<body>
<div id="docstitle">
<p>Django Categories v1.0.5 documentation</p>
<p>Django Categories v1.1 documentation</p>
</div>
<div id="header">
<div id="title"><h1>Creating Custom Categories</h1></div>
Expand Down Expand Up @@ -119,23 +119,25 @@ <h2>Name only<a class="headerlink" href="#name-only" title="Permalink to this he
</td></tr></table></div>
</li>
<li><p class="first">Create a subclass of CategoryBaseAdmin.</p>
<div class="highlight-python"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8
9</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">categories.models</span> <span class="kn">import</span> <span class="n">CategoryBase</span>
<div class="highlight-python"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre> 1
2
3
4
5
6
7
8
9
10</pre></div></td><td class="code"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.contrib</span> <span class="kn">import</span> <span class="n">admin</span>

<span class="k">class</span> <span class="nc">SimpleCategory</span><span class="p">(</span><span class="n">CategoryBase</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> A simple of catgorizing example</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">class</span> <span class="nc">Meta</span><span class="p">:</span>
<span class="n">verbose_name_plural</span> <span class="o">=</span> <span class="s">&#39;simple categories&#39;</span>
<span class="kn">from</span> <span class="nn">categories.admin</span> <span class="kn">import</span> <span class="n">CategoryBaseAdmin</span>

<span class="kn">from</span> <span class="nn">.models</span> <span class="kn">import</span> <span class="n">SimpleCategory</span>

<span class="k">class</span> <span class="nc">SimpleCategoryAdmin</span><span class="p">(</span><span class="n">CategoryBaseAdmin</span><span class="p">):</span>
<span class="k">pass</span>

<span class="n">admin</span><span class="o">.</span><span class="n">site</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">SimpleCategory</span><span class="p">,</span> <span class="n">SimpleCategoryAdmin</span><span class="p">)</span>
</pre></div>
</td></tr></table></div>
</li>
Expand Down Expand Up @@ -325,7 +327,7 @@ <h2>Name and other data<a class="headerlink" href="#name-and-other-data" title="
<div class="footer">
<p>
&copy; Copyright 2010-2012, Corey Oordt.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.5.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
</p>
</div>
<div class="clearer"></div>
Expand Down

0 comments on commit 234bc9f

Please sign in to comment.