Move content type from XML to Python code