<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>hurry.zoperesource</name>
<shortdesc>hurry.resource integration for Zope.</shortdesc>
<description>Zope integration for hurry.resource
***********************************

This package provides Zope integration for hurry.resource. This means
three taking care of three things:

* maintain the needed resources throughout the request/response cycle.

* know how to make a URL to a resource.

* make so that resource references are automatically inserted in the
  HTML header.

This library fulfills these conditions for a Zope 3/Grok setup.

We'll run through a few tests to demonstrate it. Note that the real
code being tested is not in this document itself, but in the views described
in ``ftesting.zcml``.

We need to be in a request to make this work, so let's up a request to
a page we have set up in ``ftesting.zcml`` that should cause the
inclusion of a single resource in its header::

  &gt;&gt;&gt; from zope.testbrowser.testing import Browser
  &gt;&gt;&gt; browser = Browser()
  &gt;&gt;&gt; browser.handleErrors = False
  &gt;&gt;&gt; browser.open('http://localhost/hurry.zoperesource.test_single')
  &gt;&gt;&gt; print browser.contents 
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="http://localhost/@@/foo/a.js"&gt;&lt;/script&gt;
  &lt;BLANKLINE&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;the widget HTML itself&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;

If a resource happens to need another resource, this resource is also
automatically included::

  &gt;&gt;&gt; browser.open('http://localhost/hurry.zoperesource.test_multiple')
  &gt;&gt;&gt; print browser.contents 
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="http://localhost/@@/foo/a.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="http://localhost/@@/foo/b.js"&gt;&lt;/script&gt;
  &lt;BLANKLINE&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;the widget HTML itself&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;

Let's force all javascript resources to be forced to be included at
the bottom now, just before the ``&lt;/body&gt;`` tag::

  &gt;&gt;&gt; browser.open('http://localhost/hurry.zoperesource.test_bottom')
  &gt;&gt;&gt; print browser.contents 
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;the widget HTML itself&lt;/p&gt;
  &lt;script type="text/javascript" src="http://localhost/@@/foo/a.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://localhost/@@/foo/b.js"&gt;&lt;/script&gt;&lt;/body&gt;
  &lt;/html&gt;

CHANGES
*******

0.2 (2008-10-13)
================

* Add support for rendering fragments at the bottom of the page. When
  you call ``hurry.resource.bottom`` resources which are marked bottom-safe
  will be rendered at the bottom of the web page instead of in the ``&lt;head&gt;``
  section. When you call ``hurry.resource.bottom(force=True)``, *all*
  ``.js`` resources will be included at the bottom.

0.1 (2008-10-11)
================

* Initial public release.

Download
********</description>
<maintainer><foaf:Person><foaf:name>Martijn Faassen</foaf:name>
<foaf:mbox_sha1sum>e05fd101401f47289595dc0293c30336b4dd953f</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.2</revision></Version></release>
</Project></rdf:RDF>