Changeset 3219
- Timestamp:
- 07/03/07 11:18:20 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/turbogears/qstemplates/quickstart/+package+/model.py_tmpl
r3206 r3219 239 239 by_user_name = classmethod(by_user_name) 240 240 241 def _set_password(self, password): 242 ''' 243 encrypts password on the fly using the encryption 244 algo defined in the configuration 245 ''' 246 self._password = identity.encrypt_password(password) 247 248 def _get_password(self): 249 ''' 250 returns password 251 ''' 252 return self._password 253 254 password = property(_get_password, _set_password) 255 241 256 class Permission(object): 242 257 """ … … 252 267 assign(VisitIdentity, visit_identity_table, 253 268 properties=dict(users=relation(User, backref='visit_identity'))) 254 assign(User, users_table) 269 assign(User, users_table, 270 properties=dict(_password=users_table.c.password)) 255 271 assign(Group, groups_table, 256 properties=dict(users=relation(User, secondary=user_group_table, backref='groups'))) 272 properties=dict(users=relation(User, 273 secondary=user_group_table, backref='groups'))) 257 274 assign(Permission, permissions_table, 258 properties=dict(groups=relation(Group, secondary=group_permission_table, backref='permissions'))) 275 properties=dict(groups=relation(Group, 276 secondary=group_permission_table, backref='permissions'))) 259 277 #else 260 278 #