Django form without using model

Submitted 3 years, 2 months ago
Ticket #343
Views 264
Language/Framework Django
Priority Medium
Status Closed

Is it possible to prepare django form without using models

If possible please help me out...

Submitted on Feb 08, 21
add a comment

1 Answer

Verified

Yes it is possible by using ModelForm() in a forms.py file which is seperately created like below

from django import forms

class NameForm(forms.Form):
    name = forms.CharField(label=' name', max_length=100)

you can also refer to this for more detailed information about forms: django forms

Submitted 3 years, 2 months ago


Latest Blogs