def clean_server(self): url = self.cleaned_data['server'] try: dvid.get_server_info(url) except Exception, e: raise forms.ValidationError("Couldn't connect to %s or read valid DVID info" % url)
def clean_server(self): url = self.cleaned_data['server'] try: dvid.get_server_info(url) except Exception, e: raise forms.ValidationError( "Couldn't connect to %s or read valid DVID info" % url)
def clean_server(self): url = self.cleaned_data['server'] try: dvid.get_server_info(url) except Exception as e: raise forms.ValidationError( f"Couldn't connect to {url} or read valid DVID info") return url
def __init__(self): dvid_url = settings.DVID_URL.rstrip('/') self.data = get_server_info(dvid_url) # Default to XY orientation self.orientation = 0 # Default to no translation self.translation = DVIDDimension(0, 0, 0)