Skip to content

Commit

Permalink
Merge pull request #26 from plone/jensens-housekeeping
Browse files Browse the repository at this point in the history
Housekeeping
  • Loading branch information
thet committed Apr 18, 2016
2 parents 323b5ba + 29925e8 commit a64546d
Show file tree
Hide file tree
Showing 37 changed files with 519 additions and 946 deletions.
10 changes: 10 additions & 0 deletions CHANGES.rst
Expand Up @@ -4,8 +4,18 @@ Changelog
2.0.0 (unreleased)
------------------

- Housekeeping and minor cleanup.
[jensens]

- Moved KeywordTile and TableOfContentsTile to common.py.
[jensens]

- Simplify basic viewlet proxy tiles.
[jensens]

- Removed support for Plone 4.3. For Plone 4.3 support, please use
plone.app.standardtiles < 2.0.
[datakurre, jensens]


1.0 (2016-04-11)
Expand Down
7 changes: 1 addition & 6 deletions plone/__init__.py
@@ -1,7 +1,2 @@
# -*- coding: utf-8 -*-
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__)
7 changes: 1 addition & 6 deletions plone/app/__init__.py
@@ -1,7 +1,2 @@
# -*- coding: utf-8 -*-
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__)
14 changes: 9 additions & 5 deletions plone/app/standardtiles/attachment.py
@@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from Products.CMFCore.utils import getToolByName
from Products.MimetypesRegistry.common import MimeTypeException
from plone.app.standardtiles import PloneMessageFactory as _
from plone.autoform.directives import widget
from plone.formwidget.multifile.widget import MultiFileFieldWidget
Expand All @@ -10,8 +8,10 @@
from plone.namedfile.utils import stream_data
from plone.supermodel.model import Schema
from plone.tiles import PersistentTile
from Products.CMFCore.utils import getToolByName
from Products.MimetypesRegistry.common import MimeTypeException
from zope import schema
from zope.interface import implements
from zope.interface import implementer
from zope.publisher.interfaces import IPublishTraverse
from zope.publisher.interfaces import NotFound

Expand All @@ -21,7 +21,11 @@ class IAttachmentTile(Schema):
widget(files=MultiFileFieldWidget)
files = schema.List(
title=_(u'Upload files'),
value_type=NamedBlobFile(title=_(u"Please upload a file"), required=True))
value_type=NamedBlobFile(
title=_(u"Please upload a file"),
required=True
)
)


class AttachmentTile(PersistentTile):
Expand Down Expand Up @@ -87,13 +91,13 @@ def lookupMime(self, name):
return name


@implementer(IPublishTraverse)
class AttachmentTileDownload(object):
"""Implementation of the @@download view on the attachment tile.
This is a view onto the AttachmentTile tile view.
"""

implements(IPublishTraverse)
index = None

def publishTraverse(self, request, name):
Expand Down

0 comments on commit a64546d

Please sign in to comment.