Premium Coding Template
🔥 50% OFF

Premium Coding Template

$118$59

For discount contact: myfinancetech@gmail.com

How to run Django App on Android | Edit & Run

Updated at: 11 May 2025Deepak Painkra

To run a Django app on Android, install Termux from the Play Store. Now install Python, Django and Django REST framework packages, and you will be able to run your Django app on Android with the help of Termux.

If you wish to edit or run your Django app on Android, open the Temux app. Now, open it with the nano editor while running this command.

cd your_project_name

and

nano your_project_file_name

and

python manage.py makemigrations

and

python manage.py migrate

and

python manage.py runserver

Now start the server while running this command.

 

Termux Installation and Setup

After installing the packages, you must run this command to update your terminal.

apt update && apt upgrade

The installation has been finished. To update packages, we must first run this command using the Termux application.

Python packages must be installed to use the Django framework on Android. We must run this command to install Python packages.

pkg install python

After a successful installation, pip must be installed alongside Python for package installation. Now run this command,

pkg install python-pip

We can now use the Django Rest Framework and run Django on Android. Just enter this command.

pip install django

After that

pip install django-rest-frameworks

We must include this information in the setting.py file to use the rest framework.

'rest_framework',

All that is left to do is create the project. Enter the following command on Termux to create the project.

django-admin startproject my-app

Let's say my app is called "my-app" To continue, we must access this file and use the command

cd my-app (" your project name")

which will construct my app in the directory that you have chosen. The manage.py file in that directory will be visible once you are within the file name.

 

Starting a Django Project

Now you have to create your app by using this command

python manage.py startapp API

In my situation, I typed API as an illustration. Now your project will have a folder created. I'm using the Acode editor to edit this file; you can easily download it from the Google Play Store. Just launch the app right now and look for the path. Now, launch the application, then click "New Project" when prompted to choose the destination folder. Selecting the path will take you to the file manager; from there, choose Termux to see all the newly created files you can import and begin modifying your project.

Use this command to view the project in the browser.

python manage.py runserver

Now, the server will be running with this command. Put the IP link that appears on the Termux app at this point. And the browser will show that your server is successfully running.

We need to create a super user before continuing with the next steps to access the admin panel. Just pressing Ctrl+c will now terminate the server. Run these commands after that

python manage.py create superuser

Your email username and password will be required. Once this process is complete, launch the server once more by typing

python manage.py runserver

Go to the browser and type this URL,

http://localhost:3000/admin

You may now access the admin panel by visiting this URL. If you see the same internal server 500 problems as I do, paste that IP on different devices.

Support Us

Your support helps us continue our work. Please consider making a donation.

Donate with PayPal