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