legislei.models.user module

class legislei.models.user.User(*args, **values)[código fonte]

Bases: mongoengine.document.Document

Classe de usuário requerida pelo Flask-Login

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

devices

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Nota

The only valid list values are subclasses of EmbeddedDocument.

Novo na versão 0.9.

email

A field that validates input as an email address.

Novo na versão 0.4.

get_id()[código fonte]
id

A field wrapper around MongoDB’s ObjectIds.

inscricoes

An embedded document field - with a declared document_type. Only valid values are subclasses of EmbeddedDocument.

is_active()[código fonte]
is_anonymous()[código fonte]
is_authenticated()[código fonte]
objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

password

A unicode string field.

username

A unicode string field.

class legislei.models.user.UserDevice(*args, **kwargs)[código fonte]

Bases: mongoengine.document.EmbeddedDocument

active

Boolean field type.

Novo na versão 0.1.2.

id

A unicode string field.

name

A unicode string field.

os

A unicode string field.

token

A unicode string field.