Commits

Jan-Jaap Driessen committed 212ae35

Add documentation for integrators.

Comments (0)

Files changed (2)

    paste_deploy
    api
    libraries
+   integration
    community
    development
 

doc/integration.rst

+Integration
+===========
+
+Fanstatic can be integrated with a number of web frameworks:
+
+* zope/grok through :pypi:`zope.fanstatic`   
+
+* django through django_fanstatic_.
+
+.. _django_fanstatic: http://bitbucket.org/fanstatic/django-fanstatic
+
+In order to integrate fanstatic with your web framework, make sure the 
+following conditions are met:
+
+* **base_url**: if your web framework supports virtual hosting, make sure
+  to set the ``base_url`` attribute on the NeededResources object. 
+
+* **error pages**: if your web framework renders error pages, make sure to
+  clear the NeededResources before rendering the error page, in order to
+  prevent resources from the original page to 'leak' onto the error page.
+
+* **url calculation**: fanstatic can also serve non-javascript and non-CSS
+  resources such as images that you link to from the views in your application.
+  In order to do so, we advise to support rendering URLs to resources
+  from the view/page templates in your web framework.
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.