Module ImportFrom alias ImportFrom alias alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad ImportFrom alias If NameLoad body ClassDef bases NameLoad body Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults kwarg body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr decorator_list Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Str decorator_list ClassDef bases NameLoad body Assign NameStore Str decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword NameLoad attr keyword Dict Str Str Str Str attr Str Str Index Num Return Dict Str Str Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad If UnaryOpNot NameLoad body Return Dict Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num If NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad attr Str attr keyword Call NameLoad Str keyword Str keyword Call NameLoad Str keyword Str orelse Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad attr keyword Dict Str Str Str Str attr Str Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Str Dict Str Str Call NameLoad SubscriptLoad NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad TupleLoad UnaryOpUAdd Num Num Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body AugAssignSub AttributeStore NameLoad attr Num If CompareEq AttributeLoad NameLoad attr Num body AugAssignSub AttributeStore NameLoad attr Num If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr AugAssignSub AttributeStore NameLoad attr Num orelse Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body If CompareNotEq NameLoad Num body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword NameLoad AugAssignAdd AttributeStore NameLoad attr Num If CompareEq NameLoad Num body AugAssignAdd AttributeStore NameLoad attr Num If CompareEq NameLoad Num body AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str orelse Assign NameStore Str If NameLoad body Assign NameStore Str orelse Assign NameStore Str AugAssignAdd NameStore BinOpMod NameLoad Dict Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListComp NameLoad comprehension TupleStore NameStore NameStore NameLoad For TupleStore NameStore NameStore NameLoad body If CompareIn NameLoad NameLoad body Expr Yield TupleLoad SubscriptLoad NameLoad Index NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Dict If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListComp TupleLoad AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return NameLoad decorator_list decorator_list
N/A django.conf settings django.db connection models N/A N/A django.db.models.sql.aggregates Aggregate N/A N/A N/A ImportError N/A N/A supports_aggregates False N/A N/A supports_aggregates True django.contrib.contenttypes.models ContentType N/A supports_aggregates N/A CoalesceWrapper N/A Aggregate N/A N/A sql_template COALESCE(%(function)s(%(field)s), %(default)s) __init__ N/A N/A self lookup N/A extra N/A N/A N/A self lookup lookup N/A N/A self extra extra N/A _default_alias N/A N/A self N/A N/A N/A N/A %s__%s N/A N/A self lookup N/A N/A N/A N/A self __class__ __name__ lower N/A N/A default_alias N/A property _default_alias add_to_query N/A N/A self query alias col source is_summary N/A N/A N/A N/A N/A N/A super CoalesceWrapper self __init__ col source is_summary N/A self extra N/A N/A N/A query aggregate_select N/A alias self N/A N/A CoalesceSum N/A CoalesceWrapper N/A N/A sql_function SUM N/A CoalesceCount N/A CoalesceWrapper N/A N/A sql_function COUNT N/A VoteManager N/A N/A models Manager N/A get_score N/A N/A self obj N/A N/A N/A 
        Get a dictionary containing the total score for ``obj`` and
        the number of votes it's received.
         N/A ctype N/A N/A N/A ContentType objects get_for_model obj N/A result N/A N/A N/A N/A N/A N/A N/A self filter object_id N/A N/A obj _get_pk_val content_type ctype extra select N/A score num_votes COALESCE(SUM(vote), 0) COALESCE(COUNT(vote), 0) values_list score num_votes N/A 0 N/A N/A score num_votes N/A int N/A result N/A 0 N/A int N/A result N/A 1 N/A get_scores_in_bulk N/A N/A self objects N/A N/A N/A 
        Get a dictionary mapping object ids to total score and number
        of votes for each object.
         N/A object_ids N/A N/A N/A o _get_pk_val N/A o objects N/A N/A object_ids N/A N/A N/A N/A ctype N/A N/A N/A ContentType objects get_for_model N/A objects N/A 0 N/A ctype N/A N/A N/A ContentType objects get_for_model N/A objects N/A 0 N/A supports_aggregates N/A N/A queryset N/A N/A N/A N/A N/A N/A self filter object_id__in object_ids content_type ctype values object_id annotate score N/A CoalesceSum vote default 0 num_votes N/A CoalesceCount vote default 0 N/A N/A queryset N/A N/A N/A N/A N/A N/A self filter object_id__in object_ids content_type ctype extra select N/A score num_votes COALESCE(SUM(vote), 0) COALESCE(COUNT(vote), 0) values object_id score num_votes N/A N/A N/A N/A N/A queryset query group_by append object_id N/A vote_dict N/A N/A row queryset N/A N/A N/A vote_dict N/A N/A row N/A object_id N/A score num_votes N/A int N/A row N/A score N/A int N/A row N/A num_votes N/A vote_dict N/A record_vote N/A N/A self obj user vote N/A N/A N/A 
        Record a user's vote on a given object. Only allows a given user
        to vote once, though that vote may be changed.

        A zero vote indicates that any existing vote should be removed.
         N/A N/A vote N/A N/A 1 0 -1 N/A N/A N/A ValueError Invalid vote (must be +1/0/-1) N/A ctype N/A N/A N/A ContentType objects get_for_model obj N/A N/A N/A v N/A N/A self get user user content_type ctype object_id N/A N/A obj _get_pk_val N/A N/A N/A v vote 1 N/A N/A N/A obj yeas 1 N/A N/A N/A v vote -1 N/A N/A N/A obj nays 1 N/A N/A vote 0 N/A N/A N/A N/A v delete N/A N/A obj votes 1 N/A N/A N/A v vote vote N/A N/A N/A v save N/A N/A N/A N/A models ObjectDoesNotExist N/A N/A N/A vote 0 N/A N/A N/A N/A self create user user content_type ctype object_id N/A N/A obj _get_pk_val vote vote N/A N/A obj votes 1 N/A N/A vote 1 N/A N/A N/A obj yeas 1 N/A N/A vote -1 N/A N/A N/A obj nays 1 N/A N/A N/A obj save N/A get_top N/A N/A self Model limit reversed N/A 10 False N/A N/A 
        Get the top N scored objects for a given model.

        Yields (object, score) tuples.
         N/A ctype N/A N/A N/A ContentType objects get_for_model Model N/A query N/A 
        SELECT object_id, SUM(vote) as %s
        FROM %s
        WHERE content_type_id = %%s
        GROUP BY object_id N/A N/A N/A N/A connection ops quote_name score N/A N/A N/A connection ops quote_name N/A N/A N/A self model _meta db_table N/A N/A N/A settings DATABASE_ENGINE mysql N/A N/A having_score N/A N/A N/A connection ops quote_name score N/A N/A having_score SUM(vote) N/A reversed N/A N/A having_sql  HAVING %(having_score)s < 0 ORDER BY %(having_score)s ASC LIMIT %%s N/A N/A having_sql  HAVING %(having_score)s > 0 ORDER BY %(having_score)s DESC LIMIT %%s N/A query N/A having_sql N/A having_score having_score N/A cursor N/A N/A connection cursor N/A N/A N/A cursor execute query N/A N/A ctype id limit N/A results N/A N/A cursor fetchall N/A objects N/A N/A N/A Model objects in_bulk N/A id N/A N/A id score results N/A N/A id score results N/A N/A N/A id objects N/A N/A N/A N/A N/A objects N/A id N/A int score N/A get_bottom N/A N/A self Model limit N/A 10 N/A N/A 
        Get the bottom (i.e. most negative) N scored objects for a given
        model.

        Yields (object, score) tuples.
         N/A N/A N/A self get_top Model limit True N/A get_for_user N/A N/A self obj user N/A N/A N/A 
        Get the vote made on the given object by the given user, or
        ``None`` if no matching vote exists.
         N/A N/A N/A N/A user is_authenticated N/A N/A None N/A ctype N/A N/A N/A ContentType objects get_for_model obj N/A N/A N/A vote N/A N/A self get content_type ctype object_id N/A N/A obj _get_pk_val user user N/A N/A N/A N/A models ObjectDoesNotExist N/A N/A vote None N/A vote N/A get_for_user_in_bulk N/A N/A self objects user N/A N/A N/A 
        Get a dictionary mapping object ids to votes made by the given
        user on the corresponding objects.
         N/A vote_dict N/A N/A N/A N/A len objects 0 N/A N/A ctype N/A N/A N/A ContentType objects get_for_model N/A objects N/A 0 N/A votes N/A list N/A N/A self filter content_type__pk N/A ctype id object_id__in N/A N/A N/A obj _get_pk_val N/A obj objects user__pk N/A user id N/A vote_dict N/A dict N/A N/A N/A vote object_id vote N/A vote votes N/A vote_dict N/A N/A