Skip to content
Advertisement

Tag: django-forms

Django manual forms

I am trying to get my head around using manual forms. When I have in my forms.py checked that fields name and email is readonly And in the html But still when submitting without name and email, got error on missing both name and email. If anyone can help, much appreciated Answer You used placeholder in the input fields, when

How to get user id from the related field model in django?

views.py models.py I have two models 1. User model, 2. VendorDetails model (vendoruser is connected by foreignkey relationship with vendordetails) Here I save the User extra details (VendorDetailsForm) if the requested user is applying for a vendor. I could be saved the requested user details in VendorDetails Model. But when I am getting the requested user id, I can’t .

Django Model form not rendering

Im trying to create a model form on django but it doesnt want to render even though I mapped it properly and created the path. models.py forms.py views.py it refuse to render but it displays the html tag that is in the file but not the fields from the form. this is the html template AppsForm.html Answer you view is

Advertisement