def get_default(self): if self._auto_current_user_add: user = get_current_user() if user is not None: return user.id else: return None return get_current_user() return super(UserProperty, self).get_default()
def get_current_user(): from gae2django import middleware return middleware.get_current_user()