def generate_theme_images(theme):
 header_hash = uuid.uuid4().hex
 footer_hash = uuid.uuid4().hex
 create_theme_images(theme, 'header', header_hash)
 create_theme_images(theme, 'footer', footer_hash)
 persona = theme.persona
 persona.header = header_hash
 persona.footer = footer_hash
 persona.save()
 save_theme(header_hash, footer_hash, theme)

def generate_theme_images ( theme ) : header_hash = uuid . uuid4 ( ) . hex footer_hash = uuid . uuid4 ( ) . hex create_theme_images ( theme , 'header' , header_hash ) create_theme_images ( theme , 'footer' , footer_hash ) persona = theme . persona persona . header = header_hash persona . footer = footer_hash persona . save ( ) save_theme ( header_hash , footer_hash , theme )
generate both header and footer images for a given theme .