A datepicker is rather different from a plain TextInput widget so I think 
it's good design to use a separate widget. If Django provided datepicker 
functionality, I'm fairly sure it would be provided as a separate widget 
rather than instructing users to use something like 
forms.TextInput(tag='duet-date-picker'). Consider widgets 
like NumberInput,  EmailInput, URLInput. We use separate widgets rather 
than something like forms.TextInput(input_type='number').
On Friday, July 24, 2020 at 1:18:27 PM UTC-4 1337 Shadow Hacker wrote:

> If I understand correctly:
>
> - changing attrs declaratively is "clean enough"
> - changing the tag input declaratively is "not clean enough, a custom 
> widget and template must be done"
>
> This seems contradictory to me.
>
> Should I subclass every widget to add a custom template that allows 
> changing the tag name ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c1d3eb5d-b5aa-4b12-a585-2e1b74d0c68cn%40googlegroups.com.
  • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
    • ... Adam Johnson
      • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
        • ... Adam Johnson
          • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
            • ... Carlton Gibson
              • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
                • ... Carlton Gibson
                • ... Tim Graham
                • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
                • ... Tim Graham
                • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
                • ... Tim Graham
                • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)
                • ... '1337 Shadow Hacker' via Django developers (Contributions to Django itself)

Reply via email to