-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Rationalize Templates #147
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
Conversation
(Btw the PR obviously is not ready yet, just submitted to have a head start ;) ) |
This much more elegant than the I'm a bit afraid of two things :
|
Jinja was made for desiners and in general it was made to be simpler than Python coding. I think it should be enough to write that docs page
The code I've pushed does not deal with plugins so I can't answer that. I will answer your question about how to deal with plugins leveraging Jinja in the other thread. |
I like the idea of having a @BibMartin can you take a second pass at this in light of your plugin branch? |
I'll take a look at it this or the coming weekend (sorry, deadlines and holidays to sort out first) 😝 |
How are we on this? Is it worth re-basing and merging or does #170 changed the game? I am sorry for not participating on this as much as I should. But I got some free time and I want to fix that 😉 |
ping! |
It's probably good to see what @BibMartin has to say about this, whether this PR still makes sense to be merged and how it relates to the last changes in the codebase. |
@BibMartin I guess that this does not fit in the latest code, correct? @themiurgo are you OK closing this? PS: Before closing let's just check if we can steal any ideas 😉 |
It does not fit in the lastest code, but the concern of rationalizing templates is still relevant. In the latest code, most template code is written inside python code (with triple quotes) and most templates are either not used or used in tests only. Though this is not uniformely true. I think a coming question is : do we want to generalize this mindset, or to separate python code and templates ? |
I like the templates inside the code like you are doing. Life is much easier that way 😉 Unless someone brings a good reason not to do so let's move in that direction. We need a PR to remove the unused templates and/or updated the tests. Closing this. |
Yes, I was ok closing this. Perhaps in the future we'll do again something similar. |
👍 |
This is a first attempt at rationalising folium templates, leveraging Jinja's awesome features (http://jinja.pocoo.org/docs/dev/templates/#template-inheritance) and avoid code duplication and bugs (such as #105).
@ocefpaf could you take a look at this once you come back from SciPy? 😃
I have tested the simple folium template and it seems to be working as normal. We should also test the geojson and see if it has any problems.