In this tutorial I will show you how to create superuser in django project hosted in cPanel without terminal & SSH feature.
Create a file CreateSuperUser.py and paste the below code on it.
CreateSuperUser.py:
import subprocess try: subprocess.check_call( 'echo "from django.contrib.auth.models import User; ' 'User.objects.create_superuser(\'admin\', \'admin@example.com\', \'password\')" | ' 'python manage.py shell', shell=True ) print("Superuser created successfully") except subprocess.CalledProcessError as e: print(f"Error creating superuser: {e}")
Copy the file location and paste in the textbox and execute the script.

Video Guide:[Create SuperUser in django project without terminal & SSH Access]
Post your comments / questions
Recent Article
- How to get domain name information from a Domain using Python
- ModulenotFoundError: no module named 'debug_toolbar' -SOLUTION
- CSS & images not loading in django admin | cpanel without terminal
- Could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects
- How to sell domain name on Godaddy (2023)
- TemplateSyntaxError at / Could not parse the remainder: ' + 1' from 'forloop.counter0 + 1'
- urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0
- CommandError- Conflicting migrations detected multiple leaf nodes in the migration graph
Related Article