Welcome to Django-Qanda’s documentation!¶

Demo screenshot of provided templates

Qanda is a simple FAQ app for Django projects.

Here are the main features:

  • Published questions can be made public, restricted to logged-in users, or only visible to site staff.
  • Topics are self-hiding depending on the access level of the questions they contain.
  • Qanda installs with a fully working set of templates so you can start playing straight away, and an example project is provided.

Getting started¶

The first thing you’ll need to do is check out the installation guide and requirements.

If you’re familiar with installing Django apps then the installation is totally standard, with no additional dependencies.

License¶

Django-Qanda is released under the MIT License.

Contribute¶

Installation¶

This part of the documentation covers the installation of Qanda.

Requirements¶

Qanda currently runs on Django 1.4.2 or greater, Python 2.7 or greater.

Distribute & Pip¶

Installing Qanda is simple with pip, just run this in your terminal:

$ pip install django-qanda

or, with easy_install:

$ easy_install django-qanda

Using pip is the recommended method.

Get the code¶

Qanda is actively developed on Bitbucket, where the code is always available.

You can either clone the repository:

$ hg clone https://bitbucket.org/mhurt/django-qanda

or download the tar-ball or zip-ball of your choice.

Once you have a copy of the source, you can install it into your site packages easily:

$ python setup.py install

Configuring your project¶

In your Django project’s settings, add Qanda to your INSTALLED_APPS setting:

INSTALLED_APPS = {
  ...
  'qanda'
}

Include the qanda URLconf in your project urls.py like this:

url(r'^faq/', include('qanda.urls'))

In Django 1.7 run python manage.py migrate qanda. Otherwise, just run python manage.py syncdb.

Sitemap¶

Qanda has a default sitemap qanda.sitemaps.QuestionSitemap which you can use if providing sitemaps.xml for your project. See Django’s sitemaps documentation for how to wire this up.

Example Project¶

First you’ll need to ensure that you’ve installed Qanda, and that you also have a recent install of Django itself.

Next, in your terminal you’ll want to run through the Django project setup. Assuming you’re already in the django-qanda directory:

$ cd example/
$ python manage.py syncdb

This will create the SQLite database in the current directory. Follow the on-screen prompts as with any Django project.

Skip this part if you want to get started straight away or, if you’d like to load the sample data for Qanda you can run the following command to import the supplied fixtures:

$ python manage.py loaddata ../qanda/fixtures/qanda_example.json

At this point you’re ready to play with the example project, and you can simply run Django’s development server as normal:

$ django manage.py runserver

Finally, log into the admin area at http://127.0.0.1:8000/admin/, or go to http://127.0.0.1:8000/faq/ to take a look at the templates in action.

Changes¶

To see all commits please visit https://bitbucket.org/mhurt/django-qanda/commits/all.

0.2.0¶

(since v.0.1.0)

New:

  • Added qanda.sitemaps.QuestionSitemap. Sitemap added to example app, and installation doc updated.
  • Support Django 1.4.2 or higher.

Fixed:

  • Incorrect homepage URL in setup script.
  • Broken queryset access in TopicManager.for_staff()
  • ... a lot of other bugs (sigh).

Changed

  • Tox testenvs names now have shortened format, e.g py27dj17.
  • Documentation updates.
  • Moved test runner to qanda.test.run
  • Improved test suite

Indices and tables¶