Skip to content
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

Conversation

tim-schilling
Copy link
Contributor

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.

@tim-schilling
Copy link
Contributor Author

@aaugustin What's your take on some features only being available to certain versions of Django?

@aaugustin
Copy link
Contributor

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.

@tim-schilling
Copy link
Contributor Author

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.

@aaugustin
Copy link
Contributor

Related: #693.

@tim-schilling
Copy link
Contributor Author

@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?

@aaugustin
Copy link
Contributor

I find it acceptable to provide more features on more recent Django versions.

Note that the current patch uses settings.TEMPLATE_LOADERS which is deprecated in Django 1.8.

@tim-schilling
Copy link
Contributor Author

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.

@aaugustin
Copy link
Contributor

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.

@tim-schilling
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants