Commits

Ralph Bean committed 73ca7c9

initial commit

Comments (0)

Files changed (12)

+# use glob syntax.
+syntax: glob
+
+*.egg-info
+.coverage
+*.pyc
+*~
+*.swp
+*.rej
+tags
+dist
+build
+.hg*
+tw2core
+tw2devtools
+tw2forms
+tw2jquery
+tw2.jquery.plugins.ui
+virtualenv-*
+*.egg
+recursive-include tw2/etc/templates *
+recursive-include tw2/etc/static *
+ToscaWidgets 
+============
+
+.. split here
+
+ToscaWidgets is a web widget toolkit for Python to aid in the creation,
+packaging and distribution of common view elements normally used in the web.
+
+tw2.etc contains 'etcetera' widgets.  random stuff you might want.
+

development-deps/develop-tw2-destroy-and-setup.sh

+#!/bin/bash -e
+
+devbase=development-deps
+venv=$devbase/virtualenv-tw2.jquery
+$(
+    rm -rf $venv
+) || echo "Did not destroy $venv"
+
+virtualenv $venv --no-site-packages
+
+source $venv/bin/activate
+
+pushd $devbase
+
+pip install genshi
+pip install mako
+pip install formencode
+
+hg clone http://bitbucket.org/paj/tw2core || \
+        (pushd tw2core && hg pull && popd)
+hg clone http://bitbucket.org/paj/tw2devtools || \
+        (pushd tw2devtools && hg pull && popd)
+hg clone http://bitbucket.org/paj/tw2forms || \
+        (pushd tw2forms && hg pull && popd)
+hg clone http://bitbucket.org/toscawidgets/tw2jquery || \
+        (pushd tw2jquery && hg pull && popd)
+echo "ONE TWO"
+git clone http://github.com/ralphbean/tw2.jqplugins.ui.git || \
+        (pushd tw2.jqplugins.ui && git pull && popd)
+echo "THREE FOUR"
+
+pushd tw2core ;  python setup.py install ; popd
+pushd tw2forms ; python setup.py install ; popd
+pushd tw2devtools ; python setup.py install ; popd
+pushd tw2jquery ; python setup.py install_lib install_egg_info ; popd
+pushd tw2.jqplugins.ui ; python setup.py install_lib install_egg_info ; popd
+
+popd # $devbase

development-deps/develop-tw2-start.sh

+#!/bin/bash
+
+devbase=development-deps
+venv=$devbase/virtualenv-tw2.jquery
+source $venv/bin/activate
+
+python setup.py install_lib install_egg_info && paster tw2.browser
+
+
+
+from setuptools import setup, find_packages
+
+setup(
+    name='tw2.etc',
+    version='2.0a0',
+    description='Random extra widgets for ToscaWidgets 2.',
+    long_description = open('README.rst').read().split('.. split here', 1)[1],
+    author='Ralph Bean',
+    author_email='ralph.bean@gmail.com',
+    url='http://toscawidgets.org/docs/tw2.core/',
+    install_requires=[
+        "tw2.core>=2.0b4",
+        ],
+    packages=find_packages(exclude=['ez_setup', 'tests']),
+    namespace_packages = ['tw2'],
+    zip_safe=False,
+    include_package_data=True,
+    test_suite = 'nose.collector',
+    entry_points="""
+        [tw2.widgets]
+        # Register your widgets so they can be listed in the WidgetBrowser
+        tw2.etc = tw2.etc
+    """,
+    keywords = [
+        'toscawidgets.widgets',
+    ],
+    classifiers = [
+        'Development Status :: 3 - Alpha',
+        'Environment :: Web Environment',
+        'Environment :: Web Environment :: ToscaWidgets',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+        'Topic :: Software Development :: Widget Sets',
+        'Intended Audience :: Developers',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+    ],
+)
+__import__('pkg_resources').declare_namespace(__name__)

tw2/etc/__init__.py

+"""
+This package contains random widgets.
+"""
+
+from widgets import *

tw2/etc/samples.py

+
+
+from widgets import IFrameWidget
+
+class DemoIFrame(IFrameWidget):
+    width="700px"
+    height="400px"
+    src="http://threebean.wordpress.com"

tw2/etc/templates/__init__.py

Empty file added.

tw2/etc/templates/iframe.mak

+<%namespace name="tw" module="tw2.core.mako_util"/>\
+% if w.title:
+<h1>${w.title}</h1>
+% endif
+<iframe ${tw.attrs(attrs=w.attrs)}>
+<p>Your browser does not support iframes.</p>
+</iframe>

tw2/etc/widgets.py

+import tw2.core as twc
+
+class IFrameWidget(twc.Widget):
+    template = "tw2.etc.templates.iframe"
+    title = twc.Param("Title (optional)", default=None)
+    height = twc.Param(default='100%', attribute=True)
+    width = twc.Param(default='100%', attribute=True)
+    src = twc.Param("Source for the iframe", attribute=True)