django-slippers and DRY Django Templates

  Рет қаралды 7,437

BugBytes

BugBytes

Күн бұрын

Пікірлер: 49
@dailypythontests
@dailypythontests 2 жыл бұрын
slippers! my new stack! I'd make sure to learn more on this and use it
@martincronje5242
@martincronje5242 2 жыл бұрын
I love how simple and logical you make your videos!
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Many thanks Martin!
@keyton_weissinger
@keyton_weissinger Жыл бұрын
Great video, Lyle. I’m working on a big tailwindui based project. This will come in very handy. Thank you!
@bugbytes3923
@bugbytes3923 Жыл бұрын
Thank you, Keyton! Good luck with your project!
@manofhat676
@manofhat676 2 жыл бұрын
Thanks for the great content u're always providing, after seeing slippers in this video, I tried to use it to solve a problem I was facing which is calling a dynamic component by passing in a variable as the template name, (the caller determines which component to use to hold its content), I couldn't find this feature in slippers, that's why I looked for similar packages, I found Django-component which offers the same functionality, and finally, we could add this feature after my pull request, With this feature implemented, I can now move from extending templates to using reusable components. Thanks for lighting the way.
@Vitalyayandex
@Vitalyayandex Жыл бұрын
Thank you so much for this video! I really appreciate the valuable insights and tips you've provided. It's evident that you put a lot of effort into creating high-quality content that viewers like me can benefit from. I've learned so much from watching your videos and have implemented many of the best practices you've shared. I encourage you to continue making more videos on best practices.
@bugbytes3923
@bugbytes3923 Жыл бұрын
Thanks very much for that comment, I'm glad the videos are helping you learn! I'll keep going for sure. If you have any requests, then feel free to share - thanks again.
@seydinaoumarsamabaly1806
@seydinaoumarsamabaly1806 2 жыл бұрын
Great content again ! Always something to learn each time i see your notification.
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Thank you!
@darkbluewalther
@darkbluewalther 2 жыл бұрын
My wish is that Django team looks at htmx, hyperscript, alpine, tetra, slippers, and make a whole new templating language with these awesome features embedded
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Yeah good shout. But I think the django team want to avoid enforcing a particular subset of technologies, so (for now) they keep the templates as generic as possible.
@martianmartian4037
@martianmartian4037 2 жыл бұрын
Who is still using html rendering? Most modern days apps are single page application. In backend models serialised and returned. In frontend we use React, Angular or similar framework to render data.
@alexforget
@alexforget 2 жыл бұрын
@@martianmartian4037 I really like Django, the admin, database management, but like you I feel that the rest of the world have moved on. Making small ajax updates and lot’s of tiny hooks is a lot of wasted dev time and is very error prone.
@djangoheroes7012
@djangoheroes7012 2 жыл бұрын
@@alexforget don't let you fool into thinking, that SPA is so much better for ANY use case. It depends on the size and audience of the project in my opinion. there a still a lotta usecases, where the old approach is valid and better and faster. People try to forget this and feel a pressure to develop even little projects or microservices with SPA, because every COOL and MODERN Dev uses SPA. I am a django dev and django/python trainer and lot's of my customers (governments, companies) still use (with success) oldschool HTML-Rendinger.
@СергейГоцин
@СергейГоцин Жыл бұрын
Hello. This is a very useful feature. Thank you. This improved my code significantly
@bugbytes3923
@bugbytes3923 Жыл бұрын
Thanks a lot for commenting - glad to hear this helped!
@СергейГоцин
@СергейГоцин Жыл бұрын
hello @@bugbytes3923
@elyasnaimzada3919
@elyasnaimzada3919 Жыл бұрын
love all your videos keep up mate
@bugbytes3923
@bugbytes3923 Жыл бұрын
Thank you - will do. Thanks for watching!
@onnot701
@onnot701 2 жыл бұрын
I love VUE but want to go back to more traditional MPA feel. And looking to make the templating same experience. This could help with HTMX and now you also have the Tetra-framework in Django. I wonder if its not time to rethink the templating engine in Django?
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Tetra framework looks interesting, I was not aware of it until now! Thanks!
@ahmedel-salamony4216
@ahmedel-salamony4216 Жыл бұрын
very useful big thanks, man
@bugbytes3923
@bugbytes3923 Жыл бұрын
You're welcome!
@zackmcnelly
@zackmcnelly 2 жыл бұрын
Great Content Thanks!
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Thanks for watching!
@TheDRAGONFLITE
@TheDRAGONFLITE 2 жыл бұрын
Cool video!
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Thanks!
@repotranstech
@repotranstech 2 жыл бұрын
Great content as always 👍.
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Thanks!
@tomekklewicki9221
@tomekklewicki9221 2 жыл бұрын
This is brilliant!
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Thanks!
@ale6au
@ale6au 2 жыл бұрын
Great content, as always! Thanks a lot for all your great work :)
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Thanks a lot for that comment!
@sudoscientist255
@sudoscientist255 Жыл бұрын
Great as always, I'm now very incentivized to use this. I know you its a little off topic but would really like a video or maybe link to an article on how I could use slippers with tailwind to create highly configurable responsive layouts (ex. if I pass something for a 2 column layout resembling "on medium or above screens, do 40% 60% split; on smaller than medium screens, stack on one column")
@MagnusAnand
@MagnusAnand 10 ай бұрын
Nice video!!
@bugbytes3923
@bugbytes3923 10 ай бұрын
Thanks - glad you liked it!
@Filipkasic
@Filipkasic 2 жыл бұрын
Ey lad, love the scottish accent, real killer. Would be real nice if you could just display what you're trying to build and what you'll get out of the framework/tutorial. Thanks a lot.
@heltonteixeira9250
@heltonteixeira9250 2 жыл бұрын
Awesome, tks for sharing :)
@bugbytes3923
@bugbytes3923 2 жыл бұрын
You're welcome!
@onnot701
@onnot701 2 жыл бұрын
keep making these :)
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Thanks, will do!
@dodokwak
@dodokwak 2 жыл бұрын
Thanks. p.s. If you have some time could you please make a video about multiple steps forms ( may be a little bit outdated django formtools) or show some useful tools how to create and render a calendar in django app. Thank you in advance.
@tobidegnon4409
@tobidegnon4409 2 жыл бұрын
I knew about this package but never found any use for it, the video was still fun to watch. The example you gave could have been solved with a simple for loop (I mean slippers was not mandatory here to solve the DRY issue). Out of curiosity, have you ever used or do you know anyone who has used this in a real application?
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Slippers provides a different approach - embedding the HTML within the declaration, and avoiding the verbose links to partial templates in {% include %} statements - you simply reference the component name. It can be a bit cleaner, but I agree it's a matter of preference. A lot of people do seem to like slippers (going from the django subreddit), but I can't say I've seen it much in the wild.
@naumanarif21
@naumanarif21 2 жыл бұрын
Hope this library is safe from XSS, etc as it is passing around HTML. And like always, Great Video !!
@FirdausAziz
@FirdausAziz 2 жыл бұрын
Why is there a "VISA" logo in the button? Did I missed something in the video or was it automatically added in by FlowBite?
@bugbytes3923
@bugbytes3923 2 жыл бұрын
Yeah, I just grabbed that button somewhat randomly from Flowbite. This is a basic demo so it doesn't really mean anything, but I guess it's cool to show that you can create these buttons easily with Tailwind.
@SebastianDix-hk3os
@SebastianDix-hk3os Жыл бұрын
I tried Slippers based on this video, but unfortunately Pycharm, which I believe is an extremely popular IDE among Python developers, does not like special characters at the beginning of tag names and highlights it in red and it cannot be stopped. One may argue this is a Pycharm issue and not a Slippers issue, but given the size of Pycharm vs size of Slippers it is much easier to change Slippers. So the beginning and end string should be configurable in some way. Honestly this is such an easy change that I myself would probably be able to do it :-D And ought to.
Django-Ninja APIs - Modern API Development in Django
43:40
BugBytes
Рет қаралды 23 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
django-cotton - Modern Components in Django!
20:41
BugBytes
Рет қаралды 10 М.
Django Signals - Introduction!
18:20
BugBytes
Рет қаралды 3,2 М.
Django-Unicorn - Building a Shopping Cart Component
27:17
BugBytes
Рет қаралды 6 М.
django-htmx - Django Extensions for Working with HTMX
37:06
BugBytes
Рет қаралды 24 М.
why rust libraries may never exist.
7:26
Low Level
Рет қаралды 287 М.