[BlueBream] Fanstatic integration

Mats mats at ronin-group.org
Thu Jul 21 14:33:00 EDT 2011


I'm trying to use Fanstatic to include resources but it doesn't seem
to work so I must be doing something wrong.

I have an entry point in my setup.py

      entry_points = """
      [paste.app_factory]
      main = iport.startup:application_factory

      [paste.global_paster_command]
      shell = iport.debug:Shell

      [fanstatic.libraries]
      iport = iport.app.skin.resource:library
      """,

My resource.py file in iport/app/skin looks like this:

from fanstatic import Library, Resource

library = Library('iport', 'static')
style = Resource(library, 'style.css')

And I have a directory in iport/app/skin named 'static' where my
'style.css' file is located.

I have a z3c.form DisplayForm

...
from iport.app.skin import resource

class IPortDisplayForm(FormLayoutSupport, form.DisplayForm):
    fields = field.Fields(IIPort)

    def update(self):
        resource.style.need()

But when I navigate to the display form there is no inclusion of the stylesheet.

What am I doing wrong?

Sincerely,

Mats


More information about the bluebream mailing list