This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

okonomi

Incredibly simple static javascript file handling.

from any template, as many times as you want:

{% jsrequire /path/to/my/js.js %}

or:

{% jsrequire http://google.com/some/api %}

okonomi will take care of getting just the right <script> includes into the HEAD of your template using the hideous ${JS} sigil that you must include in a base template somewhere.

django settings

  • OKONOMI_STATIC_URL set this to whatever makes sense for your django project.
  • OKONOMI_STATIC_PATH set this to whatever makes sense for your django project.
  • OKONOMI_HTML_PATH_TEMPLATE defaults to <script type="text/javascript" src="%s"></script>\n
  • OKONOMI_HTML_URL_TEMPLATE defaults to <script type="text/javascript" src="%s"></script>\n

Requirements

Locally hosted media

  • ${JS} sigil in HEAD or somewhere:

    {% jsrequire /formchecking.js %}
    
  • add /formchecking.js to set() in context

… (repeat in various templates) …

  • middleware:
    • generate key from what is in the set()
    • not cached?
      • read all the js files, concat, cache
    • insert <script src="/js/cache_key"></script> for ${JS}

Remote hosted media

  • ${JS} sigil in HEAD or somewhere:

    {% jsrequire https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.js %}
    
  • add url to set() in context

… (repeat in various templates) …

  • middleware:
    • insert <script src="url"></script> for each remote include

author

Nathaniel Smith <nate.smith@coxinc.com> for Cox Media Group Digital & Strategy

license

okonomi is licensed under the MIT license.

Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
okonomi-0.1.1.tar.gz (7.9 kB) Copy SHA256 Checksum SHA256 Source Jun 28, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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