These two loops can be:
```
for namespace, directories in settings.MAKO_TEMPLATES.items():
    for directory in directories:
```