Re: Problem Working with forms.Form

2015-12-07 Thread Teddy McZieuwa
Thank you very much, I was able to use ModelForm with widgets...Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups

Re: Problem Working with forms.Form

2015-12-06 Thread sum abiut
You can use modelForm. for example in you form.py file, you can do something like this: class addstaff(forms.ModelForm): class Meta: model =new_staff fields =('first_name', 'last_name', 'gender', 'date_of_birth') and in your view.py you do something like this: def newstaff(

Re: Problem Working with forms.Form

2015-12-06 Thread Gergely Polonkai
Hello, you should use ModelForm; if the only problem you have is the CSS properties, you may assign custom CSS classes to your widgets, and use templates to render your fields individually. Best, Gergely On Dec 6, 2015 5:33 PM, "Teddy McZieuwa" wrote: > Hi, > please, I am new to django, I just

Problem Working with forms.Form

2015-12-06 Thread Teddy McZieuwa
Hi, please, I am new to django, I just need to know to save to a database while using 'forms.Form' utility and how does it know which database model to use. I do not want to use the 'forms.ModelForm' because i would like to customize, I don't want django giving me its default style form. Please