I am running aws lambda.
It is deployed with zappa.
Lambda runs a django project.
Django uses django-storages lib to use S3 for storage and serving static files.
I run collectstatic successfully.
I see my admin page with fully loaded js and css.
Next day I come back and see plain html admin page without js and css loaded. I continue navigating through admin page and after some time css and js magically loads. I continue doing some work and css/js again dissapears and admin page becomes plain html again.
Anyone experiencing something similar? Any ideas of why is this happening?
EDIT:
Lambda is invoked through API Gateway
Related
I am attempting to deploy a webpage to github pages where the index.html file is not in the root directory, but in the templates folder. As a result, I keep getting a 404 error page whenever I try to access the url. how can I upload a webpage where the html file is not in the root of the project?
GitHub Pages is a fairly limited hosting service, although nice for what it does. Is there a particular reason why you can't simply move index.html to the root directory? I know these things can be a pain, but I believe the parser that GHP uses is pretty strict about this.
This is my first time ever on this platform, so please don't mind me if I am breaching any rules. I just finished building my first django project and I am using an amazon s3 bucket to serve media and static files. I have deployed the app onto heroku but static and media files are not being loaded. When I inspect the page, I see that it is throwing a 403 error. All the policies of my bucket have been set as prescribed in the documentation. below is a picture of my relevant setting.py
settings .py
I'm trying to deploy my Django application on github. Files have been uploaded successfully, the url works fine, but when I go the site https://qasim-khan1.github.io/blog/
It doesn't direct me to my landing page. It shows nothing, simply 'Blog' written in bold text.
I think you can not host Django app on GitHub, GitHub doesn't support hosting of dynamic site.
Just started using django compressor along with my AWS/Cloudfront setup on Heroku.
Having an issue on my local machine where the compressed CSS and JS files are not loading for the page and when i view the source (CSS Example)
It is showing as “Access Denied”
https://d3dycr1vdfv0cd.cloudfront.net/static/CACHE/css/50c1fe094e5d.css
I thought this might be a permissions issue on my S3 bucket and clicked on “Make Public” on my CSS folder in S3. But still no luck.
any ideas?
I am reformulating a previous question because I think it was formulated as a Python problem but it is a Django one.
I am installing a project from github called publicmarkup:
The main page displays on the browser but no media (neither js files, nor css files) are read loaded. There is a module called mediasync that seems to be necessary to display correctly the css and the js files of the templates.
I think this a configuration problem. Here's the link settings.py file, Here it could be find the root path of the media folder.
And here's the doc for the mediasync modulet explains how to configure static_url
But I didn't understand anything since I am a newbie to djnago
In Django you have to set up your own workstation serve static files, in both dev and live modes.
You can read about it here.
This explains how to serve static files in your dev environment.
In live mode you serve your static files directly via your end web server, usually either Apache or Nginx.