Exemplo n.º 1
0
 def get(self, request, *args, **kwargs):
     form = forms.HelloForm(request.GET or None)
     d = {
         'form': form,
         'message': message,
     }
     context = super(WorkerListView, self).get_context_data(**kwargs)
     return render(self.request, self.template_name, context)
 def get(self, request, *args, **kwargs):
     form = forms.HelloForm(request.GET or None)
     # if form.is_valid():
     #     message = 'データ検証に成功しました'
     # else:
     #     message = 'データ検証に失敗しました'
     d = {
         'form': form,  #
         # 'message': message,
     }
     context = super(WorkerListView, self).get_context_data(**kwargs)
     return render(request, 'forms.html', d)
Exemplo n.º 3
0
 def get(self, request, *args, **kwargs):
     form = forms.HelloForm(request.GET or None)
     if form.is_valid():
         message = 'データ検証に成功しました'
     else:
         message = 'データ検証に失敗しました'
     d = {
         'form': form,
         'message': message,
     }
     context = super(WorkerListView, self).get_context_data(**kwargs)
     return render(self.request, self.template_name, context, d)
Exemplo n.º 4
0
 def get(self, request, *args, **kwargs):
     form = forms.HelloForm(request.GET or None)
     print str(form)
     context = super(WorkerListView, self).get_context_data(**kwargs)
     return render(self.request, self.template_name, context)