64 - Dynamic New Forms in a Django Formset via JavaScript - Python & Django 3.2 Tutorial Series

  Рет қаралды 37,822

CodingEntrepreneurs

CodingEntrepreneurs

Күн бұрын

Пікірлер: 33
@shuvra03
@shuvra03 2 жыл бұрын
I don't know why are you so underrated. But you explained really well. Good job, bro! Keep it up.
@jnscollier
@jnscollier 2 жыл бұрын
Underrated? First, what a rude and mindless thing to say. Second, it's just not true so you must be conversing with some A-holes.
@SuperMoose1231
@SuperMoose1231 3 жыл бұрын
Great video. How can we delete extra forms now? Like in the django admin inline?
@user-iq2wp8ki7v
@user-iq2wp8ki7v 3 жыл бұрын
Great list of videos! Django should provide some JS helpers for adding new formsets dynamically imo.
@CodingEntrepreneurs
@CodingEntrepreneurs 3 жыл бұрын
There’s probably a Django package (non-official) that does this.
@alumnoapellido
@alumnoapellido 8 ай бұрын
THANK FOR THE TUTORIAL BROTHER 💕
@rickmonarch4552
@rickmonarch4552 2 жыл бұрын
This thing saved my life bro
@allifmaalengineeringlimite9853
@allifmaalengineeringlimite9853 3 жыл бұрын
Nice video.. can you please do the dynamic form on the create view because every time the dynamic form is generated on the update view, there is other prefillled fields.
@lucasmbaca6126
@lucasmbaca6126 3 жыл бұрын
i have the same question !!!
@aadilmalik9802
@aadilmalik9802 3 жыл бұрын
You are incredible buddy
@chrisogonas
@chrisogonas 2 жыл бұрын
Great stuff. Thanks
@QLOVEm3OFCChannel
@QLOVEm3OFCChannel 2 жыл бұрын
Hello! Can you do also a delete product line function ?
@THEBR0WNGUY
@THEBR0WNGUY 3 жыл бұрын
Thank you for this tutorial, I was trying to implement something similar
@consciouschords
@consciouschords Жыл бұрын
Can you do tutorial on how to pre populate data of the forms with formset
@JasonVriends
@JasonVriends 2 жыл бұрын
Is there a way in the ' for fields in self.fields ' to determine the type of the field so you can update the CSS based on each type i.e. checkbox etc?
@drustan6890
@drustan6890 10 ай бұрын
Django doesn't do field validation for dynamically added forms. how do I do validation?
@ToMussic
@ToMussic 2 жыл бұрын
Thanks for the great tutorial. Could you also show us how to add ingredients with a new recipe in one go using htmx? Thank you
@Vicmendon
@Vicmendon 3 жыл бұрын
Thank you so much!
@declivee
@declivee 2 жыл бұрын
Hello, thanks for the code! But, how to delete ingredient-form?
@maytheri
@maytheri Жыл бұрын
How do you ensure that counts you update via setAttribute actually get passed in the request? The add button will increment the id_forms-TOTAL_FORMS, but when I print the request in python it still says '0'.
@yavener
@yavener Жыл бұрын
What might look strange: declaring of formCopyTarget as 'const' and then appending to it. This works for arrays in JS.
@travismiller3636
@travismiller3636 2 жыл бұрын
What about buttons to *remove* ingredients? I assume that any ingredients which appear *after* the one being deleted would need to be resequenced, so there are no gaps? (e.g., form-4-* would become form-3-*, etc.) Also: what if you have two formsets on the same page? Can you customize the names and IDs of the controls in the management form, so they don't collide?
@DhavalAhir10
@DhavalAhir10 Жыл бұрын
Yes.. When you remove anyone even from the middle or last one... Simply re arrange it to 0 to end
@iotdude
@iotdude 3 жыл бұрын
awesome !!
@vinayagarwal7
@vinayagarwal7 2 жыл бұрын
I have a query.. I am also using Javascript to add element using hx-target and the element I am adding has hx-get in it ... so the dynamic addition of element using javascript is working but the hx-gext inside that dynamic element is not working
@doctorplusclub2735
@doctorplusclub2735 2 жыл бұрын
Hello, Can you give me tutorial to delete inline form like django admin ?
@SoulScribbler
@SoulScribbler 3 жыл бұрын
THe string substitution at 22:20 really threw me off since it doesn't use quotes ( ' ' ) and instead uses backquote ( ` ` ). Why is that? For anyone who might have the same issue, backquote is the character on the same key as tilda (~).
@CodingEntrepreneurs
@CodingEntrepreneurs 3 жыл бұрын
Oh yeah. That’s modern JavaScript
@CodingEntrepreneurs
@CodingEntrepreneurs 3 жыл бұрын
Very similar to f-strings in python
@SoulScribbler
@SoulScribbler 3 жыл бұрын
Ah ok just a different way it's done pretty much. Thanks
@ashir3730
@ashir3730 2 жыл бұрын
Hey, Sorry sir Justin Mitchell. But sometimes I kind of feel so busted and punctured knowing about, you know so many things. In Deep Sorrow, Writing I'm feeling jealous really a lot...
@CodingEntrepreneurs
@CodingEntrepreneurs 2 жыл бұрын
It takes time my friend. It took me time and a LOT of frustration
@ashir3730
@ashir3730 2 жыл бұрын
@@CodingEntrepreneurs So happy to see your reply, Sir. Thank you very much Sir for giving your valuable time and words. I won't forget this reply for my whole life. It means a lot to me. Keep up the Great Work Sir.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Python Django - Build Inline Formsets (with CBV's) Example 1
1:47:49
Very Academy
Рет қаралды 38 М.
Django Dynamic Forms Tutorial with Htmx
48:27
Matt Freire
Рет қаралды 70 М.
Using the Inline Form Set Factory in Django (Part 1 of 2)
19:31
Pretty Printed
Рет қаралды 59 М.
Dynamic Django forms without writing any JavaScript
27:07
Matt Segal
Рет қаралды 12 М.
A Quick Intro to Model Formsets in Django
10:37
Pretty Printed
Рет қаралды 38 М.
Inline Formsets | Django (3.0)  Crash Course Tutorials (pt 11)
10:43