Bases: askbot.models.base.AnonymousContent
AnonymousQuestion(id, session_key, wiki, added_at, ip_addr, author_id, text, summary, title, tagnames)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: django.db.models.base.Model
A favorite Question of a User.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: askbot.models.content.Content, askbot.models.base.DeletableContent
Question(id, deleted, deleted_at, deleted_by_id, author_id, added_at, wiki, wikified_at, locked, locked_by_id, locked_at, score, vote_up_count, vote_down_count, comment_count, offensive_flag_count, last_edited_at, last_edited_by_id, html, text, title, answer_accepted, closed, closed_by_id, closed_at, close_reason, answer_count, view_count, favourite_count, last_activity_at, last_activity_by_id, tagnames, summary)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
raises QuestionHidden
This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.
returns query set for answers to this question that may be shown to the given user
question always appears on its own first page by definition. The answers parameter is not used here. The extra parameter is necessary to maintain generality of the function call signature
returns list of users who might be interested in the question update based on their participation in the question activity
exclude_list is mandatory - it normally should have the author of the update so the he/she is not notified about the update
Get 10 similar questions for given one. Questions with the individual tags will be added to list if above questions are not full.
This function has a limitation that it will retrieve only 100 records then select 10 most similar from that list as querying entire database may be very expensive - this function will benefit from some sort of optimization
return number of tags in the other question that overlap with the current question (self)
Creates a list of Tag names from the tagnames attribute.
typically post has a field to store raw source text in comment it is called .comment, in Question and Answer it is called .text also there is another field called .html (consistent across models) so the goal of this function is to render raw text into .html and extract any metadata given stored in source (currently this metadata is limited by twitter style @mentions but there may be more in the future
function returns a dictionary with the following keys html newly_mentioned_users - list of <User> objects removed_mentions - list of mention <Activity> objects - for removed ones
generic method to use with posts to be used prior to saving post edit or addition
expects some iterable of unicode string tag names joins the names with a space and assigns to self.tagnames does not save the object
updates the denormalized field ‘answer_count’ on the question
update favourite_count for given question
Updates Tag associations for a question to match the given tagname string.
This class provides the functionality that makes the related-object managers available as attributes on a model class, for fields that have multiple “remote” values and have a GenericRelation defined in their model (rather than having another model pointed at them). In the example “article.publications”, the publications attribute is a ReverseGenericRelatedObjectsDescriptor instance.
Bases: django.db.models.manager.Manager
all parameters are guaranteed to be clean however may not relate to database - in that case a relvant filter will be silently dropped
update counter+1 when user browse question page
Bases: askbot.models.base.ContentRevision
A revision of a Question.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Looks up the next available revision number.
Bases: django.db.models.base.Model
QuestionView(id, question_id, who_id, when)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned