Static Files & Images | Django Framework (3.0) Crash Course Tutorials (pt 4)

preview_player
Показать описание

NOTE: Updated and compatible with Django 3.0

Introduction to django static files. Part 4 of my django crash course series.

Рекомендации по теме
Комментарии
Автор

2:57 in django 4.0 use
STATICFILES_DIRS = [
BASE_DIR / "static",
]

to get the same result

mukithasan
Автор

BRO IVE BEEN STRESSING OUT THE WHOLE DAY TO FIND OUT HOW TO DO THIS!!! THANKYOU!!! (for people that just want the images part: 4:54)

shauryapatel
Автор

Самый лучший курс по Джанго, который можно найти в интернете! Все понятно и лаконично.

L-xh
Автор

Usually, I start learning Django and get overwhelmed by the complicated way of explaining and give up .
But your way are much more simplified.
thanks and hope to continue till the end.

aghiadalzein
Автор

Your channel will have millions of views if you continue what u doing now!! Its really help people out there

cubedev
Автор

If you want to scale the image, you may add style section at the end of the line as below :

<img src="{% static 'images/logo.png' %}" style="width: 3vw; min-width: 3px;"/>

You can play with numbers.

gokaysevgi
Автор

Great series! One strange issue I'm seeing is that when I create the main.css file and link it in the main.html file the css loads but without any color. if i copy it directly into <style> tags in the main.html file it works fine. I'm sure I messed something up, but I can't figure out what.


Disregard - created the static folder in crm1/crm1/ instead of the first crm1 folder. Moved it and it worked perfectly.

paulpenna
Автор

Great tutorial, thank you for it.
At first css and logo didnt work for me because i created static folder inside /templates/account/ folder instead of crm1 folder

hrvojemarusevec
Автор

I just can't believe... I've been all 2 days long trying to fix this. My project wouldn't find my CSS and my local images at any cost and the only tutorial among thousands that have worked was yours. Thank you so much!

DeadLine
Автор

You're amazing man! Thanks a lot! I've been watching non-stop...

seyedaliaghamali
Автор

Actually I think you didn't need to configure the MEDIA_ROOT, do you? You've load the image through the static path.

leonardorezende
Автор

BEST WEB DEV YOUTUBER IN THE LAND AND ALL OVER THE WORLD

pshr
Автор

hello
could you please explain more about the configuration in the setting.py file?
what is STATIC_URL and MEDIA_URL ? are they special variables ? or we can name it what ever we like?
and the os.path.join () thing, I didnt get this part at all


thank you

saeedou
Автор

I've been stuck on Django 3 getting the static files to work for days. I got it after watching this video.

allen
Автор

Thank you very much for the lessons, I myself am from Russia, I speak English poorly, but I understand well, I am very glad that I saw your channel, I learned a lot from you

zov
Автор

I appreciate you much, thanks for uploading this video. It's been a great help !!!!

deepseadiver
Автор

Thankyou. This is what i was looking for.

worldoftech
Автор

thank you so much i have been trying to figures this out for hours and this worked first time thanks

modelrailwaymaster
Автор

A reminder for myself:

Continue watching from 4:46

parthsalat
Автор

Thanks I am looking forward for your next video!

johnherrera