How to surf static files for Django on C panel on a subdomain

Spread To Friends

Hi everyone,

How to surf static files for Django on C panel on a subdomain.

So without any further delay let’s get started. 

First of all if you are using the main domain, with your Django application then you can put your static files to the public_html folder so that your static files will be surfed. But when you are using your subdomain , with your Static and media files . It will not be going to work anymore. Then you need to change your static directory with the following directory: 

STATIC_URL = /static/

STATIC_ROOT = your username/your subdomain/static/

So when you put your static directory to your file as shown above then your static files and media files will be surfed. 

That was the problem which almost everyone faced while deploying Django application with Any subdomain on the C panel.

Thank You, 

From: Sayantan Biswas

Oval@3x 2

Don’t miss these updates!

We don’t spam! Read our privacy policy for more info.

Spread To Friends

Leave a Reply

Your email address will not be published. Required fields are marked *