61 - Manage QuerySets with Django Formsets + modelformset factory - Python & Django Tutorial Series

  Рет қаралды 17,915

CodingEntrepreneurs

CodingEntrepreneurs

Күн бұрын

Пікірлер: 10
@ramiboutas
@ramiboutas 3 жыл бұрын
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 :)
@CodingEntrepreneurs
@CodingEntrepreneurs 3 жыл бұрын
Good call! Thanks
@bc.export5542
@bc.export5542 3 жыл бұрын
It helps a lot!!! Thank you very much!!!
@تعلممهارهكليوم
@تعلممهارهكليوم 2 жыл бұрын
Thank you so much i was waiting gor this .
@HtetAungShine-SHINE
@HtetAungShine-SHINE Жыл бұрын
thank you bro i really need it
@aadilmalik9802
@aadilmalik9802 3 жыл бұрын
looking for this .Thankyou so much
@nayankhemka9926
@nayankhemka9926 2 жыл бұрын
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?
@specimon
@specimon 3 жыл бұрын
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.
@specimon
@specimon 3 жыл бұрын
PS: Actually never mind. That's all explained 2 videos later. Thanks a lot 😊
@techfinpro
@techfinpro 2 жыл бұрын
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
MULTIPLE Model Search in Django -- Django & Python Tutorial
15:37
CodingEntrepreneurs
Рет қаралды 52 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Using the Inline Form Set Factory in Django (Part 1 of 2)
19:31
Pretty Printed
Рет қаралды 59 М.
How much python do you need before django?
13:29
Dennis Ivy
Рет қаралды 224 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 219 М.
A Quick Intro to Model Formsets in Django
10:37
Pretty Printed
Рет қаралды 38 М.
31 - Environment Variables & dotenv - Python & Django 3.2 Tutorial Series
14:58
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН