def jail_path_configured():
 try:
  jc = JailsConfiguration.objects.latest('id')
 except JailsConfiguration.DoesNotExist:
  jc = None
 return (jc and jc.jc_path and os.path.exists(jc.jc_path))

def jail_path_configured ( ) : try : jc = JailsConfiguration . objects . latest ( 'id' ) except JailsConfiguration . DoesNotExist : jc = None return ( jc and jc . jc_path and os . path . exists ( jc . jc_path ) )
check if there is the jail system is configured by looking at the jailsconfiguration model and jc_path field :returns: boolean .