Recognizing mustache variables with alternative delimiter?

Answered

I'm creating a web2py project.  In web2py views, the {{ }} type delimiters are used in the templating language.  I also have an Ractive template in the same view.  To avoid conflicts, I changed the Ractive delimiters to square brackets ([[ ]]).  This all works fine, but pycharm doesn't expect the square brackets and peppers my page with errors.  Is there any way to let it know that both styles of delimiter denote template variables?

 

Thanks!

0
2 comments

Hi Toby, unfortunately, the only workaround I can think of is to disable template language in Settings | Languages & Frameworks | Python Template Languages to stop false positive errors. Please vote for the corresponding ticket: WEB-7671.

0

I made that change in the settings, but it greatly increased the number of errors shown.  I set it back to web2py.  I did upvote the ticket you mentioned.

 

Thank you.

 

 

0

Please sign in to leave a comment.