FIxes in urlfield and admin css
This commit is contained in:
parent
39ba0de29e
commit
ec777cd98f
3 changed files with 14 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
from paramecio2.libraries.db.corefields import CharField
|
from paramecio2.libraries.db.corefields import CharField
|
||||||
import re
|
import re
|
||||||
|
import ipaddress
|
||||||
|
|
||||||
check_url = re.compile(
|
check_url = re.compile(
|
||||||
r'^(?:http|ftp)s?://' # http:// or https://
|
r'^(?:http|ftp)s?://' # http:// or https://
|
||||||
|
|
@ -35,8 +36,15 @@ class DomainField(CharField):
|
||||||
|
|
||||||
if not check_domain.match(value):
|
if not check_domain.match(value):
|
||||||
|
|
||||||
self.error=True
|
#Check if ip
|
||||||
value=""
|
try:
|
||||||
self.txt_error='No valid domain format'
|
|
||||||
|
value=str(ipaddress.ip_address(value))
|
||||||
|
|
||||||
|
except:
|
||||||
|
|
||||||
|
self.error=True
|
||||||
|
value=""
|
||||||
|
self.txt_error='No valid domain or IP format'
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
|
||||||
|
|
@ -627,10 +627,10 @@ a:hover.no_choose_flag
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#center_body input[type="text"]
|
#center_body input[type="text"], #center_body input[type="password"]
|
||||||
{
|
{
|
||||||
|
|
||||||
width:500px;
|
min-width:500px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -13,7 +13,7 @@ if sys.version_info < (3, 5):
|
||||||
# If you install passlib and bcrypt, the password system will use bcrypt by default, if not, will use native crypt libc
|
# If you install passlib and bcrypt, the password system will use bcrypt by default, if not, will use native crypt libc
|
||||||
|
|
||||||
setup(name='paramecio2',
|
setup(name='paramecio2',
|
||||||
version='2.0.15',
|
version='2.0.16',
|
||||||
description='Simple Web Framework based in flask and Mako.',
|
description='Simple Web Framework based in flask and Mako.',
|
||||||
long_description='This framework is a simple framework used for create web apps. Paramecio is modular and fast. By default have a module called admin that can be used for create admin sites',
|
long_description='This framework is a simple framework used for create web apps. Paramecio is modular and fast. By default have a module called admin that can be used for create admin sites',
|
||||||
author='Antonio de la Rosa Caballero',
|
author='Antonio de la Rosa Caballero',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue