Skip to content

Instantly share code, notes, and snippets.

View cyraxjoe's full-sized avatar

Joel Rivera cyraxjoe

View GitHub Profile
@cyraxjoe
cyraxjoe / cp_multihandler.py
Created December 22, 2012 00:41
Idea of multiple objects embedded in one class to use a particular handler depending on the Accept header.
import cherrypy
class MultiViewHandler(object):
def __new__(cls):
"""Do something to be able to use the right view to the
right Accept header
"""
class SpecialDispatcher(cherrypy.dispatcher.Dispatcher)
"""Custom dispatcher to use the special properties of the
@cyraxjoe
cyraxjoe / BadButtons.py
Created April 15, 2011 21:53
Pyjamas button bug in webkit
from pyjamas.ui.SimplePanel import SimplePanel
from pyjamas.ui.FormPanel import FormPanel
from pyjamas.ui.Button import Button
from pyjamas.ui.VerticalPanel import VerticalPanel
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.TextBox import TextBox
from pyjamas import Window
class BadButtons(FormPanel):