PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
Loading...
Searching...
No Matches
newuser.py
Go to the documentation of this file.
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4from pafera.db import *
5
7
8from pafera.validators import *
9
10# *********************************************************************
12 """Newly registered users are created here until an administrator
13 confirms their information, upon which they are transferred to
14 system_user.
15 """
16
17 _dbfields = {
18 'rid': ('INTEGER PRIMARY KEY', 'NOT NULL',),
19 'phonenumber': ('TEXT', 'NOT NULL', BlankValidator()),
20 'place': ('TEXT', 'NOT NULL', BlankValidator()),
21 'password': ('PASSWORD', 'NOT NULL', BlankValidator()),
22 'email': ('TEXT', "NOT NULL DEFAULT ''",),
23 'displayname': ('TRANSLATION', 'NOT NULL', BlankValidator()),
24 'extrainfo': ('DICT', "NOT NULL DEFAULT ''",),
25 'flags': ('INT', 'NOT NULL DEFAULT 0',),
26 }
27 _dbindexes = ()
28 _dblinks = []
29 _dbdisplay = ['place', 'displayname', 'phonenumber']
30 _dbflags = 0
31
32 # -------------------------------------------------------------------
33 def __init__(self):
34 super().__init__()
35
Base class for all database models.
Definition: modelbase.py:20
Throws an exception on blank values.
Definition: validators.py:43
Newly registered users are created here until an administrator confirms their information,...
Definition: newuser.py:11
def __init__(self)
Initialize all fields at creation like a good programmer should.
Definition: newuser.py:33
Definition: db.py:1