In this video, I'll cover how to add Bootstrap classes to Django form fields so your forms don't look horrific. There are a couple of ways to do it.
The first way I talk about is by overriding __init__.
The second way is by changing the attributes after the field has been created.
The third and most common way is to just add a attrs dictionary to a widget.
If all this sounds confusing, just check out the video. I don't take credit for any of this knowledge; I'm just trying to make this knowledge more digestible for people that get more out of watching videos.
Helpful links:
https://stackoverflow.com/questions/4...
https://docs.djangoproject.com/en/2.2...
https://docs.djangoproject.com/en/2.2...
Watch video How to Add HTML Classes to Django Form Fields online, duration hours minute second in high quality that is uploaded to the channel Jarad Python 17 May 2019. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 2,837 times and liked it 49 visitors.