Yeah I would explicitly add those fields to the context here.  I assume that middleware is not invoked for django commands?