def create_theme(name, **extra_kwargs):
 kwargs = {'status': STATUS_PUBLIC, 'name': name, 'slug': slugify(name), 'bayesian_rating': random.uniform(1, 5), 'average_daily_users': random.randint(200, 2000), 'weekly_downloads': random.randint(200, 2000), 'created': datetime.now(), 'last_updated': datetime.now()}
 kwargs.update(extra_kwargs)
 theme = Addon.objects.create(type=ADDON_EXTENSION, **kwargs)
 generate_version(addon=theme)
 theme.update_version()
 theme.status = STATUS_PUBLIC
 theme.type = ADDON_PERSONA
 Persona.objects.create(addon=theme, popularity=theme.weekly_downloads, persona_id=0)
 theme.save()
 return theme

def create_theme ( name , ** extra_kwargs ) : kwargs = { 'status' : STATUS_PUBLIC , 'name' : name , 'slug' : slugify ( name ) , 'bayesian_rating' : random . uniform ( 1 , 5 ) , 'average_daily_users' : random . randint ( 200 , 2000 ) , 'weekly_downloads' : random . randint ( 200 , 2000 ) , 'created' : datetime . now ( ) , 'last_updated' : datetime . now ( ) } kwargs . update ( extra_kwargs ) theme = Addon . objects . create ( type = ADDON_EXTENSION , ** kwargs ) generate_version ( addon = theme ) theme . update_version ( ) theme . status = STATUS_PUBLIC theme . type = ADDON_PERSONA Persona . objects . create ( addon = theme , popularity = theme . weekly_downloads , persona_id = 0 ) theme . save ( ) return theme
create a theme with the given name .