Closed jameelhamdan closed 3 years ago
Hi,
Thanks for the PR, though I guess you also have a customized widget to make it work?
If that's the case, you can overwrite the template in your own app by creating a template with the same path and placing your app before django-leaflet
in your INSTALLED_APPS
.
Yes I have customized the template to make it work in my project, but in the default django widgets specifying the class
in attrs kwarg is expected to add that class to the input tag, so i added support for that in this pull request
What I meant is that class
is not in the context data of this template by default, you probably modified the class as well? In that case, just merging the template without modifying the class has no sense.
@Gagaro this pull request also solves issue where django's is-invalid
error css class is not appended to element class, and validation message under field does not show under field.
All right then :+1:
Add
class
context variable to template to enable adding custom classes to input