Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python + Django on Android

I am a Django developer and wanted to know if anyone has any idea of the possibilities of installing and developing on Django using an Android tablet such as the nexus 7. This seems like a reasonably powerful device, can be hooked up with a bluetooth keyboard, and has linux at the core of the OS.

So - is it possible to install Python and Django (or even Flask) on Android?

like image 729
Darwin Tech Avatar asked Nov 18 '12 21:11

Darwin Tech


3 Answers

Yeah! its posible!, but you need install termux terminal on Android and later open the termux terminal and write:

apt-update
apt-install python
pip install django
django-admin startproject demo
cd demo
python manage.py runserver 0.0.0.0:8000

and its all, open localhost:8000 on your browser, see the picture:

enter image description here

like image 103
Roberth Solís Avatar answered Nov 02 '22 00:11

Roberth Solís


We're developing PythonAnywhere to fill just this kind of niche. We tuned it to work with the iPad first. But it seems that the Nexus 7 is popular enough now that there might be enough demand to do the same thing for Android.

like image 23
aychedee Avatar answered Nov 02 '22 01:11

aychedee


SL4A is a ridiculously excellent library/sdk/app for android and gives you a way to install a number of language/scripting runtimes and a thin veneer for accessing android functionality via the scripting frameworks.

It so happens that Python is an option, and I've used it with cherrypy (python framework) on Android. I haven't tried it with flask or Django but with some work it should be possible.

The app provides a way to download python, install it, and then a way to launch a python console or even just run python scripts.

http://code.google.com/p/android-scripting/

There was a downside to the python support originally, due to a silly bug/limitation in the Android SDK. This restricted the use of apk assets with _ underscore in the name. The details are faint in my mind, but I am subscribed to the issue in Android so I can follow up with the details about this issue. This would present a problem with many of the python frameworks, as underscores are part of python style.

like image 4
truedat101 Avatar answered Nov 01 '22 23:11

truedat101