Open mbourqui opened 6 years ago
@mbourqui sure! would be nice to have a template column for GenericIPAddressField type, I'll check the PR (once it arrives). Thanks in advance!
Well we can try to improve in our code, because new fields will be added, so maybe in templatetag when field is get, we can use a try catch and if fail then use a generic template as django do.
I agree with @luisza, a fallback template would be ideal. For example, in this case, I simply copied the textfield template, which is actually the same as most of the templates (and thus lots of code duplication). I do not have much time right now, but if you'd like, I can have a look in a few weeks (2 or 3). By quickly checking the code, it looks like it would be easier by having a tag or filter to handle the fallback.
The template for the column representing a GenericIPAddressField is missing.
As I need it in one of my projects anyway, I will soon submit a PR.