Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,593 members, 7,809,149 topics. Date: Friday, 26 April 2024 at 01:25 AM

I Need Help In Django - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / I Need Help In Django (715 Views)

I Need Help Integrating DHL API In Django / Encountering This Error In Django: TypeError: 'module' Object Is Not Iterable / Computer Based Test (cbtest) In Django (opensource) (2) (3) (4)

(1) (Reply) (Go Down)

I Need Help In Django by selfemployed(m): 12:36pm On Aug 06, 2022
Any python Django programmer here?
Re: I Need Help In Django by jbreezy: 12:38pm On Aug 06, 2022
What do you need?
Re: I Need Help In Django by youngpresidooo: 5:52pm On Aug 06, 2022
selfemployed:
Any python Django programmer here?
yap
Re: I Need Help In Django by Runningwater(m): 11:56am On Aug 08, 2022
What you need?
Re: I Need Help In Django by selfemployed(m): 1:44pm On Aug 09, 2022
jbreezy:
What do you need?

I uploaded a django project to cpanel, but the static files are not working properly online. but it works fine offline.

here's the website: adaudu.com

Thank you

1 Like

Re: I Need Help In Django by jbreezy: 5:22pm On Aug 09, 2022
selfemployed:


I uploaded a django project to cpanel, but the static files are not working properly online. but it works fine offline.

here's the website: adaudu.com

Thank you
did you install Whitenoise?
Re: I Need Help In Django by selfemployed(m): 6:31pm On Aug 09, 2022
jbreezy:
did you install Whitenoise?

No Sir
Re: I Need Help In Django by Runningwater(m): 6:34pm On Aug 09, 2022
I wonder why you don't host your django website on Linux VPS from services like Amazon AWS, Digital Ocean, Linode, etc.
Re: I Need Help In Django by selfemployed(m): 7:27pm On Aug 09, 2022
Runningwater:
I wonder why you don't host your django website on Linux VPS from services like Amazon AWS, Digital Ocean, Linode, etc.

I'm still new to Django and learning.

1 Like

Re: I Need Help In Django by bedfordng(m): 7:40pm On Aug 09, 2022
First make sure you added the following to your settings py file and point it to the appropriate static directories.

STATIC_ROOT

STATIC_URL

MEDIA_ROOT

MEDIA_URL

STATICFILES_DIRS


when added, run the manage.py collectstatic command .

1 Like

Re: I Need Help In Django by Runningwater(m): 2:19pm On Aug 10, 2022
selfemployed:


I'm still new to Django and learning.


Okay... Django is best hosted on a Linux VPS when you have considered getting your django project online for Everyone to see. Their are video tutorials on how to do so on YouTube.

Their some exceptions to getting your django projects online though like using Heroku and pythonanywhere among others as they're free but with constraints.
Re: I Need Help In Django by selfemployed(m): 2:49pm On Aug 10, 2022
Thanks all

I've solved the problem

I moved the static files to public_html

Then used absolute link in STATIC_URL


STATIC_URL = "https://adaudu.com/static"
Re: I Need Help In Django by Mrviktor(m): 9:18am On Aug 13, 2022
selfemployed:
Thanks all

I've solved the problem

I moved the static files to public_html

Then used absolute link in STATIC_URL


STATIC_URL = "https://adaudu.com/static"

Your admin panel still has no CSS bro.

Try adding your domain name to allowed host in your settings.py

Nd why are u building a static website with django.. it's just a single page I can see there with one URL.

(1) (Reply)

Ps Help Me Choose! / Which Online Card Can Be Used to Purchase a Google Console Account / I Give Up, Am Not Doing Again?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 12
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.