class GamesView(TemplateView): template_name = 'cpanel/games_home.html' def dispatch(self, request, *args, **kwargs): self.switchboard = GamesSwitchboard() return super(GamesView, self).dispatch(request, *args, **kwargs) def post(self, request, *args, **kwargs): self.switchboard = GamesSwitchboard() for s in self.switchboard.props(): val = request.POST.get(s.name, '') s.set_value(val) return redirect('games_home') def get_context_data(self, **kwargs): context = super(GamesView, self).get_context_data(**kwargs) context.update(dict(settings=self.switchboard)) return context
class GamesView(TemplateView): template_name = 'cpanel/customization/games.html' def __init__(self, **kwargs): super(GamesView, self).__init__(**kwargs) self.switchboard = GamesSwitchboard() def post(self, request, *args, **kwargs): for s in self.switchboard.props(): val = request.POST.get(s.name, '') s.set_value(val) return redirect('customization_games') def get_context_data(self, **kwargs): context = super(GamesView, self).get_context_data(**kwargs) context.update(dict(settings=self.switchboard)) return context
class GamesView(TemplateView): template_name = 'cpanel/customization/games.html' def __init__(self, **kwargs): super(GamesView, self).__init__(**kwargs) self.switchboard = GamesSwitchboard() def post(self, request, *args, **kwargs): for s in self.switchboard.props(): val = request.POST.get(s.name, '') s.set_value(val) return redirect('customization_games') def get_context_data(self, **kwargs): context = super(GamesView, self).get_context_data(**kwargs) context.update(dict(settings=self.switchboard)) return context
def post(self, request, *args, **kwargs): switchboard = GamesSwitchboard() for s in switchboard.props(): val = request.POST.get(s.name, '') s.set_value(val) return redirect('games_home')
def post(self, request, *args, **kwargs): switchboard = GamesSwitchboard() for s in switchboard.props(): val = request.POST.get(s.name, '') s.set_value(val) return redirect('games_home')