Skip to content

Infinite recursion for template loaders that query the database #598

@tcarobruce

Description

@tcarobruce

A template loader that does a database query can cause the debug toolbar to enter an infinite recursive loop. (Eventually hits max recursion depth.) E.g.

def load_template_source(template_name, template_dirs=None):
    return DatabaseTemplate.objects.get(filename=template_name).source

Not an issue with an earlier version (0.7.0) of the toolbar.

Disabling the SQL panel also addresses the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions