Since we're using these regex patterns repeatedly in the for loop below, how about we just compile them once?
```python
    excludes = [
        re.compile(r) for r in settings.NOINDEX_URLS + [
            r'%\(.*\)',
            r'^media/',
            r'^robots\.txt$',
            r'^sitemap\.xml$']]
```