예제 #1
0
파일: views.py 프로젝트: anaion/wouso
def games(request):
    switchboard = GamesSwitchboard()

    if request.method == "POST":
        for group in (switchboard,):
            for s in group.props():
                val = request.POST.get(s.name, '')
                s.set_value(val)

    return render_to_response('cpanel/customization.html',
                              {'settings': (switchboard,),
                               'module': 'games'},
                              context_instance=RequestContext(request))
예제 #2
0
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
예제 #3
0
파일: views.py 프로젝트: Ionut1994/wouso
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
예제 #4
0
파일: views.py 프로젝트: narcisaam/wouso
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
예제 #5
0
 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')
예제 #6
0
 def dispatch(self, request, *args, **kwargs):
     self.switchboard = GamesSwitchboard()
     return super(GamesView, self).dispatch(request, *args, **kwargs)
예제 #7
0
 def get_context_data(self, **kwargs):
     context = super(GamesView, self).get_context_data(**kwargs)
     switchboard = GamesSwitchboard()
     context.update(dict(settings=(switchboard, )))
     return context
예제 #8
0
파일: views.py 프로젝트: Ionut1994/wouso
 def __init__(self, **kwargs):
     super(GamesView, self).__init__(**kwargs)
     self.switchboard = GamesSwitchboard()
예제 #9
0
파일: views.py 프로젝트: narcisaam/wouso
 def __init__(self, **kwargs):
     super(GamesView, self).__init__(**kwargs)
     self.switchboard = GamesSwitchboard()