You are here: Home Blog

Blog

Let's try this again. A whole bunch of years ago, I tried doing some blogging, and it didn't go so hot. Now, Core Software Group is doing a lot of exciting work with Plone, Django, Pyramid, and other Python based tools, and we are documenting various tips and tricks that we run into as we build custom solutions for our customers.

Apr 09, 2013

How to enable User Folders in Plone

by Mike Cullerton — last modified Apr 09, 2013 03:22 PM

User Folders are an option in Plone. You can turn them on In the Security settings area of Site Setup (Plone Control Panel). Here's how I enabled User Folders in Plone from within my product.

I needed to enable the User Folders feature of Plone from within my product. My first thought was to use a Generic Setup profile, but the solution was setuphandlers.py.

I inspected the Enable User Folders button on the Security settings page of Site Setup, and saw the attribute was named enable_user_folders. I tried to find a generic setup profile I could edit.

The closest I got was adding enable_user_folders to properties.xml. This turned the attribute on in the ZMI, but not in Site Setup and User Folders were not enabled.

Then I found a reference to

security.enable_user_folders

in a setuphandlers.py file from the Rhaptos git repo.

So, I added these lines to setupVarious in my setuphandlers.py.
from plone.app.controlpanel.security import ISecuritySchema
site = context.getSite()
security = ISecuritySchema(site)
security.enable_user_folders = True

Now, when I install my product, User Folders are enabled automatically.

Note that you need to make sure setupVarious is turned on in configure.zcml.

<genericsetup:importStep
    name="your.package"
    title="your.package special import handlers"
    description=""
    handler="your.package.setuphandlers.setupVarious"
    />

 Hope this helps someone.

 

Apr 08, 2013

How to open SSH links in iTerm 2

by Mike Cullerton — last modified Apr 08, 2013 04:45 PM
Filed Under:

When I switched to iTerm 2, it wouldn't open ssh links for me. Instead, it opened new tabs. I finally solved the problem with a simple configuration change.

I know some of you have this problem. I've seen a few references to it on the net, but no solutions. iTerm 2 won't open ssh links.

I have a pyramid application that uses boto to query ec2 instances and then posts information about the instances--including an ssh link, to a web page on my laptop.

The ssh links open fine in iTerm. I couldn't get them to open in iTerm 2 though. Instead, they just opened new tabs.

I really like using iTerm 2, so to 'solve' the problem, I added the actual ssh shell command for each of the instances as text on the page.

To open an ssh connection to an instance, I simply copy the ssh command, click the link, paste the ssh command into the new terminal tab, and hit return.

Hey, it works.

Every once in a while, when it really bothers me, I try to figure out a real solution.

Today was one of those days.

The solution turned out to be pretty simple.

In the iTerm 2 Preferences, under the Profiles tab, General section, change the Command to Login shell.

Now, when I click on one of the links, it opens correctly in iTerm 2.

I hope it works for you too.

*Note that you must first have iTerm 2 set up to accept ssh connections. Preferences->Profiles->General->URL Schemes

 

Sep 14, 2012

Plone Hello World Tutorial

by Mike Cullerton — last modified Sep 14, 2012 01:25 AM

A simple introduction to Plone development.

About a month ago, there was a bit of a ruckus on twitter about the state of Plone and documentation and what not.

 

There was a specific request for a Hello World type tutorial introducing Plone development. After talking with Mikko and others on IRC, I put some ideas together and released a first attempt a few days later.

Over the last few weeks, I've put time into adding more sections, reorganizing the layout, and general cleanup. Tonight, I pushed those changes to the developer manual at http://collective-docs.readthedocs.org/en/latest/getstarted/helloworld/index.html

 

At this point it's starting to take shape. There are holes in it, and things I'd like to clean up, but it's a good start.

I'd like to get some feedback. What do folks think? What is missing? Are there any errors?  Really, anything helpful is appreciated.

You can comment here, or reach me @cullerton on twitter.

Thanks,

Mike

Apr 18, 2012

Plone Demonstrations on World Plone Day

by Chris Crownhart — last modified Apr 18, 2012 10:55 AM

On Wednesday, April 25, as part of a worldwide effort to promote and support Plone, we will be holding a World Plone Day event in Fort Collins, Colorado. Stop by for our brown bag lunch series featuring demos of the open source CMS.

Colorado World Plone Day LogoCore Software Group will be presenting demonstrations of Plone, an open source, python-based CMS, showing the latest features from the 4.1 release.

Demonstrations will show:

  • how content managers use the various tools in Plone
  • how administrators manage a Plone site
  • how developers can extend the CMS through building custom themes or custom products

For those interested, we can also:

  • show a variety of sites that we have built showing different solutions customers have requested
  • show how to quickly install and configure a Plone site

The presentations will last from approximately 12:00pm - 2:00pm.

For more information and to RSVP, visit the event page.

Sep 01, 2011

Fix for 404 Not Found Error for @@manage-portlets

by Chris Crownhart — last modified Sep 01, 2011 12:35 PM

In the midst of upgrading a Plone site from 2.5.x to 3.3.x (and eventually to 4.x), we discovered certain custom content types were returning a 404 error when accessing the @@manage-portlets page.

This one took a while to track down, so I thought I would write down our solution.  It turned out to be easy.  We simply added an interface to our custom content type's class as follows:

First import the necesary modules:

from zope.interface import implements
from plone.portlets.interfaces import ILocalPortletAssignable

 

Then we added an implements line to our class:

class SiteFolderCT(BaseFolder):
    """An Archetype for an SiteFolder application"""
    implements(ILocalPortletAssignable)
    <the rest of the class code...>

 

I hope this helps out others.

Document Actions
 
 
Copyright © 2003-2017 Core Software Group | 303/809-1001 | Fort Collins, Colorado | All rights reserved.