From 499cd1707bf8974cc7d17b3a0e5bc45f06cb023b Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 16 Jun 2011 10:28:22 -0400 Subject: [PATCH] Exposing flot_js. --- setup.py | 2 +- tests/test_imports.py | 4 ++++ tw2/jqplugins/flot/__init__.py | 1 + tw2/jqplugins/flot/base.py | 5 +++-- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 tests/test_imports.py diff --git a/setup.py b/setup.py index ff9c03b..d3b395b 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='tw2.jqplugins.flot', - version='2.0a3', + version='2.0a4', description='toscawidgets2 wrapper for the flot jQuery plugin', long_description=long_description, author='Ralph Bean', diff --git a/tests/test_imports.py b/tests/test_imports.py new file mode 100644 index 0000000..afdc896 --- /dev/null +++ b/tests/test_imports.py @@ -0,0 +1,4 @@ + + +def test_import_js(): + from tw2.jqplugins.flot import flot_js diff --git a/tw2/jqplugins/flot/__init__.py b/tw2/jqplugins/flot/__init__.py index 60cf987..df7872f 100644 --- a/tw2/jqplugins/flot/__init__.py +++ b/tw2/jqplugins/flot/__init__.py @@ -4,3 +4,4 @@ """ from widgets import * +from base import flot_js diff --git a/tw2/jqplugins/flot/base.py b/tw2/jqplugins/flot/base.py index 68defbd..54e2968 100644 --- a/tw2/jqplugins/flot/base.py +++ b/tw2/jqplugins/flot/base.py @@ -1,11 +1,12 @@ import tw2.core as twc -import tw2.jquery.base as twjq_c +import tw2.jquery import defaults flot_js = twc.JSLink( modname=__name__, - filename='static/jqplugins/flot/0.7/jquery.flot.min.js' + filename='static/jqplugins/flot/0.7/jquery.flot.min.js', + resources = [tw2.jquery.jquery_js], ) __all__ = ['flot_js']