Пример #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)
Пример #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)
Пример #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
Пример #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)
Пример #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)