[Answer]-Understanding Django (from source code): attributes of field via models.CharField and forms.CharField

1👍

Talking about django.db.models.Field and django.forms.Field are exactly two different machines. But still in real life we need forms that supposedly need to map the models. To accomplish that, django has provided us with the concept of django modelforms which we make by passing name of the model.

By default django modelforms shows same name as that of django models but in case you need to override the name, you can by overriding __init() in django modelforms as also specified in here to further clarify your understanding.

The code base of django is already developed and is still being developed to the extent of optimization. The point of learning is deeply admired but falling down into complexities is just waste of effectiveness and beats the purpose of being called as a Rapid Application Development Technology.

Whatever is given in official docs is self sufficient and deep enough to help you gain a great understanding. Ths only best way to learn a framework is to learn its error messages then you will automatically be the master of intricacies of this framework.

Leave a comment