Edgewall Software

Changes between Version 12 and Version 13 of TracPluggableModules


Ignore:
Timestamp:
Jan 11, 2005, 6:10:56 PM (19 years ago)
Author:
Christopher Lenz
Comment:

Comments on todays code drop

Legend:

Unmodified
Added
Removed
Modified
  • TracPluggableModules

    v12 v13  
    136136Plug-ins should also be able to not only hook into the web-interface, but also into TracAdmin. The approach for this would be similar to the one discussed above, meaning that modules should be able to contribute commands.
    137137
     138== Status ==
     139
     140I'm currently working on this code locally, and uploading tarballs as attachments to this page. The code is in prototype state, i.e. it is fully functional but is far from doing the stuff Trac can do. There isn't even database access yet.
     141
     142The tarball from 01/11/2005 has the following:
     143 * A working plug-in system as described above, minus the configuration of which plug-ins are to be loaded.
     144 * A new (and as of yet incomplete) abstraction layer between the Trac web-application and the web-server. Unlike the current {{{trac.core.Request}}} class, it provides separate request and response objects. It is based on [http://www.python.org/peps/pep-0333.html WSGI] with a simple adapter for CGI. ''This doesn't really have much to do with the plug-in system, it's just another refactoring that I'm playing with in the same sandbox.''
     145 * An interactive shell that allows testing the Trac web-app from the command-line (in {{{trac/web/testserver.py}}}).
     146 * A new abstraction layer on top of the ClearSilver templating engine. It allows populating the HDF using native Python data structures such as lists and dicts.
     147 * ClearSilver templating is a plug-in ({{{trac/web/clearsilver.py}}}), request dispatching is a plug-in ({{{trac/web/dispatcher.py}}}) and building the web-site chrome (e.g. the navigation) is another plug-in ({{{trac/web/chrome.py}}}). Hooking into HTTP authentication is also a plug-in ({{{trac/web/ext_auth.py}}}). The idea with the latter is that we could provide an alternative plug-in that would do form-based authentication.
     148 * Plug-in stubs for the ticket, changeset, timeline and search modules.
     149
     150For testing the code, you'll need a normal Trac 0.8 environment set up. The easiest way then is to use the interactive shell:
     151
     152{{{
     153$ cd trac-pluggable_20050111
     154$ PYTHONPATH=. python trac/web/testserver.py /path/to/projenv
     155> import trac.web.clearsilver
     156> import trac.plugins.timeline
     157> get /timeline
     158}}}
     159
     160That last command will simulate an HTTP request, and you should get the response printed to the console. To get the HDF of a response, type:
     161
     162{{{
     163> get /timeline?debug=1
     164}}}
     165
     166You can import any plug-in you want using the {{{import modulename}}} command, the plug-ins will need to be on the Python path of course.
     167
    138168== Your Ideas Wanted ==
    139169