1. Create a folder called static, and inside the static folder create
another folder
2. Go to settings.py AND add this:
STATIC_URL = 'static/'

STATICFILES_DIRS = [
    BASE_DIR / 'static'
]
3. Go to your .html file and like the .css file using:
<link rel="stylesheet" href="{% static
'folder_inside_static/css_file_inside_folder_inside_static.css' %}">

On Mon, 29 May 2023 at 18:31, Obiorah Callistus <[email protected]> wrote:

> please how can i display .css and .js files in my template
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5a2ceeec-20f1-46aa-98b9-717c9965b82dn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/5a2ceeec-20f1-46aa-98b9-717c9965b82dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKHUQ0TB%2BO4NkzgXTzopa%3DNUrYGTAa7g6vw6aW3%3DSvpi9UGZBg%40mail.gmail.com.

Reply via email to