Skip to content

Instantly share code, notes, and snippets.

View ale-rt's full-sized avatar

Alessandro Pisa ale-rt

View GitHub Profile
@ale-rt
ale-rt / gist:8685751
Last active January 4, 2016 22:09
How to make collective.lineage and collective.simplesocial work together
Just add to the zcml-additional those lines
```
[instance]
...
zcml-additional =
<configure xmlns="http://namespaces.zope.org/zope">
<adapter for="collective.lineage.interfaces.IChildSite"
factory="collective.simplesocial.browser.configlet.FacebookSettingsAdapter"
provides="collective.simplesocial.browser.interfaces.IFacebookSettings"
/>
def plonereload(user="admin", password='admin'):
''' Reload Plone
'''
from requests import get
from lxml.html import fromstring
auth = (user, password)
response = get('http://localhost:7081/reload?action=code', auth=auth)
try:
print fromstring(response.text).find('.//pre').text
@ale-rt
ale-rt / gist:7820888
Last active December 30, 2015 11:09
SQLLite
apt-get install libsqlite3-0 libsqlite3-dev sqlite3
[saconfig]
recipe = collective.recipe.template
sqlalchemy_url = sqlite:///${buildout:directory}/var/albo.db
sqlalchemy_extras = 
input = ${buildout:directory}/templates/arpa.albo.zcml.in
output = ${buildout:directory}/etc/arpa.albo.zcml

If you got this error:

kees@zeno:~/Projects/buildout.coredev$ xvfb-run ./bin/test -m Products.CMFPlone
Running Products.CMFPlone.testing.CMFPloneLayer:Functional tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.z2.Startup in 0.147 seconds.
  Set up plone.app.testing.layers.PloneFixture in 5.623 seconds.
  Set up plone.app.event.testing.PAEventLayer in 0.562 seconds.
  Set up plone.app.contenttypes.testing.PloneAppContenttypes in 1.353 seconds.
  Set up Products.CMFPlone.testing.ProductsCMFPloneLayer in 0.078 seconds.