Ejemplo n.º 1
0
 def post(self):
     user = users.get_current_user()
     character = data.Character.by_user(user).get()
     if character == None:
         character = data.Character(owner=user, gatherer_code=data.fresh_gatherer_code())
     for x in ['heroic_alias', 'feed_access', 'searchable']:
         character.__setattr__(x, self.request.get(x))
     character.show_in_hall_of_heroes_p = self.request.get('show_in_hall_of_heroes_p') == 'true'
     character.put()
     self.redirect('/me')
Ejemplo n.º 2
0
 def get(self):
     user = users.get_current_user()
     self.handle_with_template('create.html', { 'user': user,
                                                'me': data.Character(owner=user, gatherer_code=data.fresh_gatherer_code()) })
Ejemplo n.º 3
0
 def get(self):
     character = data.Character.by_user(users.get_current_user()).get()
     if character == None: return self.redirect("/me/create")
     character.gatherer_code = data.fresh_gatherer_code()
     character.put()
     self.redirect_back()