Closed jmuncaster closed 9 months ago
Hi @jmuncaster โย Yes. Hmm. ๐ค
Grrr. I liked the syntax, so my initial reaction is along the lines of not my problem โย but OK, let's think about it ๐
And include the partial with something like
{% include-partial %}
?
That really turns me off. Can we come up with something better? (Maybe for the block tag pair? ๐ค) Naming as ever.
PyCharm's behaviour doesn't happen to be tweak-able does it?
Maybe partialdef
and endpartialdef
would be OK?
Any other ideas?
Totally understand the initial reaction :-)
I couldn't find a way to tweak PyCharm behavior other than to disable the check altogether. But PyCharm aside I don't think startX / endX is idiomatic, at least from what I've seen.
I think partialdef
/endpartialdef
would be great. I can't think of anything better. I think it is more idiomatic than partial
/endpartial
and the existing startpartial
/ endpartial
.
I just found out about this library from BugBytes, and I was so happy because so far:
I was glad to find this library, which seemed to be exactly what I was looking for.
But I got the same issue as the @jmuncaster . Please do care about us, PyCharm peasants, and try to fix this issue. I've been waiting for this library for almost a year ๐ฆ
I understand the turn off... But there must be a clean enough approach to make everyone happy. I vouch for:
Define: {% partialdef %} ... {% endpartialdef %}
Use: {% partial %}
Define: {% partialblock %} ... {% endpartialblock %}
Use: {% partial %}
Define: {% partialcontent %} ... {% endpartialcontent %}
Use: {% partial %}
And even this one does not seem SO bad.
Define: {% partial %} ... {% endpartial %}
Use: {% includepartial %}
@scriptogre I'm likely to do something here.
I just need a window to get it done. (Life..., but that's a separate topic.)
A PR changing the tags to partialdef
, as per the discussion, plus aliasing the existing startpartial
, and raising a depreciation warning, would help.
Hey Carlton! Sorry for the delay :). Had some life going on as well. Hope this is good enough! Let me know if you find any issues.
Hey @scriptogre -- no worries at all, this is the way ๐
I had an initial glance. It looks lovely. I'm just occupied elsewhere, and then will be swinging back here to put together an update. ๐คนโโ๏ธ
Fixed in 4c3c9cdb0984670beab032162856f8cf73fcdde2
Would it make more sense to define a partial with
{% partial %} / {% endpartial %}
to be consistent with other blocks?And include the partial with something like
{% include-partial %}
?I know it's a big deal to request a change of keywords, but it seems this would at least be consistent with what one IDE is expecting. Indeed,
{% if %} / {% endif %}
and{% block %} / {% endblock %}
work this way. Or perhaps a user option to choose the start/end tags?