Django Tutorial #12 - Static Files & Images

Django Tutorial #12 - Static Files & Images

Net Ninja

6 лет назад

149,853 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@ignamikel
@ignamikel - 03.12.2023 01:48

bro just wanted to say that 6 years later, your django tutorials are still the best around! 🤗

Ответить
@jaywandery9269
@jaywandery9269 - 17.01.2023 19:05

the styles.css styles wont load on my articles.html

Ответить
@DuongTran-zh6td
@DuongTran-zh6td - 04.10.2022 16:15

<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="{% static 'styles.css' %}">

Ответить
@Kennerdoll
@Kennerdoll - 03.07.2022 01:44

I struggled to find a solution that will work but this has made my work easy, thanks bro a subscribe 4 you and a like on top

Ответить
@birdster42
@birdster42 - 15.04.2022 11:21

If you are still having trouble loading the /static/styles.css page - try restarting. I tried every fix on here and nothing was working. Restarted and it worked face palm

Ответить
@kalaiwaniapratnakumarstude6868
@kalaiwaniapratnakumarstude6868 - 30.03.2022 20:59

Thank you very much for this video

Ответить
@gabrielpena5829
@gabrielpena5829 - 23.02.2022 07:27

Thank you very much

Ответить
@shubhambhosale8467
@shubhambhosale8467 - 25.12.2021 13:07

Not working

Ответить
@Sainiajits
@Sainiajits - 02.11.2021 10:07

Thank you very much :)

Ответить
@TheFixers
@TheFixers - 24.10.2021 16:37

guys, if you have problem with staticfiles, just replace this line to {% load static %}

Ответить
@cyberlab551
@cyberlab551 - 16.09.2021 00:22

updated:>>> {% load static %} not use whatever shown on video.

Ответить
@sagarkafle9259
@sagarkafle9259 - 10.09.2021 11:56

I'm confused
without STATICFILES_DIRS set
how could /static/style.css open on the project
Does django already know about the file ?

Ответить
@AviatorReact
@AviatorReact - 08.09.2021 22:15

Thanks for the tutorials, I've learnt a lot from you

Ответить
@DanielLeachTen
@DanielLeachTen - 04.09.2021 06:00

I had to take the preceding forward slash out of STATIC_URL: STATIC_URL = 'static/' for it to work... in case anyone else is stuck!

Ответить
@AnMaDeBi
@AnMaDeBi - 31.08.2021 06:51

Thank you!

Ответить
@dipeshmandanka
@dipeshmandanka - 21.08.2021 17:30

Life saver !!

Ответить
@KacperMarciniak_
@KacperMarciniak_ - 28.07.2021 20:23

Thanks a lot

Ответить
@gusfowle3001
@gusfowle3001 - 25.05.2021 19:05

If you're running a more recent version of django, use this instead of the os.path.join method. BASE_DIR goes into the base project folder, it then looks for a folder called static.

STATICFILES_DIRS = [
BASE_DIR / 'static'
]

Ответить
@prasadkadu9737
@prasadkadu9737 - 30.03.2021 14:27

please make new videos with other example and updated django version

Ответить
@hahahihi6253
@hahahihi6253 - 17.02.2021 18:58

Thank you very much 😊👍

Ответить
@clinck3439
@clinck3439 - 13.02.2021 09:53

If your changes in css is not reflecting on web page then it might be because of your browser is caching css file in the browers,
Try refreshing web page by holding ctrl or shift, this should work.

Ответить
@alexissuarezalvarez5622
@alexissuarezalvarez5622 - 29.01.2021 05:43

hi, i didn't quite understand why i used a folder that contains all our static files

Ответить
@shoxruxsunnatov
@shoxruxsunnatov - 13.01.2021 13:05

OLD VIDEOO!!!!!

Ответить
@peroquecoincidencia9991
@peroquecoincidencia9991 - 31.10.2020 17:59

you know what you video helped me a lot, wonderful

Ответить
@MegaJagveer
@MegaJagveer - 27.10.2020 09:55

Python might make you add a trailing comma in the Touple

Ответить
@ataberkaslan2235
@ataberkaslan2235 - 13.10.2020 23:42

Biz orospu çocuğu muyuz ben de niye olmuyo

Ответить
@yasyfawiwaha4088
@yasyfawiwaha4088 - 09.10.2020 21:45

Thanks for the tutorials!

I got some question, how do I access another static file in another directory from my css file? the curly braces seems to cause trouble when I used {% load static %}

Ответить
@fasterfasterr6056
@fasterfasterr6056 - 22.09.2020 16:30

where is advanced , i am waiting for it .you are the best teacher . i need tips to make my website secure .

Ответить
@iliatalebzade8751
@iliatalebzade8751 - 22.09.2020 08:31

you're a LEGEND !!!

Ответить
@meghaaggarwal8508
@meghaaggarwal8508 - 15.09.2020 19:21

I wish you could make Django/AWS for production a mini series or a simple tutorial Shaun! Not many people guide for industrial production level basis..

Ответить
@Anom21
@Anom21 - 14.09.2020 23:54

Thanks man for making it seem so easy

Ответить
@rossideas
@rossideas - 27.08.2020 22:49

Your communication skills are the best!! Short, sweet and to the point. Thank you.

Ответить
@010101dddm
@010101dddm - 09.08.2020 15:06

I can not get static files in the browser

Ответить
@user-vt7co6nn6q
@user-vt7co6nn6q - 03.08.2020 14:54

Thank you!! I searched many information, so I find this! I thougt about give up, but with your help I may continue my hobby!

Ответить
@jakubsamanek9715
@jakubsamanek9715 - 21.07.2020 18:24

Thanks

Ответить
@mel8080
@mel8080 - 14.07.2020 13:25

I really like your tutorial videos. Each video/Topic is short, and gets straight to the point. I know this version may be a little outdated, but I prefer to go by your videos!

Ответить
@KevinTempelx
@KevinTempelx - 09.07.2020 23:27

Thanks

Ответить
@chukwunta
@chukwunta - 01.07.2020 15:12

awesome tutorial bro. You really know your stuff.

Ответить
@ShaffleOne
@ShaffleOne - 27.06.2020 08:26

Still waiting for Django for production series!!!

Ответить
@RedElectrik
@RedElectrik - 19.06.2020 00:35

no idea what im doing wrong. I cant go to a url and work

Ответить
@enesyurtsever3785
@enesyurtsever3785 - 31.05.2020 00:22

I want to use {% load static%} with this;
<header class="masthead" style="background-image: url('img/home-bg.jpg')"> how i use idk

Ответить
@adambernard1404
@adambernard1404 - 22.05.2020 22:16

THANK YOU. I can't believe how bad the official django documentation is for this simple task.

Ответить
@kibi4979
@kibi4979 - 08.05.2020 03:59

Really cool explanations! Thank you.

Ответить