This is unusual.  Why not just:   return quote + '/static/' + rest + quote