# -*- coding: utf-8 -*-

{{% if view_template %}}
# from {{{ package.dottedname }}} import _
{{% endif %}}
{{% if view_base_class == 'DefaultView' %}}
from plone.dexterity.browser.view import DefaultView
{{% elif view_base_class == 'CollectionView' %}}
from plone.app.contenttypes.browser.collection import CollectionView
{{% else %}}
from Products.Five.browser import BrowserView
{{% endif %}}
from zope.interface import implementer
from zope.interface import Interface
{{% if view_template %}}

# from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
{{% endif %}}

class I{{{ view_python_class_name }}}(Interface):
    """ Marker Interface for I{{{ view_python_class_name }}}"""


@implementer(I{{{ view_python_class_name }}})
class {{{ view_python_class_name }}}({{{ view_base_class }}}):
{{% if view_template %}}
    # If you want to define a template here, please remove the template from
    # the configure.zcml registration of this view.
    # template = ViewPageTemplateFile('{{{ view_template_name }}}.pt')

    def __call__(self):
        # Implement your own actions:
{{% if view_base_class != 'BrowserView' %}}
        return super({{{ view_python_class_name }}}, self).__call__()
{{% else %}}
        return self.index()
{{% endif %}}
{{% else %}}
    def __call__(self):
        template = '''<li class="heading" i18n:translate="">
          Sample View
        </li>'''
        return template
{{% endif %}}
