Hardik Rana

Intersted in Machine learning and artificial intelligence.Exploring various fields of computer science like web development,Android development

More On Forms In Django and API In Forms

I hope you have read our earlier post on creating basic forms in django.In this post we will go in detail. More On Fields In FormsĀ  Consider a below ContactForm class which we can be used to implement “contact me” functionality on a any personal website. from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) …

More On Forms In Django and API In Forms Read More »

API in forms-Free Django Tutorials

I hope you have checked our last post on forms in which we have covered on form.is_valid() to validate data. So continuing that in which we have entered some wrong data as following: data = {‘subject’: ”, ‘message’: ‘Hi there’, ‘sender’: ‘invalid email address’, ‘cc_myself’: True} f = ContactForm(data) f.is_valid() False So is_valid() is giving …

API in forms-Free Django Tutorials Read More »