X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=filex%2Futils.py;h=49c4d79840fccd6d3ff527e4ec260ab6d627fcb6;hb=31781847241095d02be6f2d7616ab92e1047281d;hp=9a96949cbb477b8e532d97a9c59498855462b2a6;hpb=107c44b051e4523ce86b65c6d1d5ff26dd0c13e6;p=qcg-portal.git diff --git a/filex/utils.py b/filex/utils.py index 9a96949..49c4d79 100644 --- a/filex/utils.py +++ b/filex/utils.py @@ -1,21 +1,23 @@ from functools import wraps +import logging from django.core.validators import RegexValidator from django.http import JsonResponse from django.views.decorators.csrf import csrf_protect, csrf_exempt from filex.ftp import FTPError -from filex.uploadhandler import FtpUploadHandler -msg = u'Invalid value' +_msg = u'Invalid value' host_validator = RegexValidator(r'^(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+' - r'(?:[a-zA-Z]{2,6}\.?|[a-zA-Z0-9-]{2,}(?