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: 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
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.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: askbot.models.content.Content, askbot.models.base.DeletableContent
Answer(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, question_id, accepted, accepted_at)
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.
get list of users interested in this response update based on their participation in the question activity
exclude_list is required and normally should contain author of the updated so that he/she is not notified of the response
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
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: askbot.models.base.ContentRevision
A revision of an Answer.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Looks up the next available revision number if not set.
Bases: askbot.models.base.AnonymousContent
AnonymousAnswer(id, session_key, wiki, added_at, ip_addr, author_id, text, summary, question_id)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: askbot.models.base.DeletableContent
Tag(id, deleted, deleted_at, deleted_by_id, name, created_by_id, used_count)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: askbot.models.base.MetaContent, askbot.models.base.UserContent
Comment(id, user_id, content_type_id, object_id, comment, added_at, html)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Provides a generic relation to any object through content-type/object-id fields.
deletes comment and concomitant response activity records, as well as mention records, while preserving integrity or response counts for the users
get list of users who want instant notifications about this post
argument potential_subscribers is required as it saves on db hits
get list of users who authored comments on a post and the post itself
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
Bases: askbot.models.base.MetaContent, askbot.models.base.UserContent
Vote(id, user_id, content_type_id, object_id, vote, voted_at)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Provides a generic relation to any object through content-type/object-id fields.
Bases: askbot.models.base.MetaContent, askbot.models.base.UserContent
A flag on a Question or Answer indicating offensive content.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Provides a generic relation to any object through content-type/object-id fields.
Bases: django.db.models.base.Model
MarkedTag(id, tag_id, user_id, reason)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: django.db.models.base.Model
Awarded for notable actions performed on the site by Users.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: django.db.models.base.Model
The awarding of a Badge to a User.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Provides a generic relation to any object through content-type/object-id fields.
Bases: django.db.models.base.Model
The reputation histories for user
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: django.db.models.base.Model
We keep some history data for user activities
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Provides a generic relation to any object through content-type/object-id fields.
Bases: django.db.models.base.Model
EmailFeedSetting(id, subscriber_id, feed_type, frequency, added_at, reported_at)
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Bases: django.db.models.base.Model
Users within the Django authentication system are represented by this model.
Username and password are required. Other fields are optional.
Bases: django.core.exceptions.ObjectDoesNotExist
Bases: django.core.exceptions.MultipleObjectsReturned
Returns a boolean of whether the raw_password was correct. Handles encryption formats behind the scenes.
decrement response count for the user by one, log critical error if count would go below zero but limit decrementation at zero exactly
Sends an e-mail to this User.
Returns the first_name plus the last_name, with a space in between.
Returns a list of permission strings that this user has through his/her groups. This method queries all available auth backends.
Returns site-specific profile for this user. Raises SiteProfileNotAvailable if this site does not allow profiles.
Returns the URL for this User’s profile.
Returns True if the user has any permissions in the given app label. Uses pretty much the same logic as has_perm, above.
Returns True if the user has the specified permission. This method queries all available auth backends, but returns immediately if any backend returns True. Thus, a user who has permission from a single auth backend is assumed to have permission in general.
Returns True if the user has each of the specified permissions.
increment response counter for user by one
Always returns False. This is a way of comparing User objects to anonymous users.
Always return True. This is a way to tell if the user has been authenticated in templates.
cancel has no effect here, but is important for the SE loader it is hoped that toggle will work and data will be consistent but there is no guarantee, maybe it’s better to be more strict about processing the “cancel” option another strange thing is that this function unlike others below returns a value