Re: Django Static Files Not Loading After EC2 Deployment with Nginx

2024-09-01 Thread Jayesh Bafna
Look into whitenoise if you want to serve it from ec2 / Django-storages if from s3+ CloudFront directly. If you're using docker you might need to mount the staticfiles path on the container. On Thu, 29 Aug 2024, 22:05 Kiran Barai, wrote: > Hello everyone, > > >1. I’m having trouble with my

Re: Django Static Files Not Loading After EC2 Deployment with Nginx

2024-08-29 Thread Abdul Qoyyuum Haji Abdul Kadir (Agent Q)
Did you set up your STATIC_ROOT and do collectstatic? How to manage static files (e.g. images, JavaScript, CSS) | Django documentation | Django (djangoproject.com) On Friday 30 August 2024 at 04:06:41 UTC+8 Kiran Barai wrot

Django Static Files Not Loading After EC2 Deployment with Nginx

2024-08-29 Thread Kiran Barai
Hello everyone, 1. I’m having trouble with my Django project after deploying it on an EC2 instance. The issue is that my static files (CSS, JavaScript) are not loading correctly. 2. second issues in URL: - issue with a Django project where the URL generated using the {% url %

Re: Static Files not Loading

2014-07-30 Thread marc
Hi, STATIC_PATH should be STATIC_ROOT. Cheers Am Mittwoch, 30. Juli 2014 17:10:17 UTC+2 schrieb Steven Williams: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > I just asked around on IRC and no one was able to help me. Also the > entries on StackOverflow are not that helpful

Static Files not Loading

2014-07-30 Thread Steven Williams
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I just asked around on IRC and no one was able to help me. Also the entries on StackOverflow are not that helpful in my situation either. Right now I am unable to access my static content in my project. Going to 127.0.0.1:8000/static/rango.jpg yi

Re: Static files not loading when debug is false

2012-09-10 Thread Jani Tiainen
As I put in my second post. Static serving is not working (by default) when you turn debugging off unless you provide --insecure option on manage.py runserver command. That is by design. Though with you should see improperly configured exception raised if you try to use forcefully static serving vi

Re: Static files not loading when debug is false

2012-09-10 Thread Karambir Singh Nain
Yeah. during, debug=true, it is serving fine from static_root. But not when debug is false. On Monday, September 10, 2012 2:01:03 AM UTC+5:30, Jani Tiainen wrote: > > I suppose that your frontend webserver is serving files from url /static/ > from path that STATIC_ROOT points to? > > On Sun, Sep

Re: Static files not loading when debug is false

2012-09-10 Thread e.generalov
There is another case - tests. The TestCase forces DEBUG=False, therefore staticfiles application, included to the project in accordance with the documentation, works in the development server, but unexpectedly does't serve static in test scenarios. Why the serving static files in the developme

Re: Static files not loading when debug is false

2012-09-09 Thread Stephen Anto
Hi Singh, I have configured static file for my projects as follows. In settings.py import os PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') MEDIA_URL = '/site_media/' STATIC_ROOT = '' # URL prefix for static files. # Example: "http://m

Re: Static files not loading when debug is false

2012-09-09 Thread Jani Tiainen
Also just a note, if you're using manage.py runserver without debug = TRUE setting, static file serving is not taking place. you can use --insecure option to mark that you really want to do staticfile serving still from django. https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#django-

Re: Static files not loading when debug is false

2012-09-09 Thread Jani Tiainen
I suppose that your frontend webserver is serving files from url /static/ from path that STATIC_ROOT points to? On Sun, Sep 9, 2012 at 10:23 PM, Karambir Singh Nain wrote: > I have a fairly simple django project having some views, templates and > static files like css and images. My settings fil

Static files not loading when debug is false

2012-09-09 Thread Karambir Singh Nain
I have a fairly simple django project having some views, templates and static files like css and images. My settings file include : STATIC_ROOT = '/home/karambir/Codes/projects/cdi/cdi/static' STATIC_URL = '/static/' STATICFILES_DIRS = ( '/home/karambir/Codes/projects/cdi/cdi/data', ) TEMPL