Fast solution:
In Javascritp you can do this:
element = document.getElementById("myinput");
window.open("http://127.0.0.1:8000/consulta/?consulta="+element.value,
"MsgWindow", "width=200, height=100");
but continue reading
Are you use ajax?
If the answer is not, then see https://github
Hi,
I have the following problem:
I need to set up a form, that when the OK button is clicked, it passes a
parameter and open a modal with the result.
Today the query works as follows:
http://127.0.0.1:8000/consulta/?consulta=31
The 31 is the parameter.
return:
Operadora Tip
The issue is almost resolved. The only problem now I am facing is when I
include login function which provides form with csrf token. The bootstrap
modal forms dissappear immediately after is comes on screen. If I do not
include this url using data-remote option the modal comes. But without csrf
i am using attribute to call modal popup. Should I use JS and try. I would
give a try and let you know.
Thanks in advance,
Sarfaraz Ahmed
On Sat, Jun 28, 2014 at 6:09 AM, Mario Gudelj
wrote:
> Sounds like you have a js issue now. Have a look inside chrome console for
> any errors and fix them.
Sounds like you have a js issue now. Have a look inside chrome console for
any errors and fix them. Modal not coming up wouldn't be a django issue.
On 28/06/2014 5:41 am, "sarfaraz ahmed" wrote:
> Hello,
>
> You were absolutely right.. the function was wrong. Please help me sort
> out that.. as t
Hello,
You were absolutely right.. the function was wrong. Please help me sort out
that.. as this your suggestion took me one step close to fix this issue.
Now the scenario is like this
*views.py *has this function to render my login.html
--
@csrf_protect
d
Hello Roman,
Thanks for response. Tried what you suggested me. The modal does not even
pop up if I used the code mentioned in your reply.
Regards,
Sarfaraz Ahmed
On Fri, Jun 27, 2014 at 12:09 PM, Roman Klesel
wrote:
> I think the view function is wrong.
>
> This should do:
>
> from django.vie
I think the view function is wrong.
This should do:
from django.views.decorators.csrf import csrf_protect
from django.shortcuts impor render
@csrf_protect
def login(request):
return render(request, 'login.html')
2014-06-27 6:03 GMT+02:00 sarfaraz ahmed :
> Hello
>
> I am new to django I am
Hello
I am new to django I am trying to use modal (bootstrap) for embed by login
form. I am using the following error. I have mentioned my code below and
tried lot of googling... still no use.
Help
Reason given for failure:
CSRF token missing or incorrect.
Here is code in view.py
9 matches
Mail list logo