Skip to content

Instantly share code, notes, and snippets.

@giacomos
Created May 26, 2015 11:19
Show Gist options
  • Save giacomos/5fa94eaec2f765dae1a8 to your computer and use it in GitHub Desktop.
Save giacomos/5fa94eaec2f765dae1a8 to your computer and use it in GitHub Desktop.
1. Temporarely add to <src/ploneintranet/network/interfaces.py> these lines:
class ILikesContainer(Interface):
"""Stores likes.
"""
class ILikesTool(ILikesContainer):
"""Provide ILikesContainer as a site utility."""
2. run plone in debug mode:
bin/instance debug
3. retrieve the sitemanager for your site (adjust site's name as needed)
>>> sm = app['Plone'].getSiteManager()
4. import the missing interface
>>> from ploneintranet.network.interfaces import ILikesTool
5. unregister it:
>>> util = sm.getUtility(ILikesTool)
>>> sm.unregisterUtility(util, ILikesTool)
True
6. import transaction and commit:
>>> import transaction
>>> transaction.commit()
7. exit and remove the lines added in the point 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment