3 ms·
Great to have this, but I very much dislike the idea of changing the base Form classes just to get a different rendering. What I've been doing in Django is usi
by andr 15y ago
Great to have this, but I very much dislike the idea of changing the base Form classes just to get a different rendering.
What I've been doing in Django is using Jinja template macros to create my own rendering for the standard form classes. Not ideal, but sticks to the idea of separation of logic and presentation.
- StavrosK 15y agoCould you paste some sample code? Is it worth using Jinja over Django's templates?
- earle 15y agoThe template tags and filters will certainly solve most use cases, but there are specific reasons why Django implements Forms outside of the template -- there will be significant functionality you cant (and shouldnt) achieve through a template. This is why the base Form was extended. To each their own.