Django - Login from Android

165 views
Skip to first unread message

Adrian Marshall

unread,
Aug 4, 2014, 6:18:23 PM8/4/14
to django...@googlegroups.com
I have a Django app up and running and It's more mobile based than a web app. I'm new to development with both Django and Android. I've setup an API using Django-Tasty pie and I can get JSON data from my models,including the user model that comes with Django. I've implemented logging in functions in the backend and tested it out. It works good like it's supposed to. Now I'm trying to see how to go about registering and logging in users from Android?

Russell Keith-Magee

unread,
Aug 5, 2014, 8:59:38 PM8/5/14
to Django Users
Hi Adrian,

Developing on a mobile is really no different than dealing with a web browser - the only difference is that *you* need to behave like the browser, instead of the browser handling all the details for you. 

Think about what a browser is actually doing when you click on links, log in, and so on. You click on a link, which causes the browser to make a HTTP request; the server gives you back a HTTP response, which it renders.

A mobile platform is no different, except that *you* need to do the "request" bit. So - you write code to issue a HTTP request (in response to a touch event, or whatever); you get back a response, and "display" it in some way.

Of course, a browser also handles things like cookies, so once you've logged in, you stay logged in; if you want to do the same thing on a mobile platform, you'll have to work out how your platform of choice (and the API you're using on your platform of choice) lets you manage such things.

It doesn't matter whether you're logging in, registering, or displaying a list of stuff - it's all just HTTP, appropriately by the "client". The fact that the client is a browser or an Android phone doesn't matter.

Yours,
Russ Magee %-)


On Tue, Aug 5, 2014 at 8:18 AM, Adrian Marshall <adria...@gmail.com> wrote:
I have a Django app up and running and It's more mobile based than a web app. I'm new to development with both Django and Android. I've setup an API using Django-Tasty pie and I can get JSON data from my models,including the user model that comes with Django. I've implemented logging in functions in the backend and tested it out. It works good like it's supposed to. Now I'm trying to see how to go about registering and logging in users from Android?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0549624b-79f2-4b0e-86e6-3685951f7a59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adrian Marshall

unread,
Aug 6, 2014, 2:47:12 AM8/6/14
to django...@googlegroups.com
Russ,

 Thanks a lot! I agree. Think I'm going to setup the API side of things with TastyPie and use Android/Java Api's to interact with the HTTP request/responses.
Reply all
Reply to author
Forward
0 new messages