@transaction.atomic
def create_title(language, title, page, menu_title=None, slug=None, redirect=None, meta_description=None, parent=None, overwrite_url=None, with_revision=None):
 assert isinstance(page, Page)
 assert (language in get_language_list(page.site_id))
 if (with_revision in (True, False)):
  _raise_revision_warning()
 if (not slug):
  slug = generate_valid_slug(title, parent, language)
 title = Title.objects.create(language=language, title=title, menu_title=menu_title, slug=slug, redirect=redirect, meta_description=meta_description, page=page)
 if overwrite_url:
  title.has_url_overwrite = True
  title.path = overwrite_url
  title.save()
 return title

@ transaction . atomic def create_title ( language , title , page , menu_title = None , slug = None , redirect = None , meta_description = None , parent = None , overwrite_url = None , with_revision = None ) : assert isinstance ( page , Page ) assert ( language in get_language_list ( page . site_id ) ) if ( with_revision in ( True , False ) ) : _raise_revision_warning ( ) if ( not slug ) : slug = generate_valid_slug ( title , parent , language ) title = Title . objects . create ( language = language , title = title , menu_title = menu_title , slug = slug , redirect = redirect , meta_description = meta_description , page = page ) if overwrite_url : title . has_url_overwrite = True title . path = overwrite_url title . save ( ) return title
create a title .