class based view (CreateView) with AJAXMixin
khaldon opened this issue · 5 comments
the error is This page isn’t working and HTTP ERROR 400 in the terminal show me Bad request
Hi @khaldon, I'll take a look at this class, meanwhile could you show me the whole errors trace?
Could you show me how this class definition looks like? For example, this is how I tried it:
django-ajax/tests/ajaxdecorator/app/views.py
Lines 26 to 29 in d5af47c
Are you accessing to this URI through a non-AJAX call?
By default it's mandatory, but you can make it optional by configuring ajax_mandatory
manually:
class CreatContact(AJAXMixin, CreateView):
# ...
ajax_mandatory = False
So this is not a bug, but a usage issue, thanks for reporting it, I'll try to update the docs to make it clear.
Thank you , that's work well. but I want to know how about dealing with Template and recieve or fetch data from model that automatic work or what will happen ?