mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Updating the documentation.
This commit is contained in:
parent
d48be41dd3
commit
ed4db03c7d
28 changed files with 1056 additions and 87 deletions
|
|
@ -1,8 +1,6 @@
|
|||
===========================================
|
||||
Django Categories v|version| documentation!
|
||||
===========================================
|
||||
|
||||
|
||||
=============================
|
||||
Django Categories v |version|
|
||||
=============================
|
||||
|
||||
Contents:
|
||||
|
||||
|
|
@ -13,7 +11,7 @@ Contents:
|
|||
getting_started
|
||||
usage
|
||||
registering_models
|
||||
templatetags
|
||||
adding_the_fields
|
||||
reference/index
|
||||
|
||||
Indices and tables
|
||||
|
|
|
|||
|
|
@ -9,3 +9,4 @@ Reference
|
|||
management_commands
|
||||
models
|
||||
settings
|
||||
templatetags
|
||||
|
|
|
|||
42
doc_src/reference/models.rst
Normal file
42
doc_src/reference/models.rst
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
======
|
||||
Models
|
||||
======
|
||||
|
||||
Category
|
||||
========
|
||||
|
||||
**parent**
|
||||
The category's parent category. Leave this blank for an Category Tree.
|
||||
|
||||
**name**
|
||||
The name of the category.
|
||||
|
||||
**thumbnail**
|
||||
An optional thumbnail, that is uploaded to ``CATEGORY_SETTINGS['THUMBNAIL_UPLOAD_PATH']`` via ``CATEGORY_SETTINGS['THUMBNAIL_STORAGE']``\ .
|
||||
|
||||
**thumbnail_width**
|
||||
The thumbnail width.
|
||||
|
||||
**thumbnail_height**
|
||||
The thumbnail height.
|
||||
|
||||
**order**
|
||||
The order of this category in the listing
|
||||
|
||||
**slug**
|
||||
A slug created from the name field
|
||||
|
||||
**alternate_title**
|
||||
An alternative title to use on pages with this category.
|
||||
|
||||
**alternate_url**
|
||||
An alternative URL to use instead of the one derived from the category hierarchy.
|
||||
|
||||
**description**
|
||||
An optional longer description of the category.
|
||||
|
||||
**meta_keywords**
|
||||
Comma-separated keywords for search engines.
|
||||
|
||||
**meta_extra**
|
||||
(Advanced) Any additional HTML to be placed verbatim in the ``<head>``
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 0f579989dd4cbe4af0af63fb63e64641
|
||||
tags: fbb0d17656682115ca4d033fb2f83ba1
|
||||
config:
|
||||
tags:
|
||||
|
|
|
|||
23
docs/_sources/adding_the_fields.txt
Normal file
23
docs/_sources/adding_the_fields.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
.. _adding_the_fields:
|
||||
|
||||
=================================
|
||||
Adding the fields to the database
|
||||
=================================
|
||||
|
||||
While Django will create the appropriate columns and tables if you configure Django Categories first, many times that is not possible. You could also reset the table, but you would loose all data in it. There is another way.
|
||||
|
||||
Enter South
|
||||
***********
|
||||
|
||||
`South <http://south.aeracode.org/>`_ is a Django application for managing database schema changes. South's default behavior is for managing permanent changes to a model's structure. In the case of dynamically adding a field or fields to a model, this doesn't work because you are not making the change permanent. And probably don't want to.
|
||||
|
||||
Django Categories has a management command to create any missing fields. It requires South because it uses the South's API for making changes to databases. The management command is simple: ``python manage.py add_category_fields [app]``\ . If you do not include an app name, it will attempt to do all applications configured.
|
||||
|
||||
Running this command several times will not hurt any data or cause any errors.
|
||||
|
||||
Reconfiguring Fields
|
||||
********************
|
||||
|
||||
You can make changes to the field configurations as long as they do not change the underlying database structure. For example, adding a ``related_name`` (see :ref:`registering_a_m2one_relationship`\ ) because it only affects Django code. Changing the name of the field, however, is a different matter.
|
||||
|
||||
Django Categories provides a complementary management command to drop a field from the database (the field must still be in the configuration to do so): ``python manage.py drop_category_field app_name model_name field_name``
|
||||
|
|
@ -54,11 +54,16 @@ Hard coded connections are done in the exact same way you handle any other forei
|
|||
name = models.CharField(max_length=100)
|
||||
category = models.ForeignKey('categories.Category')
|
||||
|
||||
Don't forget to add the field or fields to your ``ModelAdmin`` class as well.
|
||||
|
||||
|
||||
.. _lazy_connection:
|
||||
|
||||
Lazy Connection
|
||||
***************
|
||||
|
||||
Lazy connections are done through configuring Django Categories in the project's ``settings.py`` file. When the project starts up, the configured fields are dynamically added to the configured models and admin.
|
||||
|
||||
If you do this before you have created the database (before you ran ``manage.py syncdb``), the fields will also be in the tables. If you do this after you have already created all the tables, you can run ``manage.py add_category_fields`` to create the fields (this requires Django South to be installed).
|
||||
|
||||
You add a many-to-one or many-to-many relationship with Django Categories using the ``CATEGORIES_SETTINGS['FK_REGISTRY']`` and ``CATEGORIES_SETTINGS['M2M_REGISTRY']`` settings respectively. For more information see :ref:`registering_models`\ .
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
===========================================
|
||||
Django Categories v|version| documentation!
|
||||
===========================================
|
||||
|
||||
|
||||
=============================
|
||||
Django Categories v |version|
|
||||
=============================
|
||||
|
||||
Contents:
|
||||
|
||||
|
|
@ -13,7 +11,7 @@ Contents:
|
|||
getting_started
|
||||
usage
|
||||
registering_models
|
||||
templatetags
|
||||
adding_the_fields
|
||||
reference/index
|
||||
|
||||
Indices and tables
|
||||
|
|
|
|||
|
|
@ -6,4 +6,7 @@ Reference
|
|||
:maxdepth: 2
|
||||
:glob:
|
||||
|
||||
settings
|
||||
management_commands
|
||||
models
|
||||
settings
|
||||
templatetags
|
||||
|
|
|
|||
38
docs/_sources/reference/management_commands.txt
Normal file
38
docs/_sources/reference/management_commands.txt
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
.. _management-commands:
|
||||
|
||||
===================
|
||||
Management Commands
|
||||
===================
|
||||
|
||||
.. _import_categories:
|
||||
|
||||
import_categories
|
||||
=================
|
||||
|
||||
**Usage:** ``./manage.py import_categories /path/to/file.txt [/path/to/file2.txt]``
|
||||
|
||||
Imports category tree(s) from a file. Sub categories must be indented by the same multiple of spaces or tabs. The first line in the file cannot start with a space or tab and you can't mix spaces and tabs.
|
||||
|
||||
|
||||
.. _add_category_fields:
|
||||
|
||||
add_category_fields
|
||||
===================
|
||||
|
||||
**Usage:** ``./manage.py add_category_fields [app1 app2 ...]``
|
||||
|
||||
Add missing registered category fields to the database table of a specified application or all registered applications.
|
||||
|
||||
Requires Django South.
|
||||
|
||||
|
||||
.. _drop_category_fields:
|
||||
|
||||
drop_category_fields
|
||||
===================
|
||||
|
||||
**Usage:** ``./manage.py drop_category_field app_name model_name field_name``
|
||||
|
||||
Drop the ``field_name`` field from the ``app_name_model_name`` table, if the field is currently registered in ``CATEGORIES_SETTINGS``\ .
|
||||
|
||||
Requires Django South.
|
||||
42
docs/_sources/reference/models.txt
Normal file
42
docs/_sources/reference/models.txt
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
======
|
||||
Models
|
||||
======
|
||||
|
||||
Category
|
||||
========
|
||||
|
||||
**parent**
|
||||
The category's parent category. Leave this blank for an Category Tree.
|
||||
|
||||
**name**
|
||||
The name of the category.
|
||||
|
||||
**thumbnail**
|
||||
An optional thumbnail, that is uploaded to ``CATEGORY_SETTINGS['THUMBNAIL_UPLOAD_PATH']`` via ``CATEGORY_SETTINGS['THUMBNAIL_STORAGE']``\ .
|
||||
|
||||
**thumbnail_width**
|
||||
The thumbnail width.
|
||||
|
||||
**thumbnail_height**
|
||||
The thumbnail height.
|
||||
|
||||
**order**
|
||||
The order of this category in the listing
|
||||
|
||||
**slug**
|
||||
A slug created from the name field
|
||||
|
||||
**alternate_title**
|
||||
An alternative title to use on pages with this category.
|
||||
|
||||
**alternate_url**
|
||||
An alternative URL to use instead of the one derived from the category hierarchy.
|
||||
|
||||
**description**
|
||||
An optional longer description of the category.
|
||||
|
||||
**meta_keywords**
|
||||
Comma-separated keywords for search engines.
|
||||
|
||||
**meta_extra**
|
||||
(Advanced) Any additional HTML to be placed verbatim in the ``<head>``
|
||||
146
docs/_sources/reference/templatetags.txt
Normal file
146
docs/_sources/reference/templatetags.txt
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
=============
|
||||
Template Tags
|
||||
=============
|
||||
|
||||
get_top_level_categories
|
||||
========================
|
||||
|
||||
Retrieves an alphabetical list of all the categories that have no parents.
|
||||
|
||||
Syntax:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% get_top_level_categories as categories %}
|
||||
|
||||
Returns an list of categories ``[<category>, <category>, <category, ...]``
|
||||
|
||||
|
||||
display_path_as_ul
|
||||
==================
|
||||
|
||||
Render the category with ancestors, but no children using the ``categories/ul_tree.html`` template.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% display_path_as_ul "/Grandparent/Parent" %}
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% display_path_as_ul category_obj %}
|
||||
|
||||
Returns:
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<ul>
|
||||
<li><a href="/categories/">Top</a>
|
||||
<ul>
|
||||
<li><a href="/categories/grandparent/">Grandparent</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
get_category_drilldown
|
||||
======================
|
||||
|
||||
Retrieves the specified category, its ancestors and its immediate children
|
||||
as an iterable.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% get_category_drilldown "/Grandparent/Parent" as family %}
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% get_category_drilldown category_obj as family %}
|
||||
|
||||
Sets ``family`` to::
|
||||
|
||||
[Grandparent, Parent, Child 1, Child 2, Child n]
|
||||
|
||||
|
||||
display_drilldown_as_ul
|
||||
=======================
|
||||
|
||||
Render the category with ancestors and children using the
|
||||
``categories/ul_tree.html`` template.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% display_drilldown_as_ul "/Grandparent/Parent" %}
|
||||
|
||||
or:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% display_drilldown_as_ul category_obj %}
|
||||
|
||||
Returns:
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<ul>
|
||||
<li><a href="/categories/">Top</a>
|
||||
<ul>
|
||||
<li><a href="/categories/grandparent/">Grandparent</a>
|
||||
<ul>
|
||||
<li><a href="/categories/grandparent/parent/">Parent</a>
|
||||
<ul>
|
||||
<li><a href="/categories/grandparent/parent/child1">Child1</a></li>
|
||||
<li><a href="/categories/grandparent/parent/child2">Child2</a></li>
|
||||
<li><a href="/categories/grandparent/parent/child3">Child3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
breadcrumbs tag
|
||||
===============
|
||||
|
||||
Render breadcrumbs, using the ``categories/breadcrumbs.html`` template, using the optional ``separator`` argument.
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% breadcrumbs "/Grandparent/Parent" %}
|
||||
|
||||
or:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% breadcrumbs category_obj %}
|
||||
|
||||
Returns:
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<a href="/categories/grandparent/">Grandparent</a> / Parent
|
||||
|
||||
You can alter the separator used in the template by adding a string argument to be the separator:
|
||||
|
||||
.. code-block:: django
|
||||
|
||||
{% breadcrumbs category_obj "::" %}
|
||||
|
||||
Returns:
|
||||
|
||||
.. code-block:: html
|
||||
|
||||
<a href="/categories/grandparent/">Grandparent</a> :: Parent
|
||||
|
|
@ -95,6 +95,8 @@ Registering one or more Many-to-Many Category fields to a Model
|
|||
}
|
||||
}
|
||||
|
||||
.. _registering_a_m2one_relationship:
|
||||
|
||||
Registering a many-to-one relationship
|
||||
======================================
|
||||
|
||||
|
|
|
|||
125
docs/adding_the_fields.html
Normal file
125
docs/adding_the_fields.html
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Adding the fields to the database — Django Categories v0.7beta1 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: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<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 v0.7beta1 documentation" href="index.html" />
|
||||
<link rel="next" title="Reference" href="reference/index.html" />
|
||||
<link rel="prev" title="Registering Models" href="registering_models.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Adding the fields to the database</h1></div>
|
||||
<ul id="headerButtons">
|
||||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="reference/index.html" title="Reference" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="registering_models.html" title="Registering Models" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<ul><li class="toctree-l1"><a href="index.html">Main Page</a></li></ul>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="">Adding the fields to the database</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#enter-south">Enter South</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#reconfiguring-fields">Reconfiguring Fields</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="_sources/adding_the_fields.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
|
||||
<form class="search" action="search.html" method="get">
|
||||
<div class="search-wrapper">
|
||||
<span class="search-left"></span>
|
||||
<input class="prettysearch" type="text" name="q" size="18" />
|
||||
<span class="search-right"> </span>
|
||||
</div>
|
||||
<input type="submit" value="Search" class="searchbutton" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="adding-the-fields-to-the-database">
|
||||
<span id="adding-the-fields"></span><h1>Adding the fields to the database<a class="headerlink" href="#adding-the-fields-to-the-database" title="Permalink to this headline">¶</a></h1>
|
||||
<p>While Django will create the appropriate columns and tables if you configure Django Categories first, many times that is not possible. You could also reset the table, but you would loose all data in it. There is another way.</p>
|
||||
<div class="section" id="enter-south">
|
||||
<h2>Enter South<a class="headerlink" href="#enter-south" title="Permalink to this headline">¶</a></h2>
|
||||
<p><a class="reference external" href="http://south.aeracode.org/">South</a> is a Django application for managing database schema changes. South’s default behavior is for managing permanent changes to a model’s structure. In the case of dynamically adding a field or fields to a model, this doesn’t work because you are not making the change permanent. And probably don’t want to.</p>
|
||||
<p>Django Categories has a management command to create any missing fields. It requires South because it uses the South’s API for making changes to databases. The management command is simple: <tt class="docutils literal"><span class="pre">python</span> <span class="pre">manage.py</span> <span class="pre">add_category_fields</span> <span class="pre">[app]</span></tt>. If you do not include an app name, it will attempt to do all applications configured.</p>
|
||||
<p>Running this command several times will not hurt any data or cause any errors.</p>
|
||||
</div>
|
||||
<div class="section" id="reconfiguring-fields">
|
||||
<h2>Reconfiguring Fields<a class="headerlink" href="#reconfiguring-fields" title="Permalink to this headline">¶</a></h2>
|
||||
<p>You can make changes to the field configurations as long as they do not change the underlying database structure. For example, adding a <tt class="docutils literal"><span class="pre">related_name</span></tt> (see <a class="reference internal" href="registering_models.html#registering-a-m2one-relationship"><em>Registering a many-to-one relationship</em></a>) because it only affects Django code. Changing the name of the field, however, is a different matter.</p>
|
||||
<p>Django Categories provides a complementary management command to drop a field from the database (the field must still be in the configuration to do so): <tt class="docutils literal"><span class="pre">python</span> <span class="pre">manage.py</span> <span class="pre">drop_category_field</span> <span class="pre">app_name</span> <span class="pre">model_name</span> <span class="pre">field_name</span></tt></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>
|
||||
© Copyright 2010, CoreyOordt.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.5.
|
||||
</p>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div id="breadcrumbs">
|
||||
Adding the fields to the database
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8" src="_static/toc.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — Django Categories v0.6 documentation</title>
|
||||
<title>Index — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -21,11 +21,11 @@
|
|||
<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 v0.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Index</h1></div>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Getting Started — Django Categories v0.6 documentation</title>
|
||||
<title>Getting Started — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -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 v0.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="index.html" />
|
||||
<link rel="next" title="Using categories in templates" href="usage.html" />
|
||||
<link rel="prev" title="Django Categories v|version| documentation!" href="index.html" />
|
||||
<link rel="prev" title="Django Categories v 0.7beta1" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Getting Started</h1></div>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="usage.html" title="Using categories in templates" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="index.html" title="Django Categories v|version| documentation!" accesskey="P">previous</a></div>
|
||||
<div class="headerButton"><a href="index.html" title="Django Categories v 0.7beta1" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -121,9 +121,27 @@ Model 2
|
|||
<p>You can’t do it as both at the same time, though.</p>
|
||||
<div class="section" id="connecting-your-model-with-django-categories">
|
||||
<h2>Connecting your model with Django-Categories<a class="headerlink" href="#connecting-your-model-with-django-categories" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Because there are a few additional methods and attributes that your model needs, you can’t simply create a <tt class="docutils literal"><span class="pre">ForeignKey</span></tt> to <tt class="docutils literal"><span class="pre">Category</span></tt>, even though that is eventually what happens.</p>
|
||||
<p>There are two ways to add Category fields to an application. If you are in control of the code (it’s your application) or you are willing to take control of the code (fork someone else’s app) you can make a <a class="reference internal" href="#hard-coded-connection"><em>Hard Coded Connection</em></a>.</p>
|
||||
<p>For 3rd-party apps or even your own apps that you don’t wish to add Django-Categories as a dependency, you can configure a <a class="reference internal" href="#lazy-connection"><em>Lazy Connection</em></a>.</p>
|
||||
<div class="section" id="hard-coded-connection">
|
||||
<span id="id1"></span><h3>Hard Coded Connection<a class="headerlink" href="#hard-coded-connection" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Hard coded connections are done in the exact same way you handle any other foreign key or many-to-many relations to a model.</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">django.db</span> <span class="kn">import</span> <span class="n">models</span>
|
||||
|
||||
<span class="k">class</span> <span class="nc">MyModel</span><span class="p">(</span><span class="n">models</span><span class="o">.</span><span class="n">Model</span><span class="p">):</span>
|
||||
<span class="n">name</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">CharField</span><span class="p">(</span><span class="n">max_length</span><span class="o">=</span><span class="mi">100</span><span class="p">)</span>
|
||||
<span class="n">category</span> <span class="o">=</span> <span class="n">models</span><span class="o">.</span><span class="n">ForeignKey</span><span class="p">(</span><span class="s">'categories.Category'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Don’t forget to add the field or fields to your <tt class="docutils literal"><span class="pre">ModelAdmin</span></tt> class as well.</p>
|
||||
</div>
|
||||
<div class="section" id="lazy-connection">
|
||||
<span id="id2"></span><h3>Lazy Connection<a class="headerlink" href="#lazy-connection" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Lazy connections are done through configuring Django Categories in the project’s <tt class="docutils literal"><span class="pre">settings.py</span></tt> file. When the project starts up, the configured fields are dynamically added to the configured models and admin.</p>
|
||||
<p>If you do this before you have created the database (before you ran <tt class="docutils literal"><span class="pre">manage.py</span> <span class="pre">syncdb</span></tt>), the fields will also be in the tables. If you do this after you have already created all the tables, you can run <tt class="docutils literal"><span class="pre">manage.py</span> <span class="pre">add_category_fields</span></tt> to create the fields (this requires Django South to be installed).</p>
|
||||
<p>You add a many-to-one or many-to-many relationship with Django Categories using the <tt class="docutils literal"><span class="pre">CATEGORIES_SETTINGS['FK_REGISTRY']</span></tt> and <tt class="docutils literal"><span class="pre">CATEGORIES_SETTINGS['M2M_REGISTRY']</span></tt> settings respectively. For more information see <a class="reference internal" href="registering_models.html#registering-models"><em>Registering Models</em></a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Django Categories v|version| documentation! — Django Categories v0.6 documentation</title>
|
||||
<title>Django Categories v 0.7beta1 — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -21,15 +21,15 @@
|
|||
<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 v0.6 documentation" href="#" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="#" />
|
||||
<link rel="next" title="Getting Started" href="getting_started.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Django Categories v|version| documentation!</h1></div>
|
||||
<div id="title"><h1>Django Categories v 0.7beta1</h1></div>
|
||||
<ul id="headerButtons">
|
||||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -82,8 +82,8 @@
|
|||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="django-categories-v-version-documentation">
|
||||
<h1>Django Categories v|version| documentation!<a class="headerlink" href="#django-categories-v-version-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="django-categories-v-version">
|
||||
<h1>Django Categories v 0.7beta1<a class="headerlink" href="#django-categories-v-version" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Contents:</p>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
|
|
@ -101,16 +101,16 @@
|
|||
<li class="toctree-l2"><a class="reference internal" href="registering_models.html#registering-a-many-to-many-relationship">Registering a many-to-many relationship</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#get-top-level-categories">get_top_level_categories</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#display-path-as-ul">display_path_as_ul</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#get-category-drilldown">get_category_drilldown</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#display-drilldown-as-ul">display_drilldown_as_ul</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#breadcrumbs-tag">breadcrumbs tag</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="adding_the_fields.html#enter-south">Enter South</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="adding_the_fields.html#reconfiguring-fields">Reconfiguring Fields</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reference/management_commands.html">Management Commands</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reference/models.html">Models</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reference/settings.html">Settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reference/templatetags.html">Template Tags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div id="breadcrumbs">
|
||||
Django Categories v|version| documentation!
|
||||
Django Categories v 0.7beta1
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8" src="_static/toc.js"></script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# Sphinx inventory version 2
|
||||
# Project: Django Categories
|
||||
# Version: 0.6
|
||||
# Version: 0.7beta1
|
||||
# The remainder of this file is compressed using zlib.
|
||||
xÚ•<EFBFBD>K Eç®â%:E£ÃîÀ<C3AE>‰±hj¹¥D h¢»—JS?gp.çæ=tÏ¥áx<C3A1>ó¼PõŠØžîO¦S°í¼Vk:õ|P ãˆVæ‹4Ñdħ-,LƒÊÁ{i„[J9ßMyÔ3gÙ+Ó!t
|
||||
é<l¸TaL¨<4C>Î÷|êÌœ%ï2£qÅ€Vµmºecdi±2>8×y”ª½…O+ÚÁ4^ö†~±!6[ú ÿÐ^’_œy
|
||||
xÚ¥SËNÃ0¼û+,Ñ«Apì
q‰Jˆ~@´<>7áGä¸áëYÇvšÐ)p³gwF;ûÐ` F<C2A0>Æ‹Òj
Fö¼÷r«à€Š‹{î°B‡¦Ä;=¥9õ¶ñZÝløn
|
||||
ñ§b=‚+›¥XÄ"‹ïcÂ1HY”à±¶n(ªÕÊ
‘5DÒÌaÝö]kêB[‰êLøg<ªÍp‘xï'ˆïFˆQ¤5?—šÝ r y¥ô£Bþ ¦àk Ú<C2A0>ÁÒ·Ö,¹5zjé=8<>2òC̯ô§Nç?›ºSô‘~µ{9žM&\L¼}z°ÍkM¾¢¡<1C><>:"×Ù
|
||||
<1òææž %s„.-žæ…~°‡
|
||||
B°oÚnýTAŒ*b¡2Ÿ1pÚ®Ax+(<28>ÏÓX«;ë|^Ù×okT3® ì¼xgáióÖ?Ž'„'ÄÛñ'ÁÃzdÒÙîßD~¹8’¦SØVG{},›9úXÁú]¯
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Reference — Django Categories v0.6 documentation</title>
|
||||
<title>Reference — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -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 v0.6 documentation" href="../index.html" />
|
||||
<link rel="next" title="Settings" href="settings.html" />
|
||||
<link rel="prev" title="Template Tags" href="../templatetags.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="../index.html" />
|
||||
<link rel="next" title="Management Commands" href="management_commands.html" />
|
||||
<link rel="prev" title="Adding the fields to the database" href="../adding_the_fields.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Reference</h1></div>
|
||||
|
|
@ -35,8 +35,8 @@
|
|||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="../genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="settings.html" title="Settings" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="../templatetags.html" title="Template Tags" accesskey="P">previous</a></div>
|
||||
<div class="headerButton"><a href="management_commands.html" title="Management Commands" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="../adding_the_fields.html" title="Adding the fields to the database" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -48,9 +48,12 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="">Reference</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="management_commands.html">Management Commands</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="models.html">Models</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">Settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -91,6 +94,16 @@
|
|||
<h1>Reference<a class="headerlink" href="#reference" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="management_commands.html">Management Commands</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="management_commands.html#import-categories">import_categories</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="management_commands.html#add-category-fields">add_category_fields</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="management_commands.html#drop-category-fields">drop_category_fields</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="models.html">Models</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="models.html#category">Category</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="settings.html">Settings</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html#allow-slug-change">ALLOW_SLUG_CHANGE</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html#cache-view-length">CACHE_VIEW_LENGTH</a></li>
|
||||
|
|
@ -101,6 +114,14 @@
|
|||
<li class="toctree-l2"><a class="reference internal" href="settings.html#thumbnail-storage">THUMBNAIL_STORAGE</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#get-top-level-categories">get_top_level_categories</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#display-path-as-ul">display_path_as_ul</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#get-category-drilldown">get_category_drilldown</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#display-drilldown-as-ul">display_drilldown_as_ul</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html#breadcrumbs-tag">breadcrumbs tag</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
134
docs/reference/management_commands.html
Normal file
134
docs/reference/management_commands.html
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Management Commands — Django Categories v0.7beta1 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: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<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 v0.7beta1 documentation" href="../index.html" />
|
||||
<link rel="up" title="Reference" href="index.html" />
|
||||
<link rel="next" title="Models" href="models.html" />
|
||||
<link rel="prev" title="Reference" href="index.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Management Commands</h1></div>
|
||||
<ul id="headerButtons">
|
||||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="../genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="models.html" title="Models" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="index.html" title="Reference" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<ul><li class="toctree-l1"><a href="../index.html">Main Page</a></li></ul>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Reference</a><ul class="current">
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="">Management Commands</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="models.html">Models</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">Settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../_sources/reference/management_commands.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<div class="search-wrapper">
|
||||
<span class="search-left"></span>
|
||||
<input class="prettysearch" type="text" name="q" size="18" />
|
||||
<span class="search-right"> </span>
|
||||
</div>
|
||||
<input type="submit" value="Search" class="searchbutton" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="management-commands">
|
||||
<span id="id1"></span><h1>Management Commands<a class="headerlink" href="#management-commands" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="import-categories">
|
||||
<span id="id2"></span><h2>import_categories<a class="headerlink" href="#import-categories" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>Usage:</strong> <tt class="docutils literal"><span class="pre">./manage.py</span> <span class="pre">import_categories</span> <span class="pre">/path/to/file.txt</span> <span class="pre">[/path/to/file2.txt]</span></tt></p>
|
||||
<p>Imports category tree(s) from a file. Sub categories must be indented by the same multiple of spaces or tabs. The first line in the file cannot start with a space or tab and you can’t mix spaces and tabs.</p>
|
||||
</div>
|
||||
<div class="section" id="add-category-fields">
|
||||
<span id="id3"></span><h2>add_category_fields<a class="headerlink" href="#add-category-fields" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>Usage:</strong> <tt class="docutils literal"><span class="pre">./manage.py</span> <span class="pre">add_category_fields</span> <span class="pre">[app1</span> <span class="pre">app2</span> <span class="pre">...]</span></tt></p>
|
||||
<p>Add missing registered category fields to the database table of a specified application or all registered applications.</p>
|
||||
<p>Requires Django South.</p>
|
||||
</div>
|
||||
<div class="section" id="drop-category-fields">
|
||||
<span id="id4"></span><h2>drop_category_fields<a class="headerlink" href="#drop-category-fields" title="Permalink to this headline">¶</a></h2>
|
||||
<p><strong>Usage:</strong> <tt class="docutils literal"><span class="pre">./manage.py</span> <span class="pre">drop_category_field</span> <span class="pre">app_name</span> <span class="pre">model_name</span> <span class="pre">field_name</span></tt></p>
|
||||
<p>Drop the <tt class="docutils literal"><span class="pre">field_name</span></tt> field from the <tt class="docutils literal"><span class="pre">app_name_model_name</span></tt> table, if the field is currently registered in <tt class="docutils literal"><span class="pre">CATEGORIES_SETTINGS</span></tt>.</p>
|
||||
<p>Requires Django South.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>
|
||||
© Copyright 2010, CoreyOordt.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.5.
|
||||
</p>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div id="breadcrumbs">
|
||||
<a href="index.html" accesskey="U">Reference</a><img src="../_static/triangle_closed.png" height="9" width="9" alt=">">
|
||||
Management Commands
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8" src="../_static/toc.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
146
docs/reference/models.html
Normal file
146
docs/reference/models.html
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Models — Django Categories v0.7beta1 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: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<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 v0.7beta1 documentation" href="../index.html" />
|
||||
<link rel="up" title="Reference" href="index.html" />
|
||||
<link rel="next" title="Settings" href="settings.html" />
|
||||
<link rel="prev" title="Management Commands" href="management_commands.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Models</h1></div>
|
||||
<ul id="headerButtons">
|
||||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="../genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="settings.html" title="Settings" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="management_commands.html" title="Management Commands" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<ul><li class="toctree-l1"><a href="../index.html">Main Page</a></li></ul>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="management_commands.html">Management Commands</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="">Models</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">Settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../_sources/reference/models.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<div class="search-wrapper">
|
||||
<span class="search-left"></span>
|
||||
<input class="prettysearch" type="text" name="q" size="18" />
|
||||
<span class="search-right"> </span>
|
||||
</div>
|
||||
<input type="submit" value="Search" class="searchbutton" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="models">
|
||||
<h1>Models<a class="headerlink" href="#models" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="category">
|
||||
<h2>Category<a class="headerlink" href="#category" title="Permalink to this headline">¶</a></h2>
|
||||
<dl class="docutils">
|
||||
<dt><strong>parent</strong></dt>
|
||||
<dd>The category’s parent category. Leave this blank for an Category Tree.</dd>
|
||||
<dt><strong>name</strong></dt>
|
||||
<dd>The name of the category.</dd>
|
||||
<dt><strong>thumbnail</strong></dt>
|
||||
<dd>An optional thumbnail, that is uploaded to <tt class="docutils literal"><span class="pre">CATEGORY_SETTINGS['THUMBNAIL_UPLOAD_PATH']</span></tt> via <tt class="docutils literal"><span class="pre">CATEGORY_SETTINGS['THUMBNAIL_STORAGE']</span></tt>.</dd>
|
||||
<dt><strong>thumbnail_width</strong></dt>
|
||||
<dd>The thumbnail width.</dd>
|
||||
<dt><strong>thumbnail_height</strong></dt>
|
||||
<dd>The thumbnail height.</dd>
|
||||
<dt><strong>order</strong></dt>
|
||||
<dd>The order of this category in the listing</dd>
|
||||
<dt><strong>slug</strong></dt>
|
||||
<dd>A slug created from the name field</dd>
|
||||
<dt><strong>alternate_title</strong></dt>
|
||||
<dd>An alternative title to use on pages with this category.</dd>
|
||||
<dt><strong>alternate_url</strong></dt>
|
||||
<dd>An alternative URL to use instead of the one derived from the category hierarchy.</dd>
|
||||
<dt><strong>description</strong></dt>
|
||||
<dd>An optional longer description of the category.</dd>
|
||||
<dt><strong>meta_keywords</strong></dt>
|
||||
<dd>Comma-separated keywords for search engines.</dd>
|
||||
<dt><strong>meta_extra</strong></dt>
|
||||
<dd>(Advanced) Any additional HTML to be placed verbatim in the <tt class="docutils literal"><span class="pre"><head></span></tt></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>
|
||||
© Copyright 2010, CoreyOordt.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.5.
|
||||
</p>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div id="breadcrumbs">
|
||||
<a href="index.html" accesskey="U">Reference</a><img src="../_static/triangle_closed.png" height="9" width="9" alt=">">
|
||||
Models
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8" src="../_static/toc.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Settings — Django Categories v0.6 documentation</title>
|
||||
<title>Settings — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -21,13 +21,14 @@
|
|||
<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 v0.6 documentation" href="../index.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="../index.html" />
|
||||
<link rel="up" title="Reference" href="index.html" />
|
||||
<link rel="prev" title="Reference" href="index.html" />
|
||||
<link rel="next" title="Template Tags" href="templatetags.html" />
|
||||
<link rel="prev" title="Models" href="models.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Settings</h1></div>
|
||||
|
|
@ -35,7 +36,8 @@
|
|||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="../genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="index.html" title="Reference" accesskey="P">previous</a></div>
|
||||
<div class="headerButton"><a href="templatetags.html" title="Template Tags" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="models.html" title="Models" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -47,9 +49,12 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="management_commands.html">Management Commands</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="models.html">Models</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="">Settings</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
219
docs/reference/templatetags.html
Normal file
219
docs/reference/templatetags.html
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Template Tags — Django Categories v0.7beta1 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: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
};
|
||||
</script>
|
||||
<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 v0.7beta1 documentation" href="../index.html" />
|
||||
<link rel="up" title="Reference" href="index.html" />
|
||||
<link rel="prev" title="Settings" href="settings.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Template Tags</h1></div>
|
||||
<ul id="headerButtons">
|
||||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="../genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="settings.html" title="Settings" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="sphinxsidebar">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<ul><li class="toctree-l1"><a href="../index.html">Main Page</a></li></ul>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Reference</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="management_commands.html">Management Commands</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="models.html">Models</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="settings.html">Settings</a></li>
|
||||
<li class="toctree-l2 current"><a class="current reference internal" href="">Template Tags</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>This Page</h3>
|
||||
<ul class="this-page-menu">
|
||||
<li><a href="../_sources/reference/templatetags.txt"
|
||||
rel="nofollow">Show Source</a></li>
|
||||
</ul>
|
||||
<div id="searchbox" style="display: none">
|
||||
|
||||
<form class="search" action="../search.html" method="get">
|
||||
<div class="search-wrapper">
|
||||
<span class="search-left"></span>
|
||||
<input class="prettysearch" type="text" name="q" size="18" />
|
||||
<span class="search-right"> </span>
|
||||
</div>
|
||||
<input type="submit" value="Search" class="searchbutton" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
<p class="searchtip" style="font-size: 90%">
|
||||
Enter search terms or a module, class or function name.
|
||||
</p>
|
||||
</div>
|
||||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
<div class="body">
|
||||
|
||||
<div class="section" id="template-tags">
|
||||
<h1>Template Tags<a class="headerlink" href="#template-tags" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="section" id="get-top-level-categories">
|
||||
<h2>get_top_level_categories<a class="headerlink" href="#get-top-level-categories" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Retrieves an alphabetical list of all the categories that have no parents.</p>
|
||||
<p>Syntax:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">get_top_level_categories</span> <span class="k">as</span> <span class="nv">categories</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Returns an list of categories <tt class="docutils literal"><span class="pre">[<category>,</span> <span class="pre"><category>,</span> <span class="pre"><category,</span> <span class="pre">...]</span></tt></p>
|
||||
</div>
|
||||
<div class="section" id="display-path-as-ul">
|
||||
<h2>display_path_as_ul<a class="headerlink" href="#display-path-as-ul" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Render the category with ancestors, but no children using the <tt class="docutils literal"><span class="pre">categories/ul_tree.html</span></tt> template.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">display_path_as_ul</span> <span class="s2">"/Grandparent/Parent"</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>or</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">display_path_as_ul</span> <span class="nv">category_obj</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Returns:</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><ul></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/"</span><span class="nt">></span>Top<span class="nt"></a></span>
|
||||
<span class="nt"><ul></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/"</span><span class="nt">></span>Grandparent<span class="nt"></a></li></span>
|
||||
<span class="nt"></ul></span>
|
||||
<span class="nt"></li></span>
|
||||
<span class="nt"></ul></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="get-category-drilldown">
|
||||
<h2>get_category_drilldown<a class="headerlink" href="#get-category-drilldown" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Retrieves the specified category, its ancestors and its immediate children
|
||||
as an iterable.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">get_category_drilldown</span> <span class="s2">"/Grandparent/Parent"</span> <span class="k">as</span> <span class="nv">family</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>or</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">get_category_drilldown</span> <span class="nv">category_obj</span> <span class="k">as</span> <span class="nv">family</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Sets <tt class="docutils literal"><span class="pre">family</span></tt> to:</p>
|
||||
<div class="highlight-python"><pre>[Grandparent, Parent, Child 1, Child 2, Child n]</pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="display-drilldown-as-ul">
|
||||
<h2>display_drilldown_as_ul<a class="headerlink" href="#display-drilldown-as-ul" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Render the category with ancestors and children using the
|
||||
<tt class="docutils literal"><span class="pre">categories/ul_tree.html</span></tt> template.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">display_drilldown_as_ul</span> <span class="s2">"/Grandparent/Parent"</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>or:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">display_drilldown_as_ul</span> <span class="nv">category_obj</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Returns:</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><ul></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/"</span><span class="nt">></span>Top<span class="nt"></a></span>
|
||||
<span class="nt"><ul></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/"</span><span class="nt">></span>Grandparent<span class="nt"></a></span>
|
||||
<span class="nt"><ul></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/parent/"</span><span class="nt">></span>Parent<span class="nt"></a></span>
|
||||
<span class="nt"><ul></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/parent/child1"</span><span class="nt">></span>Child1<span class="nt"></a></li></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/parent/child2"</span><span class="nt">></span>Child2<span class="nt"></a></li></span>
|
||||
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/parent/child3"</span><span class="nt">></span>Child3<span class="nt"></a></li></span>
|
||||
<span class="nt"></ul></span>
|
||||
<span class="nt"></li></span>
|
||||
<span class="nt"></ul></span>
|
||||
<span class="nt"></li></span>
|
||||
<span class="nt"></ul></span>
|
||||
<span class="nt"></li></span>
|
||||
<span class="nt"></ul></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="breadcrumbs-tag">
|
||||
<h2>breadcrumbs tag<a class="headerlink" href="#breadcrumbs-tag" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Render breadcrumbs, using the <tt class="docutils literal"><span class="pre">categories/breadcrumbs.html</span></tt> template, using the optional <tt class="docutils literal"><span class="pre">separator</span></tt> argument.</p>
|
||||
<p>Example:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">breadcrumbs</span> <span class="s2">"/Grandparent/Parent"</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>or:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">breadcrumbs</span> <span class="nv">category_obj</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Returns:</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/"</span><span class="nt">></span>Grandparent<span class="nt"></a></span> / Parent
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>You can alter the separator used in the template by adding a string argument to be the separator:</p>
|
||||
<div class="highlight-django"><div class="highlight"><pre><span class="cp">{%</span> <span class="k">breadcrumbs</span> <span class="nv">category_obj</span> <span class="s2">"::"</span> <span class="cp">%}</span><span class="x"></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Returns:</p>
|
||||
<div class="highlight-html"><div class="highlight"><pre><span class="nt"><a</span> <span class="na">href=</span><span class="s">"/categories/grandparent/"</span><span class="nt">></span>Grandparent<span class="nt"></a></span> :: Parent
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>
|
||||
© Copyright 2010, CoreyOordt.
|
||||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.5.
|
||||
</p>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
</div>
|
||||
<div id="breadcrumbs">
|
||||
<a href="index.html" accesskey="U">Reference</a><img src="../_static/triangle_closed.png" height="9" width="9" alt=">">
|
||||
Template Tags
|
||||
</ul>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8" src="../_static/toc.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Registering Models — Django Categories v0.6 documentation</title>
|
||||
<title>Registering Models — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -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 v0.6 documentation" href="index.html" />
|
||||
<link rel="next" title="Template Tags" href="templatetags.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="index.html" />
|
||||
<link rel="next" title="Adding the fields to the database" href="adding_the_fields.html" />
|
||||
<link rel="prev" title="Using categories in templates" href="usage.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Registering Models</h1></div>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
|
||||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="templatetags.html" title="Template Tags" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="adding_the_fields.html" title="Adding the fields to the database" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="usage.html" title="Using categories in templates" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<li class="toctree-l2"><a class="reference internal" href="#registering-a-many-to-many-relationship">Registering a many-to-many relationship</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="section" id="registering-a-many-to-one-relationship">
|
||||
<h2>Registering a many-to-one relationship<a class="headerlink" href="#registering-a-many-to-one-relationship" title="Permalink to this headline">¶</a></h2>
|
||||
<span id="registering-a-m2one-relationship"></span><h2>Registering a many-to-one relationship<a class="headerlink" href="#registering-a-many-to-one-relationship" title="Permalink to this headline">¶</a></h2>
|
||||
<p>To create a many-to-one relationship (foreign key) between a model and Django Categories, you register your model with the <tt class="docutils literal"><span class="pre">register_fk</span></tt> function.</p>
|
||||
<dl class="function">
|
||||
<dt id="register_fk">
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — Django Categories v0.6 documentation</title>
|
||||
<title>Search — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<script type="text/javascript" src="_static/underscore.js"></script>
|
||||
<script type="text/javascript" src="_static/doctools.js"></script>
|
||||
<script type="text/javascript" src="_static/searchtools.js"></script>
|
||||
<link rel="top" title="Django Categories v0.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Search</h1></div>
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Search.setIndex({objects:{"":{register_m2m:[2,0,1],register_fk:[2,0,1]}},terms:{represent:5,all:[1,2,3],code:2,sci:5,register_fk:2,over:[5,2],becaus:6,syntax:[1,3],overrid:1,comma:5,follow:[5,2],secondary_categori:2,children:3,paramet:2,hierarch:[],categori:[0,1,2,3,5,6],onli:1,other_categori:2,should:5,add:[5,2,6],valid:5,dict:[5,1],templat:[5,0,3],under:5,therefor:2,modul:0,tree_info:5,descend:5,child1:3,child2:3,child3:3,"return":3,string:[1,2,3],amodel:2,get:[0,6],fals:[5,1],extra_arg:2,simplest:2,soon:1,mechan:[],mymodel_sec_set:[],"import":[5,2],field_nam:2,bmodel:2,model_nam:1,mymodel_sec_cat:2,requir:2,like:[1,2],eventu:6,name:[5,2],level:5,other_cat:2,list:[5,3],upload:1,iter:[5,3],amodel_cat:2,separ:[5,3],item:5,relation_model:[4,1],necessari:2,contain:5,unicod:5,attribut:6,where:1,page:0,view:1,set:[0,1,2,3,4,6],some:2,consequ:1,see:[1,6],sampl:5,connect:[0,6],pass:2,happen:6,even:6,index:0,what:6,appear:5,avoid:2,though:6,thumbnail:1,content:[5,0],version:0,cache_view_length:[4,1],between:2,"new":[5,2],method:6,refer:[0,4],grandpar:3,parent:[5,3],whose:2,gener:5,each:[1,2],given:5,how:1,fk_registri:[4,1,2,6],dictionari:[1,2],"super":[],slug:1,valu:[1,2],addit:6,both:6,about:5,categories_set:[1,2,6],last:5,wai:[2,6],current:5,display_drilldown_as_ul:[0,3],greater:5,foreign:2,filter:[5,0],amount:1,related_nam:2,new_level:5,mani:[0,2,6],chang:1,mean:1,other:2,first:5,thumbnail_storag:[4,1],simpli:6,render:3,extra:[5,2],appli:[],app:2,deprec:1,href:3,subcategori:6,famili:3,display_path_as_ul:[0,3],respect:6,storag:[1,6],your:[0,2,6],kei:[5,1,2],category_obj:3,would:5,start:[5,0,6],associ:1,top:[3,6],regist:[0,1,2,6],two:[5,2,6],empti:5,next:5,avail:5,few:6,includ:1,immedi:[5,3],store:1,more:[2,6],"function":2,field:2,option:[5,2,3],relationship:[0,2,6],tupl:[5,1,2],relat:[1,2],search:0,specifi:[5,1,2,3],argument:[5,2,3],part:1,modifi:2,indic:0,child:3,closed_level:5,"true":[5,1],than:[5,2],must:2,save:1,retriev:3,provid:5,tree:[5,6],modelnam:1,structur:5,alter:3,below:5,can:[5,1,2,3,6],cach:1,foreignkei:[2,6],otherwis:5,root:5,html:3,app_nam:1,control:2,alphabet:3,featur:5,have:[1,2,3],creat:[2,6],applic:2,get_top_level_categori:[0,3],primary_categori:2,doesn:2,manytomanyfield:2,tag:[5,0,3],right:5,want:[1,2],tabl:0,need:6,default_file_storag:1,thumbnail_upload_path:[4,1],sever:6,around:5,result:1,end:5,welcom:[],equival:2,titl:[],ancestor:[5,3],more_categori:2,when:2,detail:5,same:[5,6],allow_slug_chang:[4,1],more_cat:2,book:5,futur:5,which:[5,1,2],m2m_registri:[4,1,2,6],you:[1,2,3,6],document:0,conflict:2,nice:2,node:5,thi:[5,1,2],clash:2,"default":[1,2],after:5,category_tag:5,breadcrumb:[0,3],extra_param:2,user:1,extern:1,engin:1,data:[],"class":2,ul_tre:3,don:1,dystopian:5,get_category_drilldown:[0,3],url:1,seriou:1,mymodel:2,descript:1,django:[0,2,6],inform:[5,2,6],exampl:[5,2,3],allow:[1,2],time:[1,6],link:2,model:[0,1,2,6],register_m2m:2,order:5},objtypes:{"0":"py:function"},titles:["Django Categories v|version| documentation!","Settings","Registering Models","Template Tags","Reference","Using categories in templates","Getting Started"],objnames:{"0":"Python function"},filenames:["index","reference/settings","registering_models","templatetags","reference/index","usage","getting_started"]})
|
||||
Search.setIndex({objects:{"":{register_fk:[3,0,1],register_m2m:[3,0,1]}},terms:{represent:4,all:[2,3,5,7,8,9],code:[7,3,9],sci:4,forget:9,follow:[4,3],children:5,hard_coded_connect:[],hierarch:[],whose:3,depend:9,under:4,leav:0,child1:5,child2:5,child3:5,string:[2,3,5],bmodel:3,fals:[4,2],mechan:[],affect:7,model_nam:[7,8,2],exact:9,level:4,list:[0,4,5],upload:[0,2],iter:[4,5],item:4,categories_set:[8,2,3,9],consequ:2,pass:3,alternate_url:0,even:9,index:1,what:[],appear:4,current:[4,8],version:[],"new":[4,3],method:[],deriv:0,gener:4,fk_registri:[6,2,3,9],path:8,modifi:3,valu:[2,3],search:[0,1],thumbnail_upload_path:[0,6,2],amount:2,related_nam:[7,3],chang:[7,2],control:[3,9],via:0,extra:[4,3],appli:[],app:[7,3,9],deprec:2,api:7,subcategori:9,famili:5,instal:9,txt:8,from:[0,7,9,8],would:[7,4],regist:[1,2,3,7,8,9],two:[4,3,9],next:4,few:[],more:[3,9],relat:[2,3,9],hurt:7,indic:1,cach:2,must:[7,8,3],retriev:5,work:7,can:[2,3,5,4,7,8,9],root:4,overrid:2,want:[7,2,3],get_top_level_categori:[6,5],templat:[4,1,5,6],manytomanyfield:3,tag:[4,1,5,6],tab:8,multipl:8,anoth:7,how:2,more_cat:3,meta_keyword:0,default_file_storag:2,instead:0,ancestor:[4,5],simpl:7,after:[4,9],befor:9,extra_param:3,end:4,associ:2,ul_tre:5,attempt:7,seriou:2,django:[7,1,3,9,8],caus:7,inform:[4,3,9],allow:[2,3],enter:[7,1],order:[0,4],over:[4,3],becaus:7,comma:[0,4],hierarchi:0,secondary_categori:3,dynam:[7,9],paramet:3,other_categori:3,therefor:3,alter:5,"return":5,greater:4,thei:7,handl:9,extra_arg:3,mymodel_sec_set:[],eventu:[],name:[0,7,3,9,4],app_name_model_nam:8,drop:[7,8],separ:[0,4,5],each:[2,3],unicod:4,mean:2,hard:9,"7beta1":1,connect:[1,9],happen:[],"3rd":9,space:8,categori:[0,1,2,3,4,5,6,7,8,9],import_categori:[6,8],advanc:0,given:4,allow_slug_chang:[6,2],dictionari:[2,3],drop_category_field:[7,6,8],reconfigur:[7,1],indent:8,meta_extra:0,could:7,filter:[4,1],place:0,perman:7,charfield:9,south:[7,1,9,8],first:[7,4,8],render:5,mymodel_sec_cat:3,alreadi:9,done:9,blank:0,miss:[7,8],differ:7,lazy_connect:[],start:[4,1,9,8],data:7,top:[5,9],max_length:9,store:2,schema:7,option:[0,4,3,5],relationship:[7,1,3,9],specifi:[4,8,2,3,5],part:2,than:[4,3],keyword:0,provid:[7,4],tree:[0,4,9,8],structur:[7,4],project:9,matter:7,fork:9,ran:9,argument:[4,3,5],have:[2,3,5,9],tabl:[7,1,9,8],need:[],engin:[0,2],equival:3,register_fk:3,also:[7,9],take:9,which:[4,2,3],parti:9,clash:3,though:9,relation_model:[6,2],"class":[3,9],sub:8,don:[7,2,9],url:[0,2],mymodel:[3,9],register_m2m:3,syntax:[2,5],onli:[7,2],configur:[7,9],should:4,dict:[4,2],tree_info:4,get:[1,9],simplest:3,soon:2,cannot:8,requir:[7,8,3,9],amodel_cat:3,contain:4,through:9,where:2,valid:4,view:2,set:[1,2,3,5,6,9],thumbnail_width:0,see:[7,2,9],result:2,still:7,kei:[4,2,3,9],databas:[7,1,9,8],between:3,"import":[4,8,3,9],thumbnail:[0,2],modeladmin:9,attribut:[],altern:0,grandpar:5,parent:[0,4,5],lazi:9,complementari:7,addit:0,both:9,last:4,admin:9,howev:7,display_drilldown_as_ul:[6,5],foreign:[3,9],new_level:4,mani:[7,1,3,9],display_path_as_ul:[6,5],thumbnail_storag:[0,6,2],simpli:[],height:0,respect:9,empti:4,immedi:[4,5],ani:[0,7,9],child:5,closed_level:4,"case":7,modelnam:2,"while":7,behavior:7,error:7,loos:7,sever:[7,9],welcom:[],alphabet:5,make:[7,9],more_categori:3,same:[4,8,9],python:7,html:[0,5],descend:4,m2m_registri:[6,2,3,9],document:[],conflict:3,someon:9,user:2,extern:2,appropri:7,dystopian:4,well:9,exampl:[7,4,3,5],command:[7,1,8,6],thi:[0,2,3,4,7,9],model:[0,1,2,3,6,7,9],alternate_titl:0,mix:8,add:[4,8,3,9],other:[3,9],els:9,save:2,modul:1,applic:[7,8,3,9],around:4,amodel:3,field_nam:[7,8,3],thumbnail_height:0,like:[2,3],other_cat:3,href:5,necessari:3,page:[0,1],underli:7,right:4,some:3,sampl:4,syncdb:9,category_set:0,avoid:3,add_category_field:[7,6,9,8],cache_view_length:[6,2],content:[4,1],refer:[1,6],run:[7,9],usag:8,"super":[],slug:[0,2],about:4,column:7,manag:[7,1,9,8,6],file2:8,own:9,storag:[2,9],your:[1,3,9],category_obj:5,wai:[7,3,9],"long":7,avail:4,width:0,includ:[7,2],"function":3,head:0,verbatim:0,tupl:[4,2,3],category_tag:4,link:3,line:8,"true":[4,2],reset:7,possibl:7,"default":[7,2,3],wish:9,app2:8,app1:8,below:4,foreignkei:[3,9],otherwis:4,app_nam:[7,8,2],featur:4,creat:[0,7,3,9],primary_categori:3,doesn:[7,3],file:[8,9],probabl:7,titl:0,when:[3,9],detail:4,field:[0,1,3,7,8,9],book:4,futur:4,you:[2,3,5,7,8,9],nice:3,node:4,breadcrumb:[6,5],longer:0,get_category_drilldown:[6,5],descript:[0,2],time:[7,2,9]},objtypes:{"0":"py:function"},titles:["Models","Django Categories v 0.7beta1","Settings","Registering Models","Using categories in templates","Template Tags","Reference","Adding the fields to the database","Management Commands","Getting Started"],objnames:{"0":"Python function"},filenames:["reference/models","index","reference/settings","registering_models","usage","reference/templatetags","reference/index","adding_the_fields","reference/management_commands","getting_started"]})
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Template Tags — Django Categories v0.6 documentation</title>
|
||||
<title>Template Tags — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -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 v0.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="index.html" />
|
||||
<link rel="next" title="Reference" href="reference/index.html" />
|
||||
<link rel="prev" title="Registering Models" href="registering_models.html" />
|
||||
<link rel="prev" title="Adding the fields to the database" href="adding_the_fields.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Template Tags</h1></div>
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<li id="page_buttons">
|
||||
<div class="headerButton"><a href="genindex.html" title="General Index" accesskey="I">index</a></div>
|
||||
<div class="headerButton"><a href="reference/index.html" title="Reference" accesskey="N">next</a></div>
|
||||
<div class="headerButton"><a href="registering_models.html" title="Registering Models" accesskey="P">previous</a></div>
|
||||
<div class="headerButton"><a href="adding_the_fields.html" title="Adding the fields to the database" accesskey="P">previous</a></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -48,6 +48,7 @@
|
|||
<li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="usage.html">Using categories in templates</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="">Template Tags</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#get-top-level-categories">get_top_level_categories</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#display-path-as-ul">display_path_as_ul</a></li>
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Using categories in templates — Django Categories v0.6 documentation</title>
|
||||
<title>Using categories in templates — Django Categories v0.7beta1 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: '0.6',
|
||||
VERSION: '0.7beta1',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
|
@ -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 v0.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Django Categories v0.7beta1 documentation" href="index.html" />
|
||||
<link rel="next" title="Registering Models" href="registering_models.html" />
|
||||
<link rel="prev" title="Getting Started" href="getting_started.html" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="docstitle">
|
||||
<p>Django Categories v0.6 documentation</p>
|
||||
<p>Django Categories v0.7beta1 documentation</p>
|
||||
</div>
|
||||
<div id="header">
|
||||
<div id="title"><h1>Using categories in templates</h1></div>
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="registering_models.html">Registering Models</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="templatetags.html">Template Tags</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="adding_the_fields.html">Adding the fields to the database</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li>
|
||||
</ul>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue