This file contains hidden or 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 xmlrpclib | |
import pprint | |
client = xmlrpclib.ServerProxy('http://pypi.python.org/pypi') | |
packs = client.user_packages('toutpt') | |
infos = [] | |
BLACKLIST = [ | |
'epwithgis.openlayers', | |
'pasteFunBot', | |
'Products.AROfficeTransforms', |
This file contains hidden or 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 logging | |
from zope import interface | |
from zope.component import getUtility, getMultiAdapter | |
from Products.Five.browser import BrowserView | |
from Products.statusmessages.interfaces import IStatusMessage | |
from plone import api | |
from cirb.blog.interfaces import IBlogContainer | |
from plone.contentrules.rule.interfaces import IRuleAction, IRuleCondition |
This file contains hidden or 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
language: python | |
python: 2.7 | |
env: | |
- TARGET=test | |
- TARGET=coverage.sh | |
- TARGET=python-validation.sh | |
# - TARGET=css-validation.sh | |
# - TARGET=js-validation.sh |
This file contains hidden or 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
recipe = collective.recipe.supervisor | |
plugins = | |
superlance | |
port = 9001 | |
user = mustapha | |
password = secret | |
serverurl = http://supervisor.mustap.com | |
programs = | |
10 zeo ${zeo:location}/bin/runzeo ${zeo:location} | |
20 instance1 ${instance1:location}/bin/runzope ${instance1:location} true |
This file contains hidden or 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
# Ported by Matt Sullivan http://sullerton.com/2011/03/django-mobile-browser-detection-middleware/ | |
import re | |
from Products.Five.browser import BrowserView | |
reg_b = re.compile(r"(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino", re.I|re.M) | |
reg_v = re.compile(r"1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta) |
This file contains hidden or 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
# Add this as python scrip tin the ZMI | |
res = "CONTENT OF THE FILE GOOGLE HAS GAVE YOU" | |
context.REQUEST.response.setHeader('X-Theme-Disabled', 'True') | |
return res |
This file contains hidden or 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.publisher.interfaces.browser import IDefaultBrowserLayer,\ | |
IBrowserPublisher | |
from zope.component.hooks import setSite | |
import zope.interface | |
from zope.component._api import getAdapters | |
import shutil | |
import os | |
from Testing import makerequest | |
portal = app.restrictedTraverse('adria-rcse') |
This file contains hidden or 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 upgrade_fss2attr_storage(portal_setup): | |
"""We use fss on plone3, so we need first to come back to default | |
plone so the migration of plone will next do the job to go on blob""" | |
site = portal_setup.aq_parent | |
#fss2attributestorage | |
from cStringIO import StringIO | |
from Products.Archetypes.Storage import AttributeStorage | |
from iw.fss.FileSystemStorage import FileSystemStorage | |
# attr_storage = AttributeStorage() | |
fss_storage = FileSystemStorage() |
This file contains hidden or 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
catalog = container.portal_catalog | |
types = container.portal_types.objectIds() | |
views = {} | |
for t in types: | |
brains = catalog(portal_type=t) | |
for brain in brains: | |
ob = brain.getObject() | |
layout = ob.getLayout() |