Added more docstrings to forms and fields

This commit is contained in:
Antonio de la Rosa 2022-05-06 19:40:16 +02:00
parent 26dd863af8
commit d04a7121df
20 changed files with 79 additions and 9 deletions

View file

@ -11,6 +11,7 @@ check_url = re.compile(
r'(?:/?|[/?]\S+)$', re.IGNORECASE)
class UrlField(CharField):
"""Field for check and save strings in url format"""
def check(self, value):
@ -28,6 +29,7 @@ class UrlField(CharField):
check_domain=re.compile('^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\.[a-zA-Z]{2,3})$')
class DomainField(CharField):
"""Field for check and save strings in domain internet format"""
def check(self, value):