using the form module in python django -
in django there form module , inside there form class
from django import forms class myform(forms.form): name = forms.charfield() but if did:
from django.forms import form class myform(form): name = ?? my question if form class inside module form , inheriting then
while creating forms why have explicitly call forms.charfield().
its 'coz charfield class exists in forms.fields, have import forms write forms.charfield.you can write this:from django.forms.fields import charfield take @ file https://github.com/django/django/blob/master/django/forms/fields.py
Comments
Post a Comment