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
0
votes
1 answer

Only Absolute Paths Work With Jquery When Dynamically Setting An Image While Using Django Static Files

I have some jquery code that toggles an active vs. inactive image for a button when a user clicks it. It works fine when I just run everything from windows statically with relative paths. However, once I migrated it to my django dev box clicking…
Newmu
  • 1,930
  • 1
  • 20
  • 25
0
votes
1 answer

Modifying the behavior and testing the collectstatic management

I have an app that I'm writing that needs to include uncompressed javascript files when the DEBUG setting is true and compressed javascript files when the DEBUG setting is set to false. In order to do that I'd like to modify the behavior of…
the_drow
  • 18,571
  • 25
  • 126
  • 193
0
votes
3 answers

django admin static URLs: working for base.css but not for dashboard.css

In settings.py: STATIC_ROOT = os.path.join(PROJECT_PATH, '..', 'media/static') STATIC_URL = '/media/static/ In rendered page: Site administration | Django site admin
zoo
  • 1,901
  • 1
  • 17
  • 25
0
votes
1 answer

Django - Access a file

I have a django project mysite and app named login The web page i am opening is D:\mysite\templates\login\index.html This html file needs a javascript file (in the same directory) for it to work The js file is…
0
votes
1 answer

Why does switching to Apache break all static files in my Django application?

I am switching from the Django development server to Apache for production. To this end, I installed modwsgi and specified the following in apache2.conf. # Run my django application. WSGIScriptAlias /…
dangerChihuahua007
  • 20,299
  • 35
  • 117
  • 206
0
votes
2 answers

Upgraded to Django 1.4 but admin is still looking in media dir for static files

I upgraded to Django 1.4 and now my admin static files won't load. relevant part of my settings file looks like: MEDIA_ROOT = os.path.join(SITE_ROOT, 'media') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing…
Colleen
  • 23,899
  • 12
  • 45
  • 75
-1
votes
1 answer

Why isn't CSS loading on my django website?

I have managed to upload my django project to a server(www.sb10-89.co.uk but the css file isn’t working. Even the admin page doesn't look right, again i guess its missing a css page. The code below is from my settings file. STATIC_ROOT =…
Wishmaster
  • 23
  • 1
  • 6
-1
votes
1 answer

Django strange static behavior

I launched the small Polls app from Django tutorial here: https://docs.djangoproject.com/en/4.1/intro/tutorial06/ The first time i wrote it, all worked fine. Then I tried to add the same style to all other html files in the same dir as index.html:…
-1
votes
1 answer

Django: static files not served locally

I know this question was previously asked and I already tried many different configurations to fix this. I had no problem serving my static files locally when developing but, if I remember correctly (don't know exactly because of the browser cache),…
Seglinglin
  • 447
  • 1
  • 4
  • 17
-1
votes
1 answer

Django: css document wont load on base html template

I made the following css script inside of my site folder(same place where templates folder is located), but when I run the script, and look at the site, the changes dont show. I also inspected the css code, and its not finding the file I linked it…
J a z s
  • 1
  • 1
-1
votes
1 answer

Why does the CSS file not work in the Django project?

When I shut down my PC and reopen my project every time I have to change the CSS file name to see the changes on the web. I have tried many ways to fix these issues. I have researched online but I did not find any answer on this. I have tried …
Vikas_kumar
  • 7
  • 1
  • 2
-1
votes
2 answers

Python Django can't get static files to work

I'm working on a pyhton django project and now I'm trying to add some style to it with a styles.css file but I just can't get it to work. My project is named commerce and my app is called auctions and I have the static file…
-1
votes
1 answer

Django Admin CSS is not working as it should

I did run the python manage.py collectstatic code, and after that all the static files were collected in the static folder. but the static files needed for the syling of the admin panel are not working. Could you help? settings.py STATIC_URL =…
-1
votes
2 answers

CSS file has contents locally but in browser is empty

I created a website (on local host for now), so I linked html with css and my css is ready. I wrote everything, but then the css doesnt show on the website I opened the inspect element > sources > style.css and I found the css empty, but in vs code…
SIDAL
  • 13
  • 6
-1
votes
2 answers

Why can't I serve my static files to Django?

Before anyone marks this as a duplicate I have seen all of the other questions on similar topics and tried all of the solutions without effect. My Django application is small and I am happy to serve the static files from the same server In…
Psionman
  • 3,084
  • 1
  • 32
  • 65