New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Template Panel support for other template engines. #637
Adding Template Panel support for other template engines. #637
Conversation
523aa53
to
417e83c
Compare
@aaugustin What's your take on some features only being available to certain versions of Django? |
The debug toolbar is so widely used that you must preserve compatibility with every supported version of Django — 1.4, 1.6, and 1.7 at this time. |
What's meant by "preserve compatibility"? It could be interpreted as not breaking anything on previous versions, but introducing new features for the current and future versions. This change in particular doesn't break or reduce functionality on < 1.6. It would result in the same thing that happens today, the Template Panel doesn't display any content. For 1.6+ though it would show the templates as if they were Django templates. |
Related: #693. |
@aaugustin Could you read my last comment and give me your opinion? Either way, I'm going to have to take a another look at this PR to make sure 1.8 will work. However I'd like to know what the standard is for building out features, do they have to work for every version, or can they fail gracefully on older versions? |
I find it acceptable to provide more features on more recent Django versions. Note that the current patch uses |
Cool, I wanted to be on the same page in term of Django versions and functionality. I'm going to close this as it's not needed with #711 being merged in. |
Oops - I didn't notice the overlap. If you think I merged #711 too quickly let's talk! The patch was small and made sense, so I went ahead, but I didn't check the big picture. |
No, not at all. I was going to merge it in myself. I think my solution with this PR is a little too clever monkey patching things on the fly and would get the same result as #711. |
This is another take on the concept of supporting non-Django template engines. However, this will only support Django 1.6+ as it makes use of ``import_by_path`.
The solution makes use of decorators. I got the idea from @nyergler's PR #168.