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
- Fix-Gradient effect turning to gray in after effects
- How to blur an image in python?
- ModuleNotFoundError: No module named 'whois' in Python GoviralHost Without Terminal
- How to Convert Image to Pencil Sketch in Python?
- AttributeError: module 'urllib' has no attribute 'request' - Python
- How to Extract audio from video files using python?
- PermissionError: [Errno 13] Permission denied: 'shampoo_sales.csv' - Python
- [WinError 145] The directory is not empty: 'FolderPath' - Python
Related Article