Questions tagged [django-staticfiles]

A Django app that provides helpers for serving static files.

django-staticfiles is a Django app that provides helpers for serving static files.

1241 questions
4
votes
3 answers

The directory '/static/' in the STATICFILES_DIRS setting does not exist. (Visual Studio)

When I want to "python manage.py makemigrations", it returns the following. System check identified some issues: WARNINGS ?: (staticfiles.W004) The directory '/static/' in the STATICFILES_DIRS setting does not exist. How should I solve this…
L K
  • 49
  • 1
  • 1
  • 2
4
votes
1 answer

Why isn't Django serving staticfiles in production?

I am wondering the reason why Django does not serve the statifiles in production, when DEGUB = False. STATICFILES_DIRS We specify STATICFILES_DIRS to tell Django where to look for staticfiles that are tied up to a specified app. STATIC_ROOT We…
4
votes
1 answer

Serving static files from private s3 in django

Is there a way to serve static files from private s3. i know there are plenty of tutorials (like https://simpleisbetterthancomplex.com/tutorial/2017/08/01/how-to-setup-amazon-s3-in-a-django-project.html) that help u in serving static files from…
Shrinidhi Hegde
  • 454
  • 3
  • 14
4
votes
1 answer

Django channels error when attempting to serve static files with devserver

I moved my project into another environment and after installing the dependencies and attempting to run the manage.py runserver - devserver I get the following error when static files are requested. Quite frankly i'm completely lost with this error,…
4
votes
4 answers

Gunicorn cant find the static files

By using gunicorn without nginx from digitalcloud tutorial my server is runing and on the console is not found: /static/style.css settings.py STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static/') I already tried…
BareTalk
  • 63
  • 1
  • 6
4
votes
2 answers

Removing collected static files

I ran collectstatic a few weeks back and I would like to remove most (99.5%) of the collected files so that I do not have to store them when deploying to production. I tried collectstatic --clear but this removed them and then placed the deleted…
Display name
  • 753
  • 10
  • 28
4
votes
1 answer

How to use node modules with Django?

I wish to use date-fns in my django project but not entirely sure how to proceed - I cannot rely on a CDN and need to somehow get it installed. I have run npm init in my root folder followed by npm install date-fns. This generated a node_modules…
erikvm
  • 858
  • 10
  • 30
4
votes
3 answers

Staticfiles in Django coming from npm-run-build frontend throw Error 404

I want to add my Gatsby JS' public folder that I created with npm run build to be served to Django as_view. Django keeps throwing 404 Error at me when I'm trying to load the staticfiles and the index.html from STATICFILES_DIRS. I don't understand…
Anna Taylor
  • 417
  • 4
  • 10
4
votes
3 answers

Django django.contrib.staticfiles.templatetags.static removed in 3.0: How could I replace the functionality?

I have the following code block where a corresponding .css file's path is returned. It is part of a Theme-Class that allows the user to change the website theme (dark and light) from a button in the profile view. def link(self) -> str: …
4
votes
2 answers

is there a way to add new skin in django-ckeditor?

I'm trying to add new skin in django-ckeditor but its doesnt work and it shows a blank screen in django-admin I have installed the kama skin and extracted in static\ckeditor\ckeditor\skins\kama but doesnt seem to work. Below im showing my ckeditor…
4
votes
1 answer

Why my static files are not getting loaded?

i am building real estate web app. My static files are not getting loaded. I have done all the possible settings to laod my static files in my app but it doesn't work. Below is my code, could any one help me to get rid of this. {% load static…
Noman marwat
  • 353
  • 1
  • 18
4
votes
1 answer

Django 2.0 throws AttributeError: ''Image' object has no attribute 'replace'"

When trying to set an html image to my static path + image path in Django 2.0, the django development server displays the following error: Error during template rendering In template /Users/arikanevsky/webappgit/ari/templates/ari/software.html,…
4
votes
1 answer

Missing staticfiles manifest entry in Django deployment using Heroku

I am trying to deploy my webapp to heroku. I am using Django and the following is most of my settings.py file: """ Django settings for blog project on Heroku. For more info, see: https://github.com/heroku/heroku-django-template For more information…
137
  • 183
  • 2
  • 14
4
votes
0 answers

Django Static Files on Google Cloud Storage

I copied google cloud sample Django project for google appengine. Then, I modified settings.py for storing all static files on google storage. I added this settings DEFAULT_FILE_STORAGE = 'storages.backends.gs.GSBotoStorage' GS_ACCESS_KEY_ID =…
4
votes
1 answer

Django: The joined path is located outside of the base path component

i'm using Django 10 and i dont know why after i collect my static files successfuly, when i try to run server in deployment mode(debug=False) it occurs me something like this: When i look for a static file by doing: python manage.py findstatic…
ePascoal
  • 2,362
  • 6
  • 26
  • 44