Metadata-Version: 2.0
Name: django-kb
Version: 0.2.0
Summary: Simple knowledge base made with django
Home-page: https://github.com/eliostvs/django-kb
Author: Elio Esteves Duarte
Author-email: elio.esteves.duarte@gmail.com
License: BSD
Keywords: django,knowledge base
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Requires-Dist: Django (>=1.6,<1.7)
Requires-Dist: South (>=0.8.4,<1.0)
Requires-Dist: django-braces (>=1.4.0)
Requires-Dist: django-choices (>=1.3.0)
Requires-Dist: django-haystack (>=2.2.0)
Requires-Dist: django-model-utils (>=2.2.0)
Requires-Dist: django-taggit (>=0.12.1)
Requires-Dist: django-markupfield (==1.2.1)
Requires-Dist: pytz (>=2014.4)

=============================
Django KB
=============================

.. image:: https://pypip.in/version/django-kb/badge.svg
    :target: https://pypi.python.org/pypi/django-kb/
    :alt: Latest Version

.. image:: https://pypip.in/py_versions/django-kb/badge.svg
    :target: https://pypi.python.org/pypi/django-kb/
    :alt: Supported Python versions

.. image:: https://pypip.in/format/django-kb/badge.svg
    :target: https://pypi.python.org/pypi/django-kb/
    :alt: Download format

.. image:: https://travis-ci.org/eliostvs/django-kb.png?branch=master
    :target: https://travis-ci.org/eliostvs/django-kb

.. image:: https://coveralls.io/repos/eliostvs/django-kb/badge.png?branch=master
    :target: https://coveralls.io/r/eliostvs/django-kb?branch=master

Simple knowledge base made with django

Installation
-------------

#. Install or add ``django-kb`` to your Python path, i.e.:

.. code:: sh

    $ pip install django-kb

#. Add ``kb`` to your ``INSTALLED_APPS`` setting.

#. Add kb url include to your project's ``urls.py`` file with namespaece ``kb``::

    (r'^', include('kb.urls', namespace='kb')),

#. Add ``kb.middleware.KnowledgeMiddleware`` to your ``MIDDLEWARE_CLASSES`` setting, i.e.::

    MIDDLEWARE_CLASSES = (
        ...
        "kb.middleware.KnowledgeMiddleware",
    )

Usage
-----

Template Tags
~~~~~~~~~~~~~

Loading the tags, i.e.::

    {% load kbtags %}

{% top_new_articles %}
++++++++++++++++++++++

Return the new published articles.

{% top_viewed_articles %}
+++++++++++++++++++++++++

Return the most viewed articles.

{% top_rated_articles %}
++++++++++++++++++++++++

Return the most rated articles.

All this tags accept two optional parameters, ``num`` and ``category``.
``num`` is the number of the articles that will return, by default to 5.
``category`` can be a ``model`` or ``slug`` that will be used to filter the articles.

{% feedback %}
++++++++++++++

This is an inclusion tag which renders links to upvote or downvote the article.

To support AJAX you need to load jQuery and the ``feedback.js`` in your template, i.e.::

    {% load staticfiles %}
    <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
    <script type="text/javascript" src="{% static "kb/js/feedback.js" %}"></script>


Example
-------

Example of the app django-kb running on Openshift `here <https://github.com/eliostvs/django-kb-example>`_.


.. :changelog:

History
-------

0.2.0 (2014-11-05)
++++++++++++++++++
* Add pagination in TagListView and CategoryDetailView.
* Improve admin options.


0.1.0 (2014-08-05)
++++++++++++++++++

* First release on PyPI.


