示例#1
0
 def post(self, request, user):
     form = UserEditForm(request.POST, instance=user)
     return create_or_render(request, self.template_name, form)
示例#2
0
 def post(self, request, ad):
     form = AdForm(request.POST, instance=ad)
     return create_or_render(request, 'ads/show.html', form)
示例#3
0
 def post(self, request):
     return create_or_render(request, self.template_name, UserCreationForm)
示例#4
0
 def post(self, request):
     ad_with_author = Ad(author=request.user)
     form = AdForm(request.POST, instance=ad_with_author)
     return create_or_render(request, self.template_name, form)