Replace dealer middleware with template context processor