jazzband / jazzband/django-floppyforms
SelectDateWidget does not support template_name argument
- Dominant language
- Python
- Stars
- 836
- Forks
- 150
- PR merge metrics
- No merged PRs in 30d
Description
When used `template_name` argument to style the `SelectDateWidget` an "unexpected keyword argument 'template_name'" is shown.
The problem is easy, ´SelectDateWidget´ inherits from `forms.Widget` (from django.form) and does not include any code for reading `template_name` param.
The easiest solution while this gets solved is providing your own template with the same name as the default: "floppyforms/select_date.html" (it must be in your templates folder). That way, dajngo will get your template instead of the template provided by floppyforms.
Contributor guide
Research direction
Start with SelectDateWidget and its inheritance from forms.Widget, then inspect how the widget resolves the default floppyforms/select_date.html template. Verify that passing template_name no longer raises an unexpected-keyword error and that a custom template can still override the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100