def editteam(self, team, **kwargs): if not 'team_id' in kwargs: team = self.getteam(team, None) if not team: raise cpy.HTTPRedirect("/admin/lsteam/") team_info = { 'team_id': (team.id, []), 'name': (team.name, []), 'description': (team.description or "", []), 'fullsize': (team.fullsize or "", [])} else: team_info = kwargs __form = kwargs.get("__form", None) if __form: form = PartialForm(self._editteamform, Form.Decode(__form)) else: form = PartialForm(self._editteamform, team_info) return ("editteam", {"form": form, "team": team})
def addteam(self, **kwargs): __form = kwargs.get("__form", None) if __form: form = PartialForm(self._addteamform, Form.Decode(__form)) else: form = self._addteamform return ("addteam", {"form": form})