PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
Loading...
Searching...
No Matches
schooladministrator.py
Go to the documentation of this file.
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3
4import pafera.db
6
7from pafera.validators import *
8
9# *********************************************************************
11
12 _dbfields = {
13 'userid': ('INTEGER', 'PRIMARY KEY NOT NULL',),
14 'displayname': ('TRANSLATION', 'NOT NULL', BlankValidator()),
15 'profile': ('TRANSLATION', "NOT NULL DEFAULT ''",),
16 'phone': ('TRANSLATION', 'NOT NULL', BlankValidator()),
17 'email': ('TRANSLATION', 'NOT NULL', BlankValidator()),
18 'contactinfo': ('TRANSLATION', "NOT NULL DEFAULT 0",),
19 'flags': ('INT', 'NOT NULL DEFAULT 0',),
20 }
21 _dbindexes = ()
22 _dblinks = ['learn_school']
23 _dbdisplay = ['displayname', 'profile', 'phone', 'email']
24 _dbflags = 0
25
26 # -------------------------------------------------------------------
27 def __init__(self):
28 super().__init__()
29
def __init__(self)
Initialize all fields at creation like a good programmer should.
Base class for all database models.
Definition: modelbase.py:20
Throws an exception on blank values.
Definition: validators.py:43
Definition: db.py:1