Qanda API — django-qanda 0.1.0 documentation

### Navigation

- index
- modules |
- previous |
- django-qanda 0.1.0 documentation »

# Qanda API

## qanda.views

class `qanda.views.` `QuestionDetail`(**kwargs)

  Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

  `get_object`()
  `slug_url_kwarg` = 'question_slug'
  `template_name` = 'qanda/question_detail.html'

class `qanda.views.` `TopicDetail`(**kwargs)

  Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

  `get_object`()
  `slug_url_kwarg` = 'topic_slug'
  `template_name` = 'qanda/topic_detail.html'

class `qanda.views.` `TopicList`(**kwargs)

  Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

  `allow_empty` = True
  `get_context_data`(**kwargs)
  `get_queryset`()
  `model`

    alias of `Topic`

  `questions_context_object_name` = 'related_questions'
  `template_name` = 'qanda/topic_list.html'

## qanda.mixins

Mixins for qanda.views

class `qanda.mixins.` `QuestionQuerysetMixin`
  `get_question_queryset`()
  `question_queryset` = <qanda.models.PublishedQuestionManager object at 0x4131480c>

class `qanda.mixins.` `TopicQuestionsMixin`
  `context_object_list_name` = None
  `get_context_data`(**kwargs)

    Insert the context_object_list into the template context.

  `get_context_object_list_name`(object_list)

    Get the name of the object_list to be used in the context.

  `queryset`

    Decorator that converts a method with a single self argument into a property cached on the instance.

  `topic`

    Decorator that converts a method with a single self argument into a property cached on the instance.

  `topic_queryset` = <qanda.models.TopicManager object at 0x413143cc>

## qanda.models

class `qanda.models.` `AutoTimestampBase`(*args, **kwargs)
  class `Meta`
    `abstract` = False
  `AutoTimestampBase.` `save`(*args, **kwargs)

class `qanda.models.` `PublishedQuestionManager`
  `for_anonymous`()
  `for_members`()
  `get_query_set`(*args, **kwargs)
  `get_queryset`()
  `use_for_related_fields` = True

class `qanda.models.` `Question`(*args, **kwargs)

  A frequently asked question.

  `ACCESS_CHOICES` = ((0, u'Public'), (1, u'Members'), (2, u'Staff'))
  exception `DoesNotExist`
  `Question.` `MEMBERS` = 1
  exception `Question.` `MultipleObjectsReturned`
  `Question.` `PUBLIC` = 0
  `Question.` `STAFF` = 2
  `Question.` `get_absolute_url`(*moreargs, **morekwargs)
  `Question.` `get_access_display`(*moreargs, **morekwargs)
  `Question.` `objects` = <django.db.models.manager.Manager object at 0x413147cc>
  `Question.` `published` = <qanda.models.PublishedQuestionManager object at 0x4131480c>
  `Question.` `topic`

class `qanda.models.` `Topic`(*args, **kwargs)

  Generic Topics for FAQ questions.

  exception `DoesNotExist`
  exception `Topic.` `MultipleObjectsReturned`
  `Topic.` `get_absolute_url`(*moreargs, **morekwargs)
  `Topic.` `objects` = <qanda.models.TopicManager object at 0x413143cc>
  `Topic.` `questions`

class `qanda.models.` `TopicManager`
  `for_anonymous`()
  `for_members`()
  `for_staff`()

### Navigation

- index
- modules |
- previous |
- django-qanda 0.1.0 documentation »