Added first files for admin and login/signup in admin

This commit is contained in:
Antonio de la Rosa 2020-01-25 23:57:17 +01:00
parent e0ed00af8c
commit d9b62719d7
139 changed files with 18408 additions and 4 deletions

View file

@ -0,0 +1,16 @@
from paramecio2.libraries.db.corefields import PhangoField
from paramecio2.libraries.db.coreforms import PasswordForm
from hmac import compare_digest as compare_hash
import crypt
import re
class UserNameField(PhangoField):
def check(self, value):
if not re.match("^[A-Za-z0-9_-]+$", value):
self.txt_error='Error: use only letters, numbers, underscores and dashes for this field'
self.error=1
value=''
return value