Package snakelegs :: Module user :: Class User
[hide private]
[frames] | no frames]

Class User

       object --+    
                |    
document.Document --+
                    |
                   User

A User model. Has fields username, firstname, lastname, and email, which are self explanatory. The password field is actually an md5 hash, so do not access it directly unless you know what you are doing. Use setpassword to enter the cleartext password. The date_joined field defaults to the current datetime

Instance Methods [hide private]
 
checkpassword(self, password)
Checks whether the given password matches the stored password
 
fullname(self)
Returns full name of the user, which is firstname and lastname separated by a space
 
setpassword(self, password)
Takes a cleartext password and stores it as an md5 hash in hexadecimal format

Inherited from document.Document: __getattribute__, __init__, __setattr__, __str__, delete, save, to_dict

Inherited from object: __delattr__, __format__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from document.Document: collection, ensure_index, find, find_by_id, find_one

Class Variables [hide private]
  date_joined = <snakelegs.fields.DateTimeField object at 0x2590...
  email = <snakelegs.fields.StringField object at 0x2590310>
  firstname = <snakelegs.fields.StringField object at 0x2590290>
  lastname = <snakelegs.fields.StringField object at 0x25902d0>
  password = <snakelegs.fields.StringField object at 0x2590350>
  username = <snakelegs.fields.StringField object at 0x2590190>

Inherited from document.Document (private): _id

Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

date_joined

Value:
<snakelegs.fields.DateTimeField object at 0x2590390>