X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;ds=sidebyside;f=filex%2Fforms.py;fp=filex%2Fforms.py;h=f73b175f1099b78cccfa152a7390abea7c8ab688;hb=edd1abec6c3948dd007a7a7d75ddcc28e9197e41;hp=db6587bae44521fed47d380aaf331b5f81171db4;hpb=8fa091024d4e474722fd81df48852625f926aa86;p=qcg-portal.git diff --git a/filex/forms.py b/filex/forms.py index db6587b..f73b175 100644 --- a/filex/forms.py +++ b/filex/forms.py @@ -1,9 +1,20 @@ # coding=utf-8 +import os + from django import forms +from django.core.exceptions import ValidationError +from django.core.validators import RegexValidator from filex.models import Favorite +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,}(?