Render Django Form Manually - Make Custom Form with Form Validations | Code Band

preview_player
Показать описание
In this video, I'll show you how to render Django Form Manually so that you get the exact same form as in the Template you downloaded but with the power of validations through Django Forms.
~ Code Band

:) You Can Find Me On:
Рекомендации по теме
Комментарии
Автор

I've seen some people create a form in the html template with names for the fields and then get the values of these fields by the name in the view when the request is post, so they don't create a forms.py file. Why did you create a forms.py file to set the names of your model fields if it's possible without it, or is you way better??
My second question is if I have a ManyToManyField in a model that inherits from another model which contains an ImageField to upload images to my db, I wanna make a custom form in html template where I can display all my images that are in the database and be able to select multiple images and when I submit the form I want the selected images to be stored as the values of the ManyToManyField I mentioned before, is such thing possible in Django??
I hope you answer me and thank you for making this video.

realdaly
Автор

Hey man, thank you for the video but ı cant save the form into database by form.save(). What do ı have to do and Problem is form.save is not valid for forms.Form, it is for forms.ModelForm how can ı do it by ModelForm

Huseyin-tyqd
Автор

I was just looking for such video for a long For that case you got my sub :)

TuksimAdventures
Автор

Thank you brother. You saved my life as a manual html snippets developer. Do you have any tutorial for saving and updating data from a custom form(Plain HTML Form) using django forms.

venkatesh.jeyakumaresan
Автор

how can I assign those value in the database?

tasniasharmin
Автор

Hi brother. What is the difference between function base view and class base view? Which one is u prefer to use?

misfarsiddeek
Автор

Can you provide a video for user define sign up form containing "password" & "email" is very less videos of it

akshatchouhan
Автор

Awesome stuff keep doing. 😊
Subscribed.

mahadev
Автор

hi, when I use the reverse_lazy() function it threw the 405 error

instructorleonardolopez