PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
Loading...
Searching...
No Matches
schoolsystemadministrator.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 """School system administrators can create and delete multiple
12 schools rather than just one school.
13 """
14
15 _dbfields = {
16 'userid': ('INTEGER', 'PRIMARY KEY NOT NULL',),
17 'displayname': ('TRANSLATION', 'NOT NULL', BlankValidator()),
18 'profile': ('TRANSLATION', "NOT NULL DEFAULT ''",),
19 'phone': ('TRANSLATION', 'NOT NULL', BlankValidator()),
20 'email': ('TRANSLATION', 'NOT NULL', BlankValidator()),
21 'contactinfo': ('TRANSLATION', "NOT NULL DEFAULT ''",),
22 'flags': ('INT', 'NOT NULL DEFAULT 0',),
23 }
24 _dbindexes = ()
25 _dblinks = ['learn_school']
26 _dbdisplay = ['displayname', 'profile', 'phone', 'email']
27 _dbflags = 0
28
29 # -------------------------------------------------------------------
30 def __init__(self):
31 super().__init__()
32
School system administrators can create and delete multiple schools rather than just one school.
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