Got this working. See below:
class CreateComment(MultipleObjectMixin, FormView):
template_name = 'comment/comment_list.html'
form_class = CommentForm
model = Comment
paginate_by = 5
def post(self, request, *args, **kwargs):
if not request.user.is_authenticated():
return HttpResponseForbidden()
se
This is what I am working from
btw:
https://docs.djangoproject.com/en/1.8/topics/class-based-views/mixins/#an-alternative-better-solution
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails
Following a form_invalid I need to redirect to the CreateComment view below
with the errors shown in the form. Is this possible please? Highlighted is
where I need help.
Thank you for any assistance.
class Comments(View):
def get(self, request, *args, **kwargs):
view = CreateComment.as_view()
3 matches
Mail list logo