There was a problem loading the comments.

Installation of Python Django in cPanel

Support Portal  »  Knowledgebase  »  Viewing Article

  • 16 July 2020 11:12 PM

1. Log in to the cPanel control panel

2. In the Software section, select “Setup Python App

3. Select Create Application to create a Python application

4. Select the desired Python version from the drop-down list. We have 2.7, 3.3, 3.4, 3.5, 3.6 Python versions on hosting.

5. Select the Application root, Application URL, Passenger log file.

6. Click the “CREATE” button, wait until the installation is complete.

7. After installation, confirm whether the Python application is installed successfully by accessing the URL.

8. Copy the command and run it in a terminal to enter a virtual environment.

cabac5702cfb8b3e1298ada4ecf8b947d47103d6?t=2f62a7b77de9e1fc60b300c503e063c0 86c2db861443706b54dfb4d75afb98e50b26190c?t=3740b0adf68178b7761b545ad5397834
9. Now install Django using the command

pip install django

10. Start the project

django-admin startproject project .

11. Open File Manager and edit from your newweb folder/project installation folder

12. Remove all the content from file and update following and save the file

from project.wsgi import application

13.  From project folder edit

14. Find and update the allowed host values in file with your domain name or application URL.


15. Add the following code at bottom of file for media and application path.  Remove cpuser in the below path and enter your cPanel username.

16. Create assets folder in application root (For e.g. newweb)
17. Create a media folder under public_html
18. execute the following command from a terminal

python collectstatic
19. Restart the Python application from setup python app in cPanel.

The Django application is successfully installed.

Share via
Did you find this article useful?  

Related Articles

Self-Hosted Help Desk Software by SupportPal
© Glosting