this method looks very similar with ExtendedSiteAdminForm._get_used_templates below.
We should try to reduce the code duplication. Get rid of one of them.