[Flask] Anything I need to know using Jquery with Flask?
Alex Hall
ahall at autodist.com
Fri May 27 17:27:16 EDT 2016
On Fri, May 27, 2016 at 5:21 PM, Anthony Ford <ford.anthonyj at gmail.com>
wrote:
> Are you getting an error in your JS console or in the Werkzeug debugger?
> The web console. That's why I knew this would be a very long shot. The
> only thing that comes close is a missing CSRF token in the Nginx log after
> a certain Jquery selector runs. It tries to disable certain elements of a
> form, and I suspect it disables the hidden ones. But everything else is
> browser side.
> In general, there is very little you need to use jQuery, since it runs
> client-side in the browser. jQuery shouldn't even be able to tell you are
> running Flask vs your bog-standard HTTP server or PHP or whatever.
>
> Exactly, but I wasn't sure where else to ask. The only other thing I can
think of is that, because of the way my templates are set up, the script is
in the body of the page and not the head. But that shouldn't matter.
> There are a few oddball things you may need to treat differently if you
> use jQuery to submit AJAX or JSON requests, but that shouldn't affect UI
> things like onChange events and the like.
>
I've actually been using Ajax successfully for weeks--Flask made that very
easy to set up, and I was able to write the backend in Python. I love doing
that. :)
>
>
>
> Anthony Ford,
> KF5IBN,
> ford.anthonyj at gmail.com
>
> On Fri, May 27, 2016 at 3:15 PM, Alex Hall <ahall at autodist.com> wrote:
>
>> I know this is an odd question, and I probably know the answer. But I'm
>> running into some really odd problems with Jquery, problems I can't find
>> anyone else having online. All I can think of is that there's something
>> with Flask, or Jinja, or something in those packages that means I have to
>> do something differently.
>>
>> Mostly, things work fine. But onChange for a select list won't fire
>> correctly, and I'm getting a very obscure error when I try to use a certain
>> selector. Yet, mostly, I have no problems at all.
>>
>> This isn't a Jquery list, so I won't post details here. If there's any
>> way that Flask might cause Jquery to go all funny, though, that would be
>> great to know. Again, I very much doubt this is the case, but I don't know
>> what else to try. Thanks in advance, and thanks for putting up with this
>> off-the-wall question.
>>
>> --
>> Alex Hall
>> Automatic Distributors, IT department
>> ahall at autodist.com
>>
>> _______________________________________________
>> Flask mailing list
>> Flask at python.org
>> https://mail.python.org/mailman/listinfo/flask
>>
>>
>
--
Alex Hall
Automatic Distributors, IT department
ahall at autodist.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20160527/bbe8ff6c/attachment.html>
More information about the Flask
mailing list