← Back to team overview

launchpad-dev team mailing list archive

Re: Feature flag images

 

On Tue, May 15, 2012 at 1:48 PM, Huw Wilkins <huw.wilkins@xxxxxxxxxxxxx> wrote:

> Right, the issue actually doesn't have anything to do with feature flags.
> The issue is to do with why the local dev server does not serve
> sub-directories to the images folder.

This seems to be defined in lib/lp/app/browser/launchpad.py, wired up
from lib/lp/app/browser/configure.zcml

+icing is supposed too export a tree:

class IcingFolder(ExportedFolder):
    """Export the Launchpad icing."""

    export_subdirectories = True

    folder = os.path.join(
        config.root, 'lib/canonical/launchpad/icing/')

But images is something different, as it wants to strip extensions:

class LaunchpadImageFolder(ExportedImageFolder):
    """Export the Launchpad images - supporting retrieval without extension.
    """

    folder = os.path.join(
        config.root, 'lib/canonical/launchpad/images/')


ExportedImageFolder is a subclass of ExportedFolder, so adding the
following to LaunchpadImageFolder might do what you need:

    export_subdirectories = True

-- 
Stuart Bishop <stuart.bishop@xxxxxxxxxxxxx>


References