if you are new to django then this problem occure often in forms and you messed up that problem didn't get resolved even if you use this Tag in form and use RequestContext instead of Context. So here is a simple soultion to overcome such issue:
Place tag {% csrf_token %} in form and go to views.py and import csrf using
from django.core.context_processors import csrf
Now when creating normal context like
c = Context({"frm":frm})
after this update Context using csrf
c.update(csrf(request))
Now this issue is resolved.
best of luck
Place tag {% csrf_token %} in form and go to views.py and import csrf using
from django.core.context_processors import csrf
Now when creating normal context like
c = Context({"frm":frm})
after this update Context using csrf
c.update(csrf(request))
Now this issue is resolved.
best of luck
No comments:
Post a Comment