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:
On Mon, 29 May 2023 at 18:31, Obiorah Callistus wr
settings.py
- add following line if not exist
--
STATIC_URL = 'static/'
in your static folder ---> project_name/app_name/static/app_name/
* I recommen
settings.py
- add following line if not exist
--
STATIC_URL = 'static/'
in your static folder ---> project_name/app_name/static/app_name/
* I recommen
Not necessary again
On Tue, May 30, 2023, 5:05 AM SHUBHAM KUMAR
wrote:
> you should add STATIC_DIR =[
>
> 'BASE'/ 'static'
>
> ]
> to your project settings
>
> On Mon, 29 May, 2023, 9:21 pm Music Fm, wrote:
>
>> Load static
>>
>> Open a folder call it static then open another file within the st
in your setting make sure you have
STATIC_URL = '/static/'
then in your template
you load static at the top of your htmi file like this.
{% load static %}
to load any static files like css. do something like this
{% static './cssfile.css'%}
Then run the command. python manage.py collectstatic
O
you should add STATIC_DIR =[
'BASE'/ 'static'
]
to your project settings
On Mon, 29 May, 2023, 9:21 pm Music Fm, wrote:
> Load static
>
> Open a folder call it static then open another file within the static
> forder.
>
> Now type {load static/custom.css }on the html file it will see the stati
On 29/05/2023 04.24, Obiorah Callistus wrote:
please how can i display .css and .js files in my template
Have you considered reading the documentation?
Kind regards,
Kasper Laudrup
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscr
Load static
Open a folder call it static then open another file within the static
forder.
Now type {load static/custom.css }on the html file it will see the static
that has the css and javascript file
On Mon, May 29, 2023, 4:31 PM Obiorah Callistus wrote:
> please how can i display .css and .j
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 django-users+unsubscr...@googlegroups.com.
To view thi
9 matches
Mail list logo