Are you learning Django? But, you don’t have a PC or laptop. You can still run Django on Android phone.
In this tutorial, I will show you How to run Django on Android. So, stick with the tutorial to the end and follow the steps carefully.
How to Run Django on Android?
To run Django on Android, follow these steps:
- Install Termux from Google Play Store
- Launch Termux on Android device
- Setup Termux storage with termux-setup-storage command
- Allow storage permission for Termux
- Install python with pkg install python command
- Make a directory for Django project – mkdir djangowebsite
- Change directory to djangowebsite – cd djangowebsite
- Create another folder named djangosite (or whatever you want)
- Install virtualenv to create virtual environment – pip install virtualenv
- Create virtual environment – virtualenv venv
- Activate virtual environment – . venv/bin/activate
- Install django – pip install django
- Create a django project using django-admin utility – django-admin startproject djangosite
- Migrate the apps – python manage.py migrate
- Run the django project on Android – python manage.py runserver
Now, you successfully run Django on Android. You can read our Termux basic commands guide for a better understanding of the commands we used here.
Follow us on Twitter for the latest news and updates regarding Android and Google. Thanks for reading.