View widget.py
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 zope.interface | |
import zope.schema.interfaces | |
import z3c.form.interfaces | |
import z3c.form.browser.textarea | |
import z3c.form.widget | |
from plone.app.z3cform.widget import RelatedItemsWidget | |
class MyRelatedItemsWidget(RelatedItemsWidget): |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View gist:2c625d89c33c1010662c
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 renderTiles(request, tree): | |
""" | |
copy from blocks minus ESI stuff | |
""" | |
site = getSite() | |
siteUrl = site.absolute_url() | |
try: | |
root = tree.getroot() | |
except AttributeError: |
View gist:6358511
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 transaction | |
from copy import deepcopy | |
from cgi import escape | |
from cStringIO import StringIO | |
from logging import ERROR | |
from types import ClassType, FileType, StringType, UnicodeType | |
from zope.contenttype import guess_content_type | |
from zope.i18n import translate |
NewerOlder