[Flask] Flask Digest, Vol 3, Issue 4

Jim Icenhower jicenhower at yahoo.com
Thu Sep 3 14:34:13 CEST 2015


Thanks you Zeta. That solved it. Now I'm one step closer to my next question! I work in Java professionally and I'm really enjoying Python/Flask/Appbuilder. Thanks again! Jim
      From: "flask-request at python.org" <flask-request at python.org>
 To: flask at python.org 
 Sent: Thursday, September 3, 2015 5:00 AM
 Subject: Flask Digest, Vol 3, Issue 4
   
Send Flask mailing list submissions to
    flask at python.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://mail.python.org/mailman/listinfo/flask
or, via email, send a message with subject or body 'help' to
    flask-request at python.org

You can reach the person managing the list at
    flask-owner at python.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Flask digest..."


Today's Topics:

  1. Re: Flask-Security authentication in JS (Morgan Connolly)
  2.  Querying flask-appbuilder model using sqlalchemy (zeta)


----------------------------------------------------------------------

Message: 1
Date: Thu, 3 Sep 2015 12:25:50 +0530
From: Morgan Connolly <connollymorg at gmail.com>
To: Federico Delgado Doyle <fededelgado at outlook.com>
Cc: "flask at python.org" <flask at python.org>
Subject: Re: [Flask] Flask-Security authentication in JS
Message-ID:
    <CAGOUAfYur7=-u1Tj+CXdvWhrG-wW9Ks_3kEzj5EXzJZsj-AmOg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hey!

Thanks so much Corey, Scott, Christophe and Federico. I didn't know that
the browser would transmit cookies even if I used JavaScript, having never
worked on a dynamic website before. I just tried adding the JavaScript, and
without having to do any other work, it works how I want it to.

Once again, thank you all for your help!

Cheers



On Thu, Sep 3, 2015 at 4:58 AM, Federico Delgado Doyle <
fededelgado at outlook.com> wrote:

> Hi Morgan,
>
> I don't know about Flask-Security. But cookies should transmit regardless
> if the browser sent a post or get  or a javascript http request caused it.
>
> Have you actually seen that the cookie is not traveling when using jquery
> ajax or whatever you use?
>
> Cheers,
>
> Federico
>
> ------------------------------
> Date: Wed, 2 Sep 2015 17:40:31 +0530
> From: connollymorg at gmail.com
> To: flask at python.org
> Subject: [Flask] Flask-Security authentication in JS
>
>
> I have a Flask app that uses Flask-Security for authentication, which is
> storing authentication details in cookies on the client side. Currently, it
> is a static app rendered using Jinja templates, but now I want to implement
> some features which require access to protected resources dynamically via
> JavaScript.
>
> If I send a request using JavaScript to a URL, the cookies won't be
> transmitted. If I want to transmit the username/password with each request,
> I will have to pass it to Jinja in cleartext.
>
> I'm at a total loss here, and I do not know what to do. Can somebody point
> me in the right direction?
>
> Cheers
>
> _______________________________________________ Flask mailing list
> Flask at python.org https://mail.python.org/mailman/listinfo/flask
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20150903/8d0cf73f/attachment-0001.html>

------------------------------

Message: 2
Date: Thu, 03 Sep 2015 12:56:10 +0300
From: zeta <hunter at zeta.pm>
To: flask at python.org
Subject: [Flask]  Querying flask-appbuilder model using sqlalchemy
Message-ID: <f31ccd8ff7f6688383a38f2c21d7fed8 at zeta.pm>
Content-Type: text/plain; charset="us-ascii"

 

I think your issue is caused by: 

 > db.session.query(Event).query.all() 

Try:

db.session.query(Event).all()

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20150903/7d27e733/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Flask mailing list
Flask at python.org
https://mail.python.org/mailman/listinfo/flask


------------------------------

End of Flask Digest, Vol 3, Issue 4
***********************************


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20150903/3d7c977f/attachment.html>


More information about the Flask mailing list