Questions tagged [django-static]

113 questions
1
vote
1 answer

DJANGO : Problem of mixing between URL of web pages and media files

I'm developing a website and sometimes I have a strange problem : the URL of the page is concatened with the URL of the images on this page, which means I cannot access to these images. It's a bit hard to explain so here is an example : I have a…
Julien Mertz
  • 465
  • 2
  • 8
  • 22
1
vote
0 answers

Getting HTTP 404 for CSS file although I have set the static URL,Root,Dirs in settings.py file

I am new to django and I'm trying a simple web application where I am using CSS with static tag. I have configured settings.py as STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR,"static") STATICFILES_DIR = [ …
anonymous
  • 11
  • 3
1
vote
1 answer

does django have lots of clash if not isolated

I'm very new to django and web dev in general. I'm following tutorial https://www.youtube.com/watch?v=n-FTlQ7Djqc&index=1&list=PL4cUxeGkcC9ib4HsrXEYpQnTOTZE1x0uc create a blog by 'The Net Ninja'. His django version is 1.x but I'm using 2.1 I have…
buda__
  • 41
  • 1
  • 5
1
vote
1 answer

Django static files not loading for all pages except index page

I am working on a blog website in django, where I can write articles. While developing I am simultaneously hosting it on pythonanywhere.com In dev server everything works perfect, but after deploying, I am facing a strange issue. My static files are…
1
vote
1 answer

Accessing Django's template folder via /static/js/

In a Djano project of mine, I have a JS file inside /project/static/js/. It needs access to a files stored at /project/templates/. I'm unable to access this location from the js file. Can someone suggest a work around (short of keeping duplicates…
Hassan Baig
  • 15,055
  • 27
  • 102
  • 205
1
vote
1 answer

How to properly extend and include in Django tempates

Following is my homepage.html is home app {% extends "base.html" %} {% load static %} #reference to stylesheet in the home app static directory {% block body %}

I am…

jeff
  • 910
  • 2
  • 6
  • 25
1
vote
2 answers

Django somehow accesses the static files even after i had deleted the whole static folder

I am new to Django, I had placed the static files in the project level static folder and even in multiple applications inside the app/static/app directory. Everything was working fine until I decided to delete few of the static files. The project is…
1
vote
2 answers

ManifestStaticFilesStorage - still fetching old static file even when staticfiles.json shows the right mapping

I am using using ManifestStaticFilesStorage. After performing collectstatic and moving over the files to prod, I still see old css file (with old MD5 hash string) being fetched. settings.py: STATICFILES_STORAGE =…
1
vote
0 answers

Cookieless domains for static in Django + Nginx

I've found a tip of using cookieless domains for serving static files. My experiments have shown seriuos drop in request time (django-debug-toolbar) that is pretty much what I wanted to get. The problem is that I want to add…
1
vote
2 answers

Django not updating static location setting

I have a project that has been running just fine for about 6 months. Static files have been working perfectly, and everything is great. I have my static files located in a folder as so: /var/www/html/static/ In my settings.py file, I have the static…
Garfonzo
  • 3,876
  • 6
  • 43
  • 78
1
vote
1 answer

Less files not getting compiled immediately

I am working on a django application and using less for generating CSS. On my localhost, everything works fine and changing less file updates CSS almost immediately. However, when I deploy to server (apache2, wsgi), the old css files are rendered…
Manas Paldhe
  • 766
  • 1
  • 10
  • 32
1
vote
1 answer

how to set static files directory in django

I am trying to get an existing django app up and running, but the css or any other static files are not showing up. I get the error: "GET /static/css/mycss.css HTTP/1.1" 404 50 In the settings the following values are used: DJANGO_ROOT =…
Atma
  • 29,141
  • 56
  • 198
  • 299
1
vote
3 answers

Static files not found in Django 1.4

While deploying a Django app. I am having problem with static files. I am having JS and CSS files in static directory. But browser is not able to find those files. I am having same files and settings on local machine that is ubuntu same as server…
Hafiz
  • 4,187
  • 12
  • 58
  • 111
0
votes
1 answer

Django Tiny MCE and Static files

I have django tinymce setup but I hav noticed an issue with the tool when not in debug mode. The advanced theme has some templates in it, these templates contain django template code. The problem is that these templates are being served out of the…
Cory Gwin
  • 1,243
  • 1
  • 17
  • 27
0
votes
1 answer

How to add static files for a specific path in django

I am a noob when it comes to django or any backend related programs. i would like to add the same static files for a path which is not home in my django project. Here I am in my howe directory and there is no issues with loading static css and js…