added middleware.py and exclusion to slates