This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_and_add(file_upload, obj, workspace=None, token=None): | |
"""Extracts temporary attachments from storage and attaches them into `obj` | |
Extract file data `from file_upload`, create file/image objects and add | |
them as attachments to ``obj``. If workspace and token are given, reuse | |
previously uploaded temporary attachments if they exist. | |
""" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:2.7-wheezy | |
RUN mkdir /buildout | |
ADD . /buildout | |
WORKDIR /buildout | |
RUN python bootstrap.py | |
RUN bin/buildout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from zope.schema import getFields | |
from zope.interface import providedBy | |
from zope.interface import implementedBy | |
from zope.component import getUtility | |
from zope.component import queryUtility | |
from plone.behavior.interfaces import IBehavior | |
from plone.behavior.interfaces import IBehaviorAssignable | |
from plone.dexterity.interfaces import IDexterityFTI | |
from plone.dexterity.utils import resolveDottedName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from zope.interface import Interface | |
from zope.interface import implementer | |
from zope.interface import alsoProvides | |
from zope.component import adapter | |
from zope.traversing.interfaces import ITraversable | |
from zope.publisher.interfaces.http import IHTTPRequest | |
from ZPublisher.BaseRequest import DefaultPublishTraverse | |
from Products.Five.browser import BrowserView | |
from Products.CMFPlone.interfaces.siteroot import IPloneSiteRoot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import types | |
from signals_ahoy.signals import form_init | |
class ExtraHandler(object): | |
signal = None | |
@classmethod | |
def hook(cls, form_class): | |
cls.signal.connect(cls(), sender=form_class) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import types | |
from signals_ahoy.signals import form_init | |
class ExtraBase(object): | |
def __init__(self, name, instance): | |
self.name = name | |
self.instance = instance |