V
V
Vlad2422019-03-26 17:49:36
Django
Vlad242, 2019-03-26 17:49:36

css not working in django?

I work with django 2 but style.css doesn't work completely. (like part of the code works and the other does not). If the css code is inserted into the html file, then all the code will work correctly.
Here is how I included css and settings file

<link rel="stylesheet" type="text/css" href="{% static 'main.css' %}">

STATIC_URL = '/static/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/'

CRISPY_TEMPLATE_PACK = 'bootstrap4'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FulTupFul, 2019-03-26
@FulTupFul

Clear browser cache

O
Oksana ..., 2019-03-26
@deniz1983

https://docs.djangoproject.com/en/2.1/howto/static...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question