Questions tagged [django-staticfiles]
A Django app that provides helpers for serving static files.
0
votes
0answers
3 views
Loading Django static content from S3 giving “Unsafe attempt to load URL. Domains, protocols and ports must match.”
I have my static files on S3, and when a JS script tries to load a JS library I'm using:
Unsafe attempt to load URL <URL> from frame with URL <URL>.
Domains, protocols and ports must ...
0
votes
0answers
5 views
Django static url with # in filename
Im part of a large project and im having issues retrieving from any static file with a '#' in the file name. Django cuts off the url at the '#' and therefore cant find my items:
This works:
path : ...
0
votes
0answers
17 views
Django : Images not shown on template on using media_root under static_cdn
My settings.py file contains the following:
STATIC_URL = '/static/'
STATICFILES_DIR = os.path.join(BASE_DIR,'static_blog')
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR),'static_cdn','...
1
vote
2answers
31 views
Why doesen't css file apply on html file - Django
I have a problem that my .css file doesn't apply on my .html file in Django. But when I, for example, type . some class name from the .html file, pycharm offers me to finish the class name. So, I ...
0
votes
0answers
18 views
Style.css sometimes works and sometime does not in django
So I am writing some simple web app, the project is here https://github.com/Aquakor/django-web-app.
The problem is whenever I load index page style.css does not apply styles. In the console there is ...
0
votes
1answer
30 views
Django static files giving 404 error after production in Microsoft Azure
My settings.py consist the following code:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = False
STATIC_URL = '/static/'
STATIC_ROOT = 'D:/home/site/wwwroot/static'
...
-1
votes
0answers
6 views
Can't upload new media files in django app from apache in production
I have made my site, I followed all the steps for deployment. But when I go the admin page and try to add some new elements (these elements get an image field), I get a server error 500. Even when I ...
0
votes
1answer
34 views
display images through javascript
I am working on quiz project using Django where I have to show an image on 5 different questions, handled by javascript. But somehow the images are not being shown:
Here is code in js file:
if(...
0
votes
0answers
27 views
Django static files in production not loaded
I have a problem with static files in my Django application.
I create a simple blog app with Django REST Framework and Angular 6. It's working fine in my local development environment, but I have a ...
0
votes
2answers
48 views
Django not serving media files when DEBUG is turned to False
Django is not serving my media files when DEBUG = False.
Here is my code:
DEBUG = False
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATIC_ROOT = os.path....
0
votes
2answers
41 views
Django not importing CSS
I cannot get the CSS to appear when I refresh the page nor when I turn the server off and then restart it.
{% load staticfiles %}
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>...
0
votes
1answer
21 views
django-cms_text_ckeditor error of static loading with Amazon S3 static storage
After deploying django + django-cms project on server using amazon S3 (STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
), static files not loading for django-cms_text_ckeditor, ...
0
votes
1answer
19 views
Django is applying background color , but not apllying background image from style.css
I run my django project with uwsgi.
It reads style.css file in statics/css .
There are two areas in style.css
It applies 1st area, but it does not apply 2nd area to the page.
and
1) #skin-blur-...
0
votes
0answers
17 views
Django: collectstatic raises OSError: [Errno 39] Directory not empty: (ckeditor)
Suddenly, I can't do collectstatic.
python manage.py collectstatic
Type 'yes' to continue, or 'no' to cancel: yes
Found another file with the destination path 'admin/js/jquery.init.js'. It will be ...
0
votes
1answer
32 views
Django/Nginx 403 Error on new static files
Can't figure out why, but after collecting new static files (collectstatic), nginx throws 403 Error.
New files have different permissions from old static files.
-rw-rw-r-- 1 django django 115206 ...
0
votes
1answer
30 views
Django is searching wrong statics directory
When i run django on uwsgi with;
uwsgi --http :8081 --module proj1.wsgi
It gives below error when i open start page from browser:
Not Found: /accounts/login/static/css/style.css
But my ...
1
vote
1answer
45 views
ngnix - django 2 -angular 6 / angular routing get 404 after reload page
its django and angular 6(use static file) project . i get 404 not found error when i refresh browser .. i had few search and according this answer i did same thing this time angular route in refresh ...
1
vote
1answer
17 views
Django Heroku Deploy: OSError: [Errno 2] No Such file or directory: '/app/{appname}/assets'
I've found similar questions but they were from years ago and the solutions haven't worked so far.
Here's the traceback:
(devtm) λ heroku run python manage.py collectstatic
Running python manage.py ...
0
votes
1answer
41 views
django angular load static files - image in assets folder get 404
i have a assets/image folder in angular src folder and i left all of my images there, i have many component and child component that are using that images like <img src"../../../assets/image/test....
0
votes
1answer
83 views
Django how to go about using npm modules with static/ templates
I have recently added npm to my project in order to keep better track of my js dependencies. Previously I have just been git cloning to my static/vendor folder.
I've also added gulp , but have only ...
0
votes
0answers
30 views
Unable to serve static files correctly in Django app again
A couple of weeks ago I tried to install a django application in google cloud VM (Ubuntu 16.04). As I described in this post, I had issues serving the static files correctly in Django app.
For some ...
2
votes
1answer
37 views
django-rest and angular nginx load static image issue
hi im trying to load my angular app with nginx everything work except static image that are part of template (product image that are saved in upload folder are ok)
this is the related code of ...
0
votes
0answers
25 views
Django Deploy Root Url setting
Question 1,
When I deploy my website to cloud. I have to set Debug=False.
But just index view can load the statics, other views always load sub dir static.
I check the uwsgi log. Message as follow:
[...
0
votes
1answer
25 views
How to use background-image css property with Django static files
I know similar questions have been answered but there are no clear answers for how to do this in a linked css file, all suggest doing directly in the html file itself I have a Jobs project, with the ...
0
votes
0answers
119 views
django ValueError: Missing staticfiles manifest entry for 'inline.bundle.js' runserver
when I run python manage.py runserver
and I try to visit my site on my local I get the following error:
File "/home/rickus/Documents/softwareProjects/211hospitality/suitsandtables/backend/...
0
votes
0answers
25 views
Why is my website not picking up changes to staticfiles?
I am making changes to content in the staticfiles folder after python manage.py collectstatic was invoked in a development environment. The website showing the content does not show the changes (to ...
0
votes
0answers
39 views
Pyinstaller compiles but 404 error on Django Static javascript files
I've managed to get my applications to compile, but anytime it references a static file I receive a 404 error on my javascript files. I verified they do exist in the dist application.
My application ...
0
votes
2answers
48 views
Unable to serve static files correctly in Django app
I have installed in googlecloud VM (Ubuntu 16.04) a django application (1.8.19) with a static IP but when I access the page I am not able to load correctly all the static files (css, jquery etc.).
...
0
votes
0answers
10 views
How to read Django static files from Cloud Buckets
I'm trying to get GAE to read static files from the Google Cloud Storage bucket, in particular, I want to load a keras model.
In my settings.py, I have:
STATIC_URL = 'https://path_to_gcs_bucket/...
1
vote
1answer
193 views
Django doesn't load static files ValueError(“Missing staticfiles manifest entry for '%s'” % clean_name)
is my first app in Django and I am trying to prepare my Django (2.0) application for production, but I am unable to make the static files load properly using WhiteNoise
I keep having all the time the ...
0
votes
1answer
15 views
Do I need to use 'load static' twice on overall layout and header in Django?
I'm on a project in Django, and the problem is like this.
My site have a overall layout like 'layout.html' which includes some static files, links in and 'header.html' including navigator, 'footer....
1
vote
1answer
60 views
Digital Ocean, Django and Nginx not finding all static files
I have tried a lot of different things but all of the solutions I found are not helping.
I putting my corporate site on a digitalocean site on ubuntu 16.04 by following the digitalocean directions (...
0
votes
1answer
46 views
Compilation problems with django static precompiler
I am trying to compile my scss file and this is the error I have :
Exception Value: relation "static_precompiler_dependency" does not exist
Here is what is in my html head :
<link rel="...
2
votes
2answers
45 views
Not able to refer static files of Django project from Heroku
I am unable to load static files in production, whereas they work on local machine.
I have followed the steps in https://devcenter.heroku.com/articles/django-assets
as well as the existing answers ...
1
vote
1answer
33 views
Correctly accessing django static files from external javascript
I've got a django application using AngularJS with a bunch of JavaScript and template files.
In my django template I can use the {% static %} tag to properly reference those files like so:
<...
2
votes
3answers
41 views
New to Django. Tried looking at tutorials on how to load css files and not working
The website I see when I run the server has not CSS in it, but just the HTML. So far I read that you keep CSS files in a static folder under the project directory. I have an Html template that is in ...
0
votes
1answer
116 views
open() “/root/project/static/*.css” failed (13: Permission denied) nginx
I have gotta my project setup with uwsgi, django, nginx Everything seems to be working fine but somehow I keep on getting the error on getting static files I have been reading through online and ...
0
votes
1answer
47 views
Django 1.11 + Amazon S3 for collectstatic
I just tried serving my static files in production using Amazon S3 on eu-central-1. I'm using Elastic Beanstalk and Django 1.11. Furthermore I use boto3 and the package Django Storages for it. My ...
0
votes
1answer
74 views
Configure AWS S3 bucket for Django static files with Terraform
I'm new to Terraform.
I'm trying to configure S3 bucket to serve Django static files.
There should be unrestricted access for HTTP GET requests for these static files but there should also be AWS ...
0
votes
3answers
79 views
Static files on Django + Apache2 gives URLconf error
I am trying to integrate a downlaoded bootstrap theme into my live website
I have a /static directory at the root level of the django project (where manage.py resides) which contains all of my css/...
0
votes
1answer
36 views
Django serving static html file with javascript
I have an odd case where I'm trying to serve a static index.html file that holds a javascript bundle from webpack in it for vue.js files, but it is sending the incorrect javascript file contents.
I'...
1
vote
1answer
113 views
Django whitenoise drawback
There are many article describing the pros of using whitenoise instead of other configuration for serving static files. But the information about it's cons is kind of hard to find
Is there any cons ...
0
votes
2answers
24 views
Trying to get image from static folder Django
I'm trying to display an image located in my static directory. Here is my code :
My directories
My static settings
And finally, my template
0
votes
0answers
35 views
Static file changes are not reflected on browser refresh
I'm new to Django and trying to figure out why the changes in static css and js files are not picked up by the browser.
Only after I run python manage.py collectstatic followed by restarting the ...
0
votes
2answers
45 views
Django+Nginx gives 404 while serving static files
Whenever I load my site it gives me a 404 error while loading the images and css.
My nginx config:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/...
0
votes
0answers
14 views
Django + MkDocs staticfile serving
I am writing a Django application that wraps a MkDocs project. I am able to get the MkDocs to serve using Django's built in staticfiles directory, however, I wanted to use Amazon S3 buckets to serve ...
0
votes
2answers
30 views
How to load an image file into a Django File object, then save into a FileField of my model
So I've spent more than 24 hours trying to figure out how to store an image into my model.
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=...
0
votes
1answer
68 views
Django2.0 Collectstatic and Admin Issue
I'm deploying my Django web application into my new server in order to set production application.
After 2 days in order to config Apache2 and wsgi, I'm getting a new issue according to static files ...
0
votes
1answer
282 views
Django Model: ValueError: Missing staticfiles manifest entry for “file_name.ext”
Before you mark it as duplicate, I have read ValueError: Missing staticfiles manifest entry for 'favicon.ico'
, and it does not solve my problem.
I have the following model:
from django.contrib....
0
votes
0answers
23 views
How is CACHE being populated for django static files?
I see this, not tracked by git:
» tree myapp/deploy_static/CACHE/
myapp/deploy_static/CACHE/
├── css
│ ├── 9845305ef067.css
│ └── e1296b6ea873.css
└── js
├── 31da978add15.js
└── ...