http://kmlinux/~culik/foto/inst/

soubory setup.tgz, TGFastData-0.9a7-py2.5.egg

su -
tar xzf setup.tgz
./easy_install TGFastData-0.9a7-py2.5.egg
from tgfastdata import DataController
...
class Root(controllers.RootController):
    editor = DataController(Fotografie)
./easy_install TGWebServices
./easy_install TGWebServices-1.2.0-py2.5.egg
from tgwebservices.controllers import WebServicesRoot
from tgwebservices.controllers import wsexpose, wsvalidate
 
    @wsexpose(int)
    @wsvalidate(int, int)
    def multi(self, a, b):
        return a*b

http://localhost:8080/multi?a=4&b=2

    @wsexpose(str)
    @wsvalidate(int)
    def nazev(self, id):
        return Fotografie.get(id).nazev
 
    # http://localhost:8080/nazev?id=1
class Info:
    nazev = ""				       
    soubor = ""				       
 
class Root(controllers.RootController):
 
    @wsexpose(Info)
    @wsvalidate(int)
    def obrazek(self, id):
	foto = Fotografie.get (id)
	info = Info ()
	info.nazev = foto.nazev
	info.soubor = foto.soubor    
        return info

http://localhost:8080/static/MochiKit-1.3.1/examples/color_wheel/index.html http://localhost:8080/static/MochiKit-1.3.1/examples/draggable/index.html

 
turbogears5.txt · Last modified: 2008/04/24 15:02 by 147.32.8.115
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki