def setup_joins(self, names, opts, alias, can_reuse=None, allow_many=True):
        joins = [alias]
        # First, generate the path for the names
        path, final_field, targets, rest = self.names_to_path(
            names, opts, allow_many, fail_on_missing=True)

        # Then, add the path to the query's joins. Note that we can't trim
        # joins at this stage - we will need the information about join type
        # of the trimmed joins.
        for join in path:
            opts = join.to_opts
            if join.direct:
                nullable = self.is_nullable(join.join_field)
            else:
                nullable = True
            connection = Join(opts.db_table, alias, None, INNER, join.join_field, nullable)
            reuse = can_reuse if join.m2m else None
            alias = self.join(connection, reuse=reuse)
            joins.append(alias)
        return final_field, targets, opts, joins, path
Add most recent post list to template context
dataset/ETHPy150Open django/django/django/db/models/sql/query.py/Query.setup_joins--crossover with--dataset/ETHPy150Open jkossen/imposter/frontend.py/inject_recent_posts