Questions tagged [django-static]
113 questions
0
votes
5 answers
static file css not loading in django
I have tried everything i know to fix this all static files are working perfectly other than css
views.py
from django.http.response import HttpResponse
from django.shortcuts import render
def index(response):
return render(response ,…

Aryan Kaushik
- 17
- 1
- 5
0
votes
1 answer
Static files are not loading in Django
Why I am receiving files can't be found error while loading all the static files even after setting everything correctly.
ERROR
CODE:
Admin Section
- settings.py
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, '')
- urls.py
from…

Muhammad Asim
- 161
- 2
- 9
0
votes
2 answers
Unable to Apply CSS on my HTML file Django
I have seen alot of solutions here regarding this issue but unable to resolve my problem, I am trying to apply my style.css present on this path \...\static\css I have following directory structure as can be seen in image below:
My settings.py is as…

Filbadeha
- 389
- 2
- 17
0
votes
1 answer
Accessing Statics Files in Django
I am having a structure of Django Project as:
│ db.sqlite3
│ manage.py
│
├───static
│ │ 1.jpg
│ │ bg1.jpg
│ │
│ └───css
│ login.css
│
├───templates
│ home.html
│ …

Som
- 9
- 2
0
votes
2 answers
Change Django static directory name
Django static directory name is set to static by default. Can it be changed to something else?. If i could change it to cssandjs could this bring any errors to my project? and does that also mean that in templates i would load static by {% load…

zeuskedev 1
- 3
- 1
0
votes
0 answers
Page not found (404) jquery django python
jquery does not load - Page not found (404)
base.html
{% load static %}
…

JopaBoga
- 157
- 11
0
votes
1 answer
Static files doesn't load anymore - Django
In the beginning everything worked perfectly fine, but now I have a problem where my static files doesn't load. I think this is a very weird problem since I didn't really touch anything that could've had an influence on the problem when it happened.…

Nicolas
- 97
- 7
0
votes
2 answers
Static/CSS files issues in django
I am just new to django and after making a simple authentication forms for log in and logout.Everything is working perfectly but whenever i want to make some changes to the styles (CSS) it doent work. I have tried after changing the directory of…

Asad Ali
- 81
- 1
- 7
0
votes
1 answer
runserver_plus for django gives 302 on static files
I'm running manage.py runserver_plus for a django based application, normal runserver works fine but when i use runserver plus all the static files needed by the app give 302.
"GET /static/css/base.css?v2.6.6 HTTP/1.1" 302 -
"GET…

user13894631
- 1
- 1
0
votes
2 answers
Django: Image from static folder doesn't load
I need help=)
Image from static folder doesn't load.
Version: Django 1.11.3
This is my code:
first_project/first_project/settings.py:
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
…

delka
- 33
- 7
0
votes
1 answer
what should i do if my css is not working while i am using django framework?
In main html document:
{% load static %}
sgbit
{% block content %}{% endblock…

Cedric Dsouza
- 27
- 1
- 4
0
votes
0 answers
I am having problem : loading static files in HTML code in a Django Project . As I know for a href link we use "{% static 'addressOfFile' %}"
these image are in static folder of my app

Asish Kumar
- 1
- 1
0
votes
1 answer
django static files 404 error after migration
static folder path correct and it was all working before migration.
index.html
{%load staticfiles%}
…

Sarthak Kumar
- 304
- 5
- 16
0
votes
1 answer
how to add css, js, image in django?
I created the CSS file inside the static
static
css
resume.css
In setting.py, I didn't change any static code.
I called the index.html file in the view.py
Whenever I called the resume.css file from the index.html.
It is not working…

Magar Te
- 1
0
votes
1 answer
Python Django Some static images are not loading in Templates
I'm working on a project using Django(1.10) in which I need to load some images in Django templates, But I'm wondering some images are loading but some are not loading even exists in the static_root folder.
Update: I have two directories in my…

Abdul Rehman
- 5,326
- 9
- 77
- 150