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
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.
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 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
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
Overridden to manually manage addition of tags when the object is first saved.
This is required as we’re using tagnames as the sole means of adding and editing tags.
Creates a list of Tag names from the tagnames attribute.
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
Get 10 similar questions for given one. This will search the same tag list for give question(by exactly same string) first. Questions with the individual tags will be added to list if above questions are not full.
all parameters are guaranteed to be clean however may not relate to database - in that case a relvant filter will be silently dropped
Executes an UPDATE query to update denormalised data with the number of answers the given question has.
update favourite_count for given question
Updates Tag associations for a question to match the given tagname string.
Returns True if tag usage counts were updated as a result, False otherwise.
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