15đź‘Ť
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:
12đź‘Ť
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.
4đź‘Ť
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.
3đź‘Ť
One good way to accomplish a django development environment on a Nexus7 is to install a linux distro with a package manager alongside Android. Debian Kit hooks into the existing Android directories with symlinks instead of a chroot environment.
With that you can install Debian or Ubuntu and use apt-get and pip to install git, virtualenv, and all the packages and libraries you need to set up your development environment as you would on a desktop. You can write your code in DroidEdit, run the django development server in an Android terminal through ssh to localhost, and test your app right there in the browser on Android.
- Django – Override admin site's login form
- Annotate django query if filtered row exists in second table
- Django unable to load test fixtures, IntegrityError
- Django : Formset as form field
- Django makemigrations and migrate on heroku server don't create tables
2đź‘Ť
Do you want this? :
p.s: I confess that article’s original source is me. But isn’t it nice? 🙂
- Can I create model in Django without automatic ID?
- How can I insert parameters in raw SQL in Django Python
- Django template indentation guideline
- In Django, how can I get an exception's message?
- How to install pygments on Ubuntu?
- How to run a Django celery task every 6am and 6pm daily?
- Validation on query_params in Django Rest Framework
2đź‘Ť
I could run on my Tablet (android) and smartphone (android) following the procedure below:
- Install “GNUroot Debian” app;
- Open “GNUroot Debian” app;
-
Run these commands:
apt-get update apt-get install python3 apt-get install python3-setuptools easy_install3 pip pip install django django-admin startproject demo cd demo python manage.py runserver
- Testing apps.py in django
- How do I get union keys of `a` and `b` dictionary and 'a' values?
- How to make a rest_framework Serializer disallow superfluous fields?
- What is the best IDE setup for web development?
1đź‘Ť
Well if your end goal is to develop Web applications and host host them on your Android and since you had flask there why not give bottle.py a shot. It’s just one file that you copy into your sl4a scripts folder and voila. Bottle is minimalist and near similar to flask. No rooting or Unix environments required.
1đź‘Ť
Install termux terminal on Android and later open the termux terminal and write:
pkg install python
pip install django
django-admin startproject demo
vim demo/demo/settings.py
In settings.py
ALLOWED_HOSTS = ['*']
After save the settings.py and
python manage.py runserver 0.0.0.0:8000
and its all, open localhost:8000 on your browser
- Schedule number of web dynos by time of day
- Django Forms: Hidden model field?
- Django url patterns with 2 parameters
- Django how to reconnect after DatabaseError: query timeout
- Django migration relation does not exist
0đź‘Ť
If you are developing an android app and you don’t want to use Java, you might want to consider Kivy http://kivy.org/#home
If you are talking about having a web server running on Android and then running your django web app on that web server itself, there’s a duplicate answer here – Web Server for Android
- Removing the Label From Django's TextArea Widget
- How to create a 8 digit Unique ID in Python?
- How to return data with 403 error in Django Rest Framework?
- Convert unicode to datetime proper strptime format