def check_title_slugs(page):
 for title in page.title_set.all():
  (old_slug, old_path) = (title.slug, title.path)
  title.slug = get_available_slug(title)
  if ((title.slug != old_slug) or (title.path != old_path)):
   title.save()

def check_title_slugs ( page ) : for title in page . title_set . all ( ) : ( old_slug , old_path ) = ( title . slug , title . path ) title . slug = get_available_slug ( title ) if ( ( title . slug != old_slug ) or ( title . path != old_path ) ) : title . save ( )
checks page title slugs for duplicity if required .