Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
    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)