Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2315: TGandFirePython.diff

File TGandFirePython.diff, 2.0 KB (added by vinces1979, 3 years ago)
  • main/TGandFirePython.rst

     
     1 
     2Using FirePython with TurboGears2 
     3============================== 
     4 
     5:Status: Work in progress 
     6 
     7.. contents:: Table of Contents 
     8    :depth: 2 
     9 
     10FirePython is a sexy Python logger console integrated into Firebug. 
     11 
     12Requires 
     13---------------- 
     14 
     15  - Firefox - http://www.mozilla.com/en-US/firefox/ 
     16  - Firebug - https://addons.mozilla.org/en-US/firefox/addon/1843 
     17  - FireLogger - https://addons.mozilla.org/en-US/firefox/addon/11090 
     18 
     19 
     20Installing Stuff 
     21---------------------- 
     22 
     23If you haven't installed TG2, you'll need to do that first (http:docs.turbogears.org/2.0/RoughDocs/DownloadInstall). Once you've got an up-to-date version of TG2,  you'll need to install FirePython and some dependancies, which you can do by:: 
     24 
     25  easy_install firepython 
     26  easy_install python-cjson 
     27  easy_install jsonpickle 
     28 
     29After that's done, you can create a new TG2 project in the normal way :: 
     30 
     31  paster quickstart firepythontest 
     32  ... 
     33  cd firepythontest 
     34  paster serve development.ini --reload 
     35 
     36Your project should now be started, and you should be able to browse to it at http://127.0.0.1:8080 
     37 
     38Adding FirePython Support 
     39---------------------------- 
     40 
     41Now, you're ready to add FirePython Middleware to your app:: 
     42 
     43Edit firepythontest/config/middleware.py  
     44 
     45  Add: 
     46    from firepython.middleware import FirePythonWSGI 
     47 
     48  Insert After line "app = make_base_app(global_conf, full_stack=True, **app_conf)" 
     49    app = FirePythonWSGI(app) 
     50 
     51This will wrap your Turbogears App with FirePython, and any/all Log messages will become available in Firebug. 
     52 
     53 
     54 
     55 
  • toc.rst

     
    131131 
    132132   main/Auth/Authentication 
    133133   main/TGandPyAMF 
     134   main/TGandFirePython 
    134135   main/RoutesIntegration 
    135136   main/StaticFile 
    136137   main/Mako