Re: Using django login functionality in a non django app

2016-05-03 Thread Larry Martell
So I have been working on this and I think I am very close. I have a view /falcon_login/ and I have the @login_required decorator on it. It returns user info in JSON. In my Qt app I invoke /falcon_login/ and because the user is not logged in the django login page is brought up. After they login my

Re: Using django login functionality in a non django app

2016-04-27 Thread Avraham Serour
You can just use the session id, call it a token instead of cookie and be happy On Wed, Apr 27, 2016, 6:53 PM Gergely Polonkai wrote: > I would create a separate view for this, like /falcon_login/, which could > give you a plain text result. But that’s totally up to you. >

Re: Using django login functionality in a non django app

2016-04-27 Thread Gergely Polonkai
I would create a separate view for this, like /falcon_login/, which could give you a plain text result. But that’s totally up to you. Gergely Polonkai [image: https://]about.me/gergely.polonkai

Re: Using django login functionality in a non django app

2016-04-27 Thread Larry Martell
Well, not really. I have managed to invoke my django login screen from my Qt app, but after I log in, of course my django app comes up. What I would like is to pass in some parameter to the login screen (which is easy), and then have my django app detect that and after successfully or

Re: Using django login functionality in a non django app

2016-04-26 Thread Gergely Polonkai
That means you have to be able to do it via the API. The other solution is to pop up a web view for these tasks. However, we are moving out from Django field here, as this is getting more and more a falcon/UX-related question. Gergely Polonkai [image: https://]about.me/gergely.polonkai

Re: Using django login functionality in a non django app

2016-04-26 Thread Larry Martell
I need to support create user, change password, delete user and forgot password. On Tue, Apr 26, 2016 at 7:32 AM, Gergely Polonkai wrote: > > > That’s not a big issue if you really communicate with Django via a web-based > API. If the user can’t log in, you can simply

Re: Using django login functionality in a non django app

2016-04-26 Thread Gergely Polonkai
That’s not a big issue if you really communicate with Django via a web-based API. If the user can’t log in, you can simply redirect them to a web page. I don’t see the need for user admin functions, though. Gergely Polonkai [image: https://]about.me/gergely.polonkai

Re: Using django login functionality in a non django app

2016-04-26 Thread Larry Martell
Well, the issue with simply implementing auth, is that we'd need to not only implement login, which is easy, but also forgot password, and all the user admin functions. Since we have that already with django I want to leverage that and not reinvent the wheel. On Tue, Apr 26, 2016 at 2:29 AM,

Re: Using django login functionality in a non django app

2016-04-26 Thread Gergely Polonkai
Now I somewhat understand what falcon is, I suggest that you simply implement auth on you web app (it seems to me there is none or little right now. Of course, you don't have to protect all iour views, or you may want to display a different dataset, but that's another topic. When that is done,

Re: Using django login functionality in a non django app

2016-04-25 Thread Larry Martell
The Qt app talks to the server with web requests routed to python code by falcon. It currently has no authentication/authorization of any kind. It's not a web app, you can't just navigate to any page, you can only get to parts of the app the code lets you get to. The way I envision it (if

Re: Using django login functionality in a non django app

2016-04-25 Thread Gergely Polonkai
Hello, this all depends on how this Qt app communicates with the other end (server side). Does it offer *any* kind of authentication/authorization? If so, look for ways to integrate it with Django. If not, you are screwed anyway (from security point of view), because even if your app pops up a

Using django login functionality in a non django app

2016-04-25 Thread Larry Martell
We have an existing django app with login, change password, and forgot password functionality. Then we have this other app built with the falcon framework. The client side of that is C++/Qt. That app has no login functionality - you bring it up and you're in. We would like to somehow use the