Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Fanstatic related javascript tools packaged as a fanstatic library.

Project Description

js.fanstatictools

Introduction

This library provides some javascript helpers for use with fanstatic.

Get URLs of resources from within Javascript

When you need to load other (fanstatic) resources inside your javascript, you may want to calculate the URL to the fanstatic library the resource is defined in. Using relative URLs does not work, because they are calculated relative to the windows URL, not to the URL of the current script, which can be different.

After including the js.fanstatictools.lib_url fanstatic resource, you are able to call fanstatictools.get_library_url(‘name_of_your_library’), which returns the url. Add the filename of the resource to the end and you are done.

How to use?

You can import url from js.fanstatictools and need it where you want these resources to be included on a page:

>>> from js.fanstatictools import lib_url
>>> lib_url.need()

CHANGES

0.1 (2013-05-15)

  • Initial release.
Release History

Release History

This version
History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
js.fanstatictools-0.1.zip (10.4 kB) Copy SHA256 Checksum SHA256 Source May 15, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting