Plone 5 and templates (easytemplate, uwosh.snippets)

I've merged the p5 branch into master, so https://github.com/collective/uwosh.snippets is up to date

The 2.0.0 egg is now at https://pypi.python.org/pypi/uwosh.snippets

@dbitouze let me know how it works!

Many thanks to both of them!

I'll give it a try later today but the documentation is not as complete as the collective.easytemplate one: can I use arbitrary properties and, if so, where am I supposed to define them (must I use the Plone registry, as suggested by hvelarde?)

Just to let you know:

  • Some warnings concerning 'uwosh.snippets':

      Getting distribution for 'uwosh.snippets'.
      warning: no files found matching 'uwosh/snippets' anywhere in distribution
      warning: no files found matching '*.css' anywhere in distribution
      warning: no files found matching '*.pt' anywhere in distribution
      warning: no files found matching 'uwosh/snippets/profiles/default/structure' anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.DS_Store' found anywhere in distribution
      no previously-included directories found matching 'uwosh/snippets/tests/robot'
      no previously-included directories found matching 'uwosh/snippets/tests'
      Got uwosh.snippets 2.0.0.
    
  • A syntax error concerning 'martian' (AFAICS installed as dependency):

      Getting distribution for 'martian==0.15'.
      warning: no files found matching '*.mo' anywhere in distribution
        File "build/bdist.linux-i686/egg/martian/testing_compat3.py", line 26
              class FakeModuleObject(object, metaclass=FakeModuleObjectMetaclass):
                                                      ^
      SyntaxError: invalid syntax
      
        File "/home/bitouze/plone-stage-latex/buildout-cache/eggs/tmpedzoH_/martian-0.15-py2.7.egg/martian/testing_compat3.py", line 26
              class FakeModuleObject(object, metaclass=FakeModuleObjectMetaclass):
                                                      ^
      SyntaxError: invalid syntax
      
      Got martian 0.15.
    

Those warnings are fine.

The snippets are any rich text, so instead of using a property, just put the date right in the snippet and use the snippet elsewhere.

I didn't succeed to make uwosh.snippets work. I'll open a new thread for this.

But is it possible to use these snippets in Python scripts?