Simple knowledge base made with django
Project description
=============================
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="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="{% static "kb/js/feedback.js" %}"></script>
.. :changelog:
History
-------
0.1.0 (2014-08-05)
++++++++++++++++++
* First release on PyPI.
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="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="{% static "kb/js/feedback.js" %}"></script>
.. :changelog:
History
-------
0.1.0 (2014-08-05)
++++++++++++++++++
* First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-kb-0.1.0.tar.gz
(14.8 kB
view hashes)
Built Distribution
Close
Hashes for django_kb-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a04de2e9856fd7f316465317c16f617b9bd657f733df217bffb5438570f53589 |
|
MD5 | c7caa1094fc1042323885b95134d97ad |
|
BLAKE2b-256 | 3b6eb527dc82bda975dd21e0c31634d46e655489dfcd26caf192d433bb03cccd |