Тёмный

django-components - Build re-usable components in Django with TailwindCSS and DaisyUI 

BugBytes
Подписаться 27 тыс.
Просмотров 3,8 тыс.
50% 1

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
ko-fi.com/bugbytes
This video looks at the 'django-components' package that allows developers to build re-usable, custom Django template components. We'll learn how to define these components, and use them in our Django apps.
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
01:21 django-components intro and setup
06:13 Installing DaisyUI and TailwindCSS
06:41 Creating Card component using Django-components
10:51 Using component in Django templates
13:06 Passing custom data into Django-components
17:58 Adding CSS to components
22:02 Adding JavaScript interactivity to components
26:54 Security when using django-components
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: bugbytes.io/posts/
👾 Github: github.com/bugbytes-io/
🐦 Twitter: / bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
django-components: github.com/EmilStenstrom/djan...
DaisyUI installation: daisyui.com/docs/cdn/
DaisyUI card: daisyui.com/components/card/
#python #django #webdevelopment

Опубликовано:

 

30 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@esteban.acevedo
@esteban.acevedo 13 дней назад
Thank you very much for your work. I am writing to you from Argentina. I am currently a Python course instructor at two leading companies in Latin America. I am sharing your videos with the students. I encourage you to continue with this beautiful stack of Django, HTMX, Tailwind CSS, and now Django Components. I believe it is the near future that Python web developers are gradually getting to know.
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks a lot Esteban! That's really cool to hear that, thank you for sharing! If there's anything in particular you/your students would like to see, feel free to share. Hope to visit South America some day!
@interwebslinger
@interwebslinger 13 дней назад
Thanks for all the great django content, BugBytes! If you ever run out of video ideas, I'd love to see your take on the following: 1. How to get your django apps ready for production, e.g. no CDN use for htmx / alpine. 2. Deploying django apps - small apps, simple deploy, large apps on k8s 3. Which ways you prefer to build django projects - components or templates, alpine / hyperscript / vanilla js, etc 4. How to add pinesUI components to your projects It's your choice though if you want to do any of this, I'll keep watching in any case!
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks a lot for the great suggestions! I'll be doing deployment videos soon, it's been a goal of mine for a long time.
@SmartC2007
@SmartC2007 11 дней назад
Hey @interwebslinger For Point 1. I have written a python script including "local" Tailwind CSS. All via npm. It's far from perfect, but it get's me started ... otherwise it is too time-consuming to do that manual all the time.
@interwebslinger
@interwebslinger 11 дней назад
@@bugbytes3923 Looking forward to it!
@kushaldotel3147
@kushaldotel3147 13 дней назад
Hello big brother. I am also a Django dev. I would suggest you to make the DRF video for free. Many teachers and tutors are focused on getting their audience on udemy. It would be great if DRF videos will also be open for all like Dj is open for all. Your videos will lead upcoming gen. Make sure that every freshers will have your name on their mouth and say "BugBytes" whenever the topic is on Dj.
@bugbytes3923
@bugbytes3923 13 дней назад
Thank you for sharing your thoughts, much appreciated. I enjoy the RU-vid process, but the time investment for making a multi-video course often doesn't really translate on here. But if we can make the Ko-Fi goal by August, I will release the DRF course on here for sure!
@kushaldotel3147
@kushaldotel3147 12 дней назад
@@bugbytes3923 Its all about how people/freshers will get you. I guess if you could make a job/internship ready video with drf for sure for the next time you can sell it on your own website. People will buy if stories are created after watching your tutorials.
@amjadnikzad4890
@amjadnikzad4890 13 дней назад
hey, i just want to say your contents are great! And I would be grateful if you do more on DRF!
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks a lot!
@timothymalahy7880
@timothymalahy7880 7 дней назад
Yes on the htmx - it seems very ripe for DRY, but I struggle to not get lost in my templates with a bunch of htmx components in them. Would love to see some robust examples. I regularly add rows to a table from a form. That would be great to have reusable all over. I can understand the abstracted logic but it gets so messy that I’m better off rewriting the views.
@SmartC2007
@SmartC2007 13 дней назад
Thanks a lot. Another great video. Yes, I would love to see more content with django-components including HTMX. Maybe an intermediate projects ... some kind of nice web-app ... too bad the football european championship is already running. :)
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks a lot! My own country Scotland won't be in that tournament for long, so plenty time to make videos ;) Thanks for the suggestion.
@charlesu49
@charlesu49 12 дней назад
Great video! It would be great to see this working with htmx and to use this I'll probably need to get used to working without the app templates, it is so convenient.
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks! I'll create something with django-components & HTMX soon
@robhafemeister3100
@robhafemeister3100 13 дней назад
Great video, would definitely like to see a django-components and htmx video.
@bugbytes3923
@bugbytes3923 13 дней назад
Thanks a lot Rob! Will prep something very soon.
@interwebslinger
@interwebslinger 13 дней назад
​@@bugbytes3923if you could work some alpinejs in there it would be even better! 😬
@VictorMwangi-ny8og
@VictorMwangi-ny8og 12 дней назад
Thank you so much for this
@awesomejr.530
@awesomejr.530 13 дней назад
Thanks alot @BugBytes. This django-components package is very similar to react. But I have been using the default Django templating syntax: {% include 'template_file.html' with title='any title' %}. It pretty much do the same work that this package do and does feel like react too. And further more, I feel like disabling the App template dirs is really disturbing cos it's much needed to organize templates based on apps. Please, What are your thoughts on this?
@Smartroid
@Smartroid 13 дней назад
Could u please upload a video or video series going over how to override django admin templates and make modern looking dashboards with charts
@TomOhle1
@TomOhle1 13 дней назад
great content yet again.
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks a lot!
@AmoahDevLabs
@AmoahDevLabs 13 дней назад
Great gist. Thanks very much for sharing. Waiting for most gists on this library.
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks a lot!
@hernansaa
@hernansaa 13 дней назад
great video would be amazing to see it working with HTMX! thanks a lot!
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks - coming up soon!
@jdmcivicrrr
@jdmcivicrrr 13 дней назад
Cool video. I've tried to do something like this by manually structuring folders and using includes and blocks. Didn't know there's a library for it. Do you think this is now starting to approach something like react/NextJS, but in python? Looking forward to your video utilizing htmx and this library.
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks! I think this moves Django a bit closer to react/next, in the sense that you can build these components that can be 'copy/pasted' to other projects. If we can get a Django community showcase of components, it might help with building modern Django apps without having to use a front-end framework.
@Legendera
@Legendera 13 дней назад
I like your content man! next dennis ivy
@bugbytes3923
@bugbytes3923 13 дней назад
Thanks a lot! Big fan of Dennis Ivy too - cheers!
@AliHassan-wc6nb
@AliHassan-wc6nb 13 дней назад
Bro, you are doing a great job, but please make a video on how to hide the code from the client when solution is being deployed on client's machine.
@bugbytes3923
@bugbytes3923 13 дней назад
Thanks a lot! Can you give an example of what you mean?
@champorado2131
@champorado2131 13 дней назад
@@bugbytes3923 i think he means, obfuscating code so it cannot be readable by clients
@AliHassan-wc6nb
@AliHassan-wc6nb 13 дней назад
​@@champorado2131 thanks, you are right but I know about it, but still is their something else?
@Yarkanlaki
@Yarkanlaki 13 дней назад
Thank you and Django components Developer
@bugbytes3923
@bugbytes3923 13 дней назад
Thanks a lot!
@raulolmos345
@raulolmos345 12 дней назад
Hello, excellent video, in my case I am interested in you making a video with django-components and htmx.
@bugbytes3923
@bugbytes3923 11 дней назад
Thanks for watching! Will create something with HTMX soon
@frameff9073
@frameff9073 13 дней назад
God good thank you
@bugbytes3923
@bugbytes3923 13 дней назад
Thanks for watching!
@Macpherson1st1
@Macpherson1st1 13 дней назад
What's the advantage of using this library instead of Django's inclusion_tags?
@daffastack
@daffastack 10 дней назад
sir.. but how to passing different js function on each button ? can we pass javascript trough components tag ?
@bugbytes3923
@bugbytes3923 9 дней назад
You would need to target the buttons individually to run different code for each one. In the video, we are targeting all buttons with a generic 'button' selector.
@Pradeep_prasad
@Pradeep_prasad 13 дней назад
Hello I need your help Create a small video How to fetch 10lakh data within a second in Django Thank you
@AliHassan-wc6nb
@AliHassan-wc6nb 13 дней назад
You want to fetch Million rows from database table in a second?
@Pradeep_prasad
@Pradeep_prasad 13 дней назад
@@AliHassan-wc6nb second means as much as quick
@Pradeep_prasad
@Pradeep_prasad 13 дней назад
​@@AliHassan-wc6nb it's means as much as quick
@chickenonaraft508
@chickenonaraft508 11 дней назад
Please sar, make video
@anouarben779
@anouarben779 13 дней назад
much appreciated you deserve all the support you can get.
@bugbytes3923
@bugbytes3923 13 дней назад
Thanks for the support! I'm hoping to keep going on RU-vid but might also explore some other options soon.
Далее
Stray Kids <ATE> UNVEIL : TRACK "MOUNTAINS"
00:59
React + Django + Ninja (Full-stack app in 15 mins)
12:18
100+ Web Development Things you Should Know
13:18
Просмотров 1,4 млн
How React 19 Almost Broke The Web
55:40
Просмотров 89 тыс.
Watching Tailwind Tutorials Is A Waste Of Time
7:56
Просмотров 214 тыс.
All 29 Next.js Mistakes Beginners Make
1:45:10
Просмотров 75 тыс.
Stray Kids <ATE> UNVEIL : TRACK "MOUNTAINS"
00:59