mewlo.mpacks.core.verification.mverification module

mverification.py 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.

consume(request)[source]

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.

get_userdict()[source]
increase_failurecount()[source]

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

init()[source]

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_randomverificationcode()[source]

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

set_invalid(invalidreason)[source]

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