Hi Justin! I apretiate a lot your work, very clear and neat explanations. I am following these series for a week :) I just want to mention that the if-statment (if child.recipe is None) in 7:40 will cause an exception and as django docs suggest it's better to use the python function hasattr: if not hasattr(child, 'recipe'): child.recipe = parent I am sure you solved this issue later on, but just in case :)
@CodingEntrepreneurs3 жыл бұрын
Good call! Thanks
@bc.export55423 жыл бұрын
It helps a lot!!! Thank you very much!!!
@تعلممهارهكليوم2 жыл бұрын
Thank you so much i was waiting gor this .
@HtetAungShine-SHINE Жыл бұрын
thank you bro i really need it
@aadilmalik98023 жыл бұрын
looking for this .Thankyou so much
@nayankhemka99262 жыл бұрын
Hi I have ben following this tutorial for some other app i was working on but I'm stuck here for quite some time. For some reason i keep getting ( (hidden field total_Forms, initial_form) this is required) on my page right before i put the formset tag. can you help me with that?
@specimon3 жыл бұрын
Thanks very much Justin. Well explained. Here is something interesting and that I am curious about. When I use "{{formset.as_p}}" in the html template everything works fine. I can edit and change the values no problem. When I refresh the page/ check the admin the values are indeed changed. However once I try rendering the values in the forms differently any updates I do on the (front-end) form won't take effect after saving. How is that? That makes literally no sense to me. To clarify I use something like this on the front-end template for example: {% for ingredient_form in formset %} {{ingredient_form.name}} .... {%endfor %} It all renders out fine but as mentioned any values changed on the site won't "stick" once saved.
@specimon3 жыл бұрын
PS: Actually never mind. That's all explained 2 videos later. Thanks a lot 😊
@techfinpro2 жыл бұрын
instead of teaching the way of NOT to do something, you must teach DIRECTLY de CORRECT way of doing it, because students may confuse thinking someting you just did is the correct way, at the end you ALWAYS say "THIS IS NOT THE CORRECT WAY OF DOING THIS..." and change everything we (the students) thought it was correct. that is not good practice teaching. even the videos would be shorter if you don't do that