def get_permalink_path(self):
 try:
  first_permalink_id = self.get_permalink_ids_iter().next()
 except StopIteration:
  return None
 return '/{settings[PERMALINK_PATH]}/{first_permalink}'.format(settings=self.settings, first_permalink=first_permalink_id)

def get_permalink_path ( self ) : try : first_permalink_id = self . get_permalink_ids_iter ( ) . next ( ) except StopIteration : return None return '/{settings[PERMALINK_PATH]}/{first_permalink}' . format ( settings = self . settings , first_permalink = first_permalink_id )
get just path component of permalink .