Django Tutorial - Custom Forms

Django Tutorial - Custom Forms

Tech With Tim

5 лет назад

57,649 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Malik Javadov
Malik Javadov - 03.01.2023 14:43

Damn, perfect tutorial

Ответить
Gba Gba
Gba Gba - 09.09.2022 13:41

WHEN IN ITEM.COMPLETE=TRUE, DO NOT PUT THE TRUE. just item.complete. it'll do it, and it won't parse '==true' nor 'false' if you put it

great videos. sometimes i have the thought that many people do little mistakes on purpose just to get more comments (not you, though i'll do it haha). awesome video of course

Ответить
c hernandez
c hernandez - 10.08.2022 22:49

I still can not add Items only lists. can anyone give me a hand ? I doube the code with tim's but still dont work

Ответить
OthmanEmpire
OthmanEmpire - 29.04.2022 23:45

Thanks for the video =)

Ответить
Juan Diego Molina
Juan Diego Molina - 04.11.2021 04:26

I've been watching this series and I am thinking if it wouldn't be a better, or at least cleaner, option to have separate views that will handle one type of request (e.g. POST, GET), assuming we want to stick to SOLID principles and make our view functions have a single purpose. However, I am not sure if this would be a good idea in terms of structure and readability of Django app.

Ответить
Colin Bird
Colin Bird - 30.10.2021 14:56

This tutorial series was perfect: it demonstrated the power of Django in a way that I had not appreciated, and your step-by-step instructions helped me understand how the separate files work together to create what the user sees. Thank you!

Ответить
bshxh gyshz
bshxh gyshz - 04.09.2021 12:58

i had a problem with this code where it had to save the item but it didn't save because of commas in list.html but you did it without any problems how is this possible?

Ответить
Yashar Xaspoladov
Yashar Xaspoladov - 13.05.2021 23:04

Wow the level of difficulty jumped up quite a bit on this video. Or Im just really tired

Ответить
Leon
Leon - 09.04.2021 15:39

awesome video, as the rest of your content and i thank you for helping me with m current project! It would be great if you show the models at the beginning this would complete the composition of database/form/views and their interconnections :)

Ответить
mentorE
mentorE - 17.02.2021 03:23

i dont know about others, but i think django forms are very poor explained.

Ответить
Dassault354
Dassault354 - 16.02.2021 12:53

excellent video! Just one thing, my save buttons are doing exactly what they are supposed to do however nothing happens when I use the Add Item button and my code is identical. Am using python 3.9, if that makes a difference? Am I missing something here

Ответить
Shyren More
Shyren More - 24.10.2020 08:35

I didn't understand this tutorial at all, I have watched this 3 times now, the earlier videos were great

Ответить
Daniel Quintana
Daniel Quintana - 08.10.2020 03:59

I had been about to go back to the beginning of everything, jajaja thanks for the course, is very good and fast to learn, thanks

Ответить
Muhammad Sendi
Muhammad Sendi - 10.09.2020 21:11

Thank you, this is what i am looking for.
I was searching how to retrieve data from html when user type text in the form i manually created. Django form is just looks so crude and i have this beautiful css form. The method what i am looking for is response.POST.get(name of the input element). thank you

Ответить
CodingByDay
CodingByDay - 23.06.2020 09:13

Tim. This is not connected to a database right? I'm making a ticketing system with django and trying to figure out how to submit data to the database, this is ony dict, right? forms.Model.form for the db right?

Ответить
Barnaby Patterson
Barnaby Patterson - 18.06.2020 12:40

Really excellent video, does anyone else have an issue where when click save the check boxes don't remain. In console appears that 'c' isn't being assigned a value hence doesn't save anything?

# where one button was clicked...
<QueryDict: {'csrfmiddlewaretoken': ['8PRrUvTyoJCZXOkSVta13TZKmlHd4QmAya2TjHmITFd4FdXoeUsWmFiIcxzKaur4'], 'c': ['clicked'], 'save': ['save'], 'new': ['']}>
# where two buttons were clicked...
<QueryDict: {'csrfmiddlewaretoken': ['zHLVgt6ZduL3nuSmINRT50MYxdXhmOgaZ2WnFFz9Iqm85TvS1e9OoM5WnpPOsslE'], 'c': ['clicked', 'clicked'], 'save': ['save'], 'new': ['']}>

Any help appreciated.

Ответить
F F GAMER
F F GAMER - 11.06.2020 15:11

I love this django series...

Ответить
Yew Mun Yip
Yew Mun Yip - 29.05.2020 09:01

Is there a github for this? I checked my code but when I check or uncheck the boxes, and click "Save", it doesn't save.

Ответить
Jhonny Kokos
Jhonny Kokos - 09.05.2020 19:28

Man, that's so good, thank you for your effort!

Ответить
Brad S
Brad S - 05.05.2020 05:54

I used this. It helped me!

Ответить
Didier Genier
Didier Genier - 06.04.2020 17:28

Hi Tim,
First of all my apologies about my english... I'm french speaker from Switzetrland !
I folowed some of your tutorials with great pleasure and solved my problems with your knowledges.
I wonder if you could make a tutorial about a problem I encount with forms.
In fact, I need to filter a choice_list with the content of a previous choice_list field. For example, first choice would be Countries and the second will be filtered only with the Cities of the previously selected country.
I attempted with a module named "django-complete-light" but I'm not able to solve that.
May be, you'll have another path or possibility to explain like in yours previous tutos.


In all cases, thank you a lot for your tutorials very helpfull.
Didier

Ответить
Austin Jackson
Austin Jackson - 30.03.2020 22:59

Awesome series

Ответить
Sahara Manson 1
Sahara Manson 1 - 25.03.2020 21:38

Nice bro keep it up........

Ответить
Sahara Manson 1
Sahara Manson 1 - 25.03.2020 21:38

Nice bro keep it up........

Ответить
Sahara Manson 1
Sahara Manson 1 - 25.03.2020 21:38

Nice bro keep it up........

Ответить
Sahara Manson 1
Sahara Manson 1 - 25.03.2020 21:38

Nice bro keep it up........

Ответить
khaliz khalili
khaliz khalili - 10.03.2020 03:30

But how does the db gonna be look like? Are u using mongo db or mssql or mysql or something else?

Ответить
kevin morte
kevin morte - 30.12.2019 19:29

Hi Tim! Great topic that of custom forms :) How would you approach if you wanted to save a form with a dropdown menu?

Ответить
Alex Shea
Alex Shea - 17.11.2019 14:41

When I attempted this the save button didn't work, it set all of the checkboxes unchecked. When testing the code the statement:
response.POST.get("c" + str(item.id)) stored the value "on" not "clicked" so I changed the IF statement in the for loop to:
if response.POST.get("c" + str(item.id)) == "on":


All works now.

Ответить
Mohammed Ashfaque Aslam
Mohammed Ashfaque Aslam - 15.11.2019 17:42

When i check an item and press save all the items vanish and only appear again if I press reload why is this happening

Ответить
Okan
Okan - 08.10.2019 23:52

Great Sir! Can you do the class based and home page with each posts and each forms on the same page, commenting like facebook? Thanks Sir

Ответить
Abdulrahman tijani
Abdulrahman tijani - 21.08.2019 10:21

really enjoying your videos. however I came across a problem in this video. when I click save or add item, nothing updates. A new item does not get added nor does the check box update whenever I click or unclick it. I have checked my code multiple times line by line and everything seemed the same as yours. Plz help :(

Ответить
하늘바라기
하늘바라기 - 27.06.2019 13:12

this is really nice learned alot. thanks! :D by the way how did u start learning Django? tutorials? docs?

Ответить
Mohd Fayed
Mohd Fayed - 08.06.2019 19:33

I am using your code, clicked or not .. It uncheck all !!!

Ответить
Paul
Paul - 29.05.2019 00:35

What I find confusing is how to organize ' the widgets' on the website is there a way to do it with x and y

Ответить
Николай Зейналов
Николай Зейналов - 22.04.2019 13:22

Hi Tim! First of all - thx! Great videos as always.
If i make everything just as you - when i'm creating a new item in my list, it appear checked (with tick in checkbox) and if i click save button all checkbox update their status vice versa (what was checked - unchecked...)
I solve this problem by:
if response.POST.get("c" + str(item.id)) == "clicked":
item.complete = False - i made it false
else:
item.complete = True
...
and:
if len(txt) > 2:
ls.item_set.create(text=txt, complete=True) - and here i made it True
...
but i didn't get why it happened like this?

Ответить
Nehat
Nehat - 21.04.2019 20:39

Little bit confusing video

Ответить
Matiu
Matiu - 21.04.2019 00:08

Holy shit I was looking for something like web development with python and you showed up. Perfect timing :)

Ответить
Sa Inco
Sa Inco - 20.04.2019 23:05

thanks.

Ответить
Ranga bharath
Ranga bharath - 20.04.2019 19:54

Thank you so much. Awesome tutorial bro. Keep doing 👍😀

Ответить
Hadi Masri
Hadi Masri - 20.04.2019 19:39

Hello bro i do not have a computer and i am coding from my phone, i am also confused between learning ML and learning Django, pls what do u recommend me?

Ответить
Hadi Masri
Hadi Masri - 20.04.2019 19:38

Always the first, for the one i love

Ответить