mewlo.mpacks.core.verification.mverification module Database object for storing verification entries

class mewlo.mpacks.core.verification.mverification.MewloVerification[source]

Bases: mewlo.mpacks.core.database.mdbmodel.MewloDbModel

Session object / database model.


Mark verification entry as consumed/used successfully.

dbtablename = 'verification'
classmethod define_fields(dbmanager)[source]

This class-level function defines the database fields for this model – the columns, etc.


Increase the failure counter, and fail it iff too many. Return EFailure reason if too many failures; otherwise None


Manually called init on manually created new instances.

init_values(request, expiration_days, verification_varname, verification_varval, extradict, is_shortcode, user)[source]

Set some values.


Make a random secure unique verification code and return it. ATTN: at some point we will want to support long + short codes (see docs).


Mark it as invalid.

setvals_fromequest(request, user)[source]

Set some verification values from a request

update_dict_defaults_with_userdict(overidedict, forcelist=[])[source]

Return a dictionary where userdict values are treated as defaults with overidedict merged after.

Table Of Contents

Previous topic

mewlo.mpacks.core.verification package

Next topic

mewlo.mpacks.core.verification.mverificationmanager module

This Page