PaferaPy Async 0.1
ASGI framework focused on simplicity and efficiency
Loading...
Searching...
No Matches
loginattempt.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 """A simple class to keep track of login attempts into the system to
12 counter repeated attempts to login to the system. I'm quite aware
13 that IP addresses do not translate to single users, but unless you're
14 running a *really* popular site, you shouldn't have any problems
15 limiting login attempts by IP.
16 """
17
18 _dbfields = {
19 'id': ('INTEGER PRIMARY KEY', 'NOT NULL',),
20 'ip': ('TEXT', 'NOT NULL', BlankValidator()),
21 'eventtime': ('DATETIME', 'NOT NULL',),
22 }
23 _dbindexes = ()
24 _dblinks = []
25 _dbdisplay = ['eventtime', 'ip']
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
A simple class to keep track of login attempts into the system to counter repeated attempts to login ...
Definition: loginattempt.py:10
def __init__(self)
Initialize all fields at creation like a good programmer should.
Definition: loginattempt.py:29
Definition: db.py:1