[tg-tickets] Re: [TurboGears] #1130: logging crashes when URL contains unicode symbols and user is logged in (mod_python system)
#1130: logging crashes when URL contains unicode symbols and user is logged in (mod_python system) +--- Reporter: dado1945|Owner: anonymous Type: defect | Status: new Priority: normal |Milestone: 1.0b3 Component: TurboGears | Version: 1.0b1 Severity: normal | Resolution: Keywords: | +--- Comment (by dado1945): - Thanks for fixing wiki ;) - I can't reproduce this on console. Yes, I'm referring to the very same line: http://trac.turbogears.org/turbogears/browser/tags/1.0b1/turbogears/controllers.py#L450 URL is ascii but in line L450 it comes as UTF-8 encoded string. Example of UTF-8 URL: http://dado1945.storas.lt/wiki/lt/dado1945/Japoni%C5%A1kos%20%C4%AFdomyb%C4%97s Problem is in line 439. When you log in username becomes unicode string: http://trac.turbogears.org/turbogears/browser/tags/1.0b1/turbogears/controllers.py#L439 And turbogears fails to generate log entry (like in my given example with \xc5\xbev\xc4\x97ris) -- Ticket URL: http://trac.turbogears.org/turbogears/ticket/1130 TurboGears http://www.turbogears.org/ TurboGears front-to-back web development --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Tickets group. To post to this group, send email to turbogears-tickets@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-tickets -~--~~~~--~~--~--~---
[tg-tickets] Re: [TurboGears] #1136: [PATCH] Enable formencode and turbogears validator translation
#1136: [PATCH] Enable formencode and turbogears validator translation -+-- Reporter: ghorvath |Owner: anonymous Type: enhancement | Status: new Priority: normal |Milestone: 1.1 Component: unassigned | Version: trunk Severity: normal | Resolution: Keywords: | -+-- Comment (by ghorvath): I think you don't need the dummy function in your module. Just use the standard messages.mo TG mechanism for message extraction to the messages.mo file for your Validators and Widgets. I just wanted to seperate the standard translations from the custom one's. -- Ticket URL: http://trac.turbogears.org/turbogears/ticket/1136 TurboGears http://www.turbogears.org/ TurboGears front-to-back web development --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Tickets group. To post to this group, send email to turbogears-tickets@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-tickets -~--~~~~--~~--~--~---
[tg-tickets] Re: [TurboGears] #1136: [PATCH] Enable formencode and turbogears validator translation
#1136: [PATCH] Enable formencode and turbogears validator translation -+-- Reporter: ghorvath |Owner: anonymous Type: enhancement | Status: new Priority: normal |Milestone: 1.1 Component: unassigned | Version: trunk Severity: normal | Resolution: Keywords: | -+-- Comment (by alberto): Unfortunately I think I do. For {{{tg-admin i18n collect}}} to catch them I need to wrap them in {{{_()}}}, However if I do so without setting _ to a dummy I get the mentioned TypeError. If I don't restore it, then the strings in the widget will not get translated. However, this seems like a minor nuisance taking into account that I'm already moving custom validators to separate modules and I'm feeling better by doing so. So don't break your head too much on it. On the other hand, I'm not sure where other users are defining their validators so this might come back biting later... Alberto -- Ticket URL: http://trac.turbogears.org/turbogears/ticket/1136 TurboGears http://www.turbogears.org/ TurboGears front-to-back web development --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Tickets group. To post to this group, send email to turbogears-tickets@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-tickets -~--~~~~--~~--~--~---
[tg-trunk] Re: new calendar widget
It looks like the license for this project prohibits use in commercial applications. ref: comment #7 (by the author) on this page: http://www.frequency-decoder.com/2005/10/14/unobtrusive-date-picker-widgit/ Which sucks, because I think this one is really pretty too. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Trunk group. To post to this group, send email to turbogears-trunk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk -~--~~~~--~~--~--~---
[TurboGears] Re: Re-usable components
Thanks! Works nicely. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Identity, doing without sessions, and memcached
Hi all, I've some questions about TG's Identity extension: 1. My website must be customised on a per-user basis. But not on a per-session basis. Sessions introduce overhead, requiring DB writes every time a user logs in. Question: can I use Identity for user authentication, but avoid sessions entirely? That is, have the user's cookie contain username and password information, and match that against the DB with every page access? This will create a pseudo-session that's tied to the user's cookie, and will expire when the cookie expires (requiring the user to log in again). 2. From what I've read, memcached is cool. And is the one true solution for caching a scalable web application. I plan to use memcached to cache the DB content of my TG app. Question: does Identity support caching with memcached (from looking at the code, I suspect not)? Are there plans to introduce this? Does anyone else want it? I'm thinking of a system wherein, if it's not already there, the identity information for a particular user ID is placed in memcached (this goes for session IDs too), indexed by one of the unique keys (possibly username?). When the user accesses a page, their credentials are compared to the memcached data. If new data for that ID is written to the DB, or deleted from the DB, the associated memcached content would be updated or deleted accordingly. I'll implement (2) if other people want it, and nobody else has immediate plans to do so. Thanks, Stuart -- Stuart Clarke [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: install problems mac os x power pc
Hi... Michael Steinfeld wrote: Processing RuleDispatch-0.5a0.dev-r2115.tar.gz Running RuleDispatch-0.5a0.dev-r2115/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mweWH6/RuleDispatch-0.5a0.dev-r2115/egg-dist-tmp-BmbmrC gcc: installation problem, cannot exec 'i686-apple-darwin8-gcc-4.0.0': No such file or directory Some of the packages need a C-Compiler. You have to go to http://developer.apple.com first and get XCode. XCode 2.4 is the newest at the moment. It contains the gcc 4 compiler. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] expose doing more than one thing...
Hey there, I'm doing a technology preview of what TurboGears may look like in the near future - SQLAlchemy, Genshi, and Routes. So far, I like it a lot - Routes allows me to do some stuff I couldn't easily otherwise do. One problem I'm experiencing is that the expose decorator is what ties the templating so nicely into things in TG. But its primary purpose (at least going by the name) is to expose the function to CherryPy - to set the .exposed attribute on the function. So, maybe this is another vote for using @view instead sometime in the future - @expose(expose=False) looks a bit weird. Until then, I'll just create another decorator to remove the .expose attribute on the methods. Also, maybe I'm just missing something obvious on how to deal with a problem like this: Let's say I have a blogging site with multiple web logs. The base is http://foo.bar/, and individual blogs are at http://foo.bar/unique-name/. Within the blog itself, there is /archives, which uses the common pattern /archives/2006/10/03/post-name to find a post. There is /feed.xml, and /categories, and so forth. The base mechanism in TG only gets me to the default function on the root controller, and doesn't seem to offer me a way to restart the processing on the remainder of the path. So: http://foo.bar/unique-name/archives/2006/10/03/post-name I only get to RootController, method default, where I can look up the blog name. I can't then forward the rest of the request to a controller that handles the blog portion (say, BlogController). With Routes, this is somewhat easier, as I can dispatch to exact functions with Routes. Any ideas? Neil -- Neil Blakey-Milner [EMAIL PROTECTED] http://mithrandr.moria.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Identity, doing without sessions, and memcached
2. From what I've read, memcached is cool. And is the one true solution for caching a scalable web application. I plan to use memcached to cache the DB content of my TG app. Question: does Identity support caching with memcached (from looking at the code, I suspect not)? Are there plans to introduce this? Does anyone else want it? I'm thinking of a system wherein, if it's not already there, the identity information for a particular user ID is placed in memcached (this goes for session IDs too), indexed by one of the unique keys (possibly username?). When the user accesses a page, their credentials are compared to the memcached data. If new data for that ID is written to the DB, or deleted from the DB, the associated memcached content would be updated or deleted accordingly. Addendum: TG would probably benefit from a generic caching mechanism, which would apply to all object data. A cache API could be implemented, and then used by Identity and whatever else wants to. We could then have several implementations behind the API: disk, local memory, memcached, none. The cache used by Identity would be selectable and tuneable from the config files. One could also create (potentially several different) cache instances to use in other parts of ones app. What do people think? Stuart --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: [FE-discuss] [TurboGears] Re: FormEncode i18n translation integration in TurboGears
On Oct 3, 2006, at 6:32 AM, Gregor Horvath wrote: Ian Bicking schrieb: I don't expect this to be the case. FormEncode's code is not updated much, and releases are not frequent. I don't want to change that. You There has to be on release with the new i18n code in it. It would be ideal if a lot of translations would be in this release already. At the moment there is German in it. It would be best if people who consider to invest 1-2 hours to get their language supported should invest this time now! This is great news! Expect a translation to Spanish in a couple of hours :) Thanks! :) Alberto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Dynamic parameters in building select lists?
Chris wrote: Hello all, I'm starting from the wiki article on dynamically building the option lists in a multiple select field. http://trac.turbogears.org/turbogears/wiki/PassingArgumentsToCallables However, what I'm doing now involves 2 modifications: 1. I want the string part of the select field to be the synthesis of 2 DB fields. What I did here was to create a custom build_list() function on my SQLObject. OK. 2. I want to be able to dynamically change the filter on the return list. From the wiki page, what I want to be able to do is something like: # Only list colors that have some red in them, and sort alphabetically. widget = SingleSelectField('colors', options=make_list(Color, None, 'name', Color.q.r someVarible, orderBy=Color.q.name) where I have changed Color.q.r 0 to Color.q.r someVariable. I'm hoping to keep this all in my code, but I'm having a hard time finding a thread safe solution. I'm leaning towards creating a JSON call and dynamically building the list on the client side. Any other ideas? Chris Hi Chris, I have often found it useful to put things in charrypy.request. You could, for example, in your controller method do: cherrypy.request.min_r = someVariable and then in make_list() (with no parameters), do: Color.select(Color.q.r cherrypy.request.min_r) The reson that this works is because cherrypy.request is data for one request and is thread safe. The execution order is your controller, then expose which calls kid which calls your widget which calls make_list. So the variables you put in cherrypy.request are stored first and then used. They are also automatically thrown away from request to request. Anyway, HTH, and I hope I explained it clearly enough. Basically stuff things in cherrypy.request for later retrieval. Krys --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: [FE-discuss] [TurboGears] Re: FormEncode i18n translation integration in TurboGears
Gregor Horvath [EMAIL PROTECTED] writes: It would be best if people who consider to invest 1-2 hours to get their language supported should invest this time now! I'll be sending you a pt_BR today. -- Jorge Godoy [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Error on 'print self' ( raise AttributeError, '%s (with attribute %r)' % (e, name) )
I've verified this error on a second computer - one running Ubuntu 6.10 and one running OSX. both have sqlite 3.1.3 installed,though as i said i'm not sure if SQLObject is using that version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] EasyPlot - How I can change de Color Scheme? in option param?
How I can change de Color Scheme? in option param? i.e. colorScheme=officeOrange() My Code: data = [[0,0], [1,2], [2,3], [3,7], [4,8], [5,6]] option='''{xTicks:[{label: zero, v: 0}, {label: one, v: 1},{label: two, v: 2}, {label: three, v: 3},{label: four, v: 4},{label: five, v: 5}]}''' return dict(ep= EasyPlot(id=diag, style=bar, option=option, data=[data]) ) Thanks... -- maram http://maram.com.ar - http://geine.maram.com.ar Ubuntu Linux User - TurboGears User --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] How can I change de padding in Easy-Plot ?
hi. Sometimes my graph labels get cut-off. I another post in the plotkit list, I see: ...If you add padding:{left: 90, right:20, top: 10, bottom: 10} to the options (documented in the Renderer part of the documentation, then it will display the full label. The reason is there is not enough space between the edge of the container div and the canvas... My Code: data = [[0,0], [1,2], [2,3], [3,7], [4,8], [5,6]] option='''{xTicks:[{label: zero, v: 0}, {label: one, v: 1},{label: two, v: 2}, {label: three, v: 3},{label: four, v: 4},{label: five, v: 5}], barOrientation:horizontal }''' return dict(ep= EasyPlot(id=diag, style=bar, option=option, data=[data]) ) How can I change de padding in Easy-Plot ? I put: ... barOrientation:horizontal ,padding:{left: 90, right:20, top: 10, bottom: 10} but not work... Thanks... -- maram http://maram.com.ar - http://geine.maram.com.ar Ubuntu Linux User - TurboGears User --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: expose doing more than one thing...
Neil Blakey-Milner wrote: Hey there, I'm doing a technology preview of what TurboGears may look like in the near future - SQLAlchemy, Genshi, and Routes. So far, I like it a lot - Routes allows me to do some stuff I couldn't easily otherwise do. I hadn't heard anything about Routes being in the future for TG. My understanding was that the project is going to stick with CherryPy for the forseeable future. Do you have any pointers to what you saw that suggested this change? If this is just a bit of wishful thinking I agree with you. The rest of CherryPy is outstanding, but I prefer the explicit flexability of solutions like Routes. (That said CP can be very flexible, it just takes more cleverness than I like using in one place) One problem I'm experiencing is that the expose decorator is what ties the templating so nicely into things in TG. But its primary purpose (at least going by the name) is to expose the function to CherryPy - to set the .exposed attribute on the function. You can set the template in the return value as well, just return ' tg_template=yoursite.templates.templatename ' I don't know how firmly this is tied in to @expose, if at all. So, maybe this is another vote for using @view instead sometime in the future - @expose(expose=False) looks a bit weird. Until then, I'll just create another decorator to remove the .expose attribute on the methods. You might want to look into simply not using @expose and working with Routes directly. I don't see how changing @expose to @view is going to solve any problems for you. Also, maybe I'm just missing something obvious on how to deal with a problem like this: Let's say I have a blogging site with multiple web logs. The base is http://foo.bar/, and individual blogs are at http://foo.bar/unique-name/. Within the blog itself, there is /archives, which uses the common pattern /archives/2006/10/03/post-name to find a post. There is /feed.xml, and /categories, and so forth. The base mechanism in TG only gets me to the default function on the root controller, and doesn't seem to offer me a way to restart the processing on the remainder of the path. So: http://foo.bar/unique-name/archives/2006/10/03/post-name I only get to RootController, method default, where I can look up the blog name. I can't then forward the rest of the request to a controller that handles the blog portion (say, BlogController). I've been looking at this problem too. Remember that you can always call another controller function from within one, and return the value of it if you want. This situation would be handled by having a controller function that accepts the unique name and processes the rest of the arguments accordingly and calling that from the default function on your RootController. That is unless there is a better solution. I don't really care for that one too much as it moves the routing decision from one location (@expose decorator) to multiple locations. -Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Showing errors after validation.
I'm doing a simple manager where you can add, edit and list users.I have the following methods in my controller class: edit, add, save. Both edit and add use the same template, so I don't have to mantain two different templates. The add method, just creates a mock user and passes it to it's template. The template makes a Post to the save method. Here is my problem: I have an email validator, and I want to show the message to the user, but leave him the chance to modify his email, and save again. My problem is that I can't go back to the original page. What is the elegant way to solve this?Thanks to anyone who can help me... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: expose doing more than one thing...
Hi Neil, The base mechanism in TG only gets me to the default function on the root controller, and doesn't seem to offer me a way to restart the processing on the remainder of the path. So: http://foo.bar/unique-name/archives/2006/10/03/post-name I only get to RootController, method default, where I can look up the blog name. I can't then forward the rest of the request to a controller that handles the blog portion (say, BlogController). This is exactly the part that I dislike about CherryPy and love about Quixote. Some nice guy has created an imitation of Quixote's _q_traverse as a decorator: http://docs.cherrypy.org/quixote I've used it in one project and it seems to work fine, except for somewhat misleading error messages because of the decorator... HTH Ksenia --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: EasyPlot - How I can change de Color Scheme? in option param?
Maram: To be honest, I took a little time on this and was surprised that colorScheme code in PlotKit QuickStart Guide is work for me :-D http://media.liquidx.net/js/plotkit-doc/PlotKit.QuickStart.html howto: colorScheme is a kind of Renderer. In EasyPlot, option is for both Layout and Renderer (see doc) so just fill colorScheme key:value pair(entry) in option: . option='''{colorScheme: PlotKit.Base.palette(PlotKit.Base.baseColors()[1]), Since you are the man that use PlotKit/EasyPlot widget much, could you share some of your experience of PlotKit/EasyPlot by adding some doc or comment to turbogears doc? http://docs.turbogears.org/1.0/GenerateFigures -- Fred --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: How can I change de padding in Easy-Plot ?
Maram: If EasyPlot() is not that flexible to fit your need, maybe you'd start to try PlotKit() as well. PlotKit() just help you import all required library and left the freedom for you (not auto generate div and javascript code). -- Fred --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Showing errors after validation.
Have you tried putting @error_handler on the validating controller? Here is an example: from turbogears import error_handler def myform(self, **stuff): form code here @error_handler(myform) @validate(form=my_input_form) def myformvalidator(self, **stuff): handle result after validation Any validation errors result in the user being pushed to the controller listed as an error_handler. You can get more info here: http://docs.turbogears.org/1.0/ErrorHandling -Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: expose doing more than one thing...
Does anyone noticed the document about RoutesIntegration with turbogears http://trac.turbogears.org/turbogears/wiki/RoutesIntegration RoutesController seems intresting, but the development seems not go on... -- Fred --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: expose doing more than one thing...
On Tue 2006-10-03 (15:09), Adam Jones wrote: Neil Blakey-Milner wrote: Hey there, I'm doing a technology preview of what TurboGears may look like in the near future - SQLAlchemy, Genshi, and Routes. So far, I like it a lot - Routes allows me to do some stuff I couldn't easily otherwise do. I hadn't heard anything about Routes being in the future for TG. My understanding was that the project is going to stick with CherryPy for the forseeable future. Do you have any pointers to what you saw that suggested this change? If this is just a bit of wishful thinking I agree with you. The rest of CherryPy is outstanding, but I prefer the explicit flexability of solutions like Routes. (That said CP can be very flexible, it just takes more cleverness than I like using in one place) Well, Kevin has said (he'll correct me if I'm wrong, I'm sure) that he'd like to make using Routes easier (for legacy URLs, if I recall). But beyond that, nothing you're missing in terms of official direction. I chose it because it's an alternative. I already know SQLObject and Kid and the CherryPy way, so I'm trying the ways I know less well. One problem I'm experiencing is that the expose decorator is what ties the templating so nicely into things in TG. But its primary purpose (at least going by the name) is to expose the function to CherryPy - to set the .exposed attribute on the function. You can set the template in the return value as well, just return ' tg_template=yoursite.templates.templatename ' I don't know how firmly this is tied in to @expose, if at all. It's tied to @expose entirely... So, maybe this is another vote for using @view instead sometime in the future - @expose(expose=False) looks a bit weird. Until then, I'll just create another decorator to remove the .expose attribute on the methods. You might want to look into simply not using @expose and working with Routes directly. I don't see how changing @expose to @view is going to solve any problems for you. Okay, maybe I didn't explain myself well enough here. @expose does at least two things: 1) Sets .exposed so that CherryPy can find it 2) Does template magic, including content type/accept format, and so forth. While named after #1, most of what it does is #2. I also don't want #1 (it causes the method in question to be handled by CherryPy instead of using Routes via the default method), but I do want #2. But, @expose(expose=False) just feels ugly. Hence, perhaps @view _is_ a better name, even though I was originally in the @expose camp before I started trying to use alternate dispatching. Neil -- Neil Blakey-Milner [EMAIL PROTECTED] http://mithrandr.moria.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Where's the 0.8.9 download?
My guess is other people will find this thread just as I did - so I will post what I did to get around not being able to get ez_setup to work for version 0.8.9. I am a novice at this so I make no promises that it will work for you - but it worked for me. I was able to perform an offline install using the eggs I found here http://trac.turbogears.org/turbogears/browser/site_resources/oldeggs In my case I copied the following files to /usr/src: cElementTree-1.0.5-20051216.tar.gz CherryPy-2.1.1-py2.4.egg elementtree-1.2.6-py2.4.egg FormEncode-0.4-py2.4.egg json_py-3.4-py2.4.egg kid-0.8-py2.4.egg setuptools-0.6c3-py2.4.egg setuptools-0.6c3.tar.gz SQLObject-0.7.1dev_r1457-py2.4.egg TestGears-0.2-py2.4.egg TestGears-0.2.tar.gz TurboGears-0.8.9-py2.4.egg TurboGears-0.8.9.tar.gz BTW: I don't think I needed the cElementTree-1.0.5-20051216.tar.gz, TestGears-0.2.tar.gz and TurboGears-0.8.9.tar.gz files. I had grabbed them incase I had to rebuild from source for some reason. I then executed the following commands: cd /usr/src tar -zxvf setuptools-0.6c3.tar.gz cd /usr/src/setuptools-0.6c3 python2.4 setup.py install cd /usr/src easy_install -f . TurboGears You will also need to install the python database drivers for your system. In my case this was MySQL-python. I copied the MySQL-python-1.2.1_p2.tar.gz file into /usr/src and executed the following commands: cd /usr/src tar -zxvf MySQL-python-1.2.1_p2.tar.gz cd MySQL-python-1.2.1_p2 python2.4 setup.py build python2.4 setup.py install Hopefully this helps the next person who finds this thread... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: FormEncode i18n translation integration in TurboGears
Gregor Horvath schrieb: Is this concept OK? The protoype works. If it's OK I am going to make a patch to TG's trunk and apply the changes to http://svn.colorstudy.com/FormEncode/branches/gettext-enabled/ I have just submitted a patch to: http://trac.turbogears.org/turbogears/ticket/1136 Would be nice if someone could test this. Thanks for the translations of formencode so far. There are also some transalations in TurboGears to do. (see Patch) Would be nice if those get translated too. -- Greg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Error on 'print self' ( raise AttributeError, '%s (with attribute %r)' % (e, name) )
I've verified this on a third computer running windows anyone know what's going on? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Installing 1.0b1 over 0.9a9
I was having TG 0.9a9 . To install 1.0b1, I gave the following command: easy_install -U TurboGears After this, to see the current version info, while I give the command tg-admin info I got the following output: TurboGears Complete Version Information TurboGears requires: * TurboGears 0.9a9 * nose 0.9.0 * configobj 4.3.2 * RuleDispatch 0.5a0.dev-r2115 * setuptools 0.6c3 * FormEncode 0.5.1 * cElementTree 1.0.5-20051216 * PasteScript 0.9.7 * elementtree 1.2.6 * simplejson 1.3 * SQLObject 0.7.1dev-r1860 * CherryPy 2.2.1 * TurboKid 0.9.8 * TurboCheetah 0.9.5 * TurboJson 0.9.9 * PyProtocols 1.0a0 * Cheetah 1.0 * PasteDeploy 0.9.6 * Paste 0.9.7 * FormEncode 0.5.1 * kid 0.9.3 * Cheetah 1.0 * elementtree 1.2.6 Identity Providers * sqlobject (TurboGears 0.9a9) * sqlalchemy (TurboGears 0.9a9) tg-admin Commands * info (TurboGears 0.9a9) * shell (TurboGears 0.9a9) * quickstart (TurboGears 0.9a9) * update (TurboGears 0.9a9) * sql (TurboGears 0.9a9) * i18n (TurboGears 0.9a9) * toolbox (TurboGears 0.9a9) Visit Managers * sqlobject (TurboGears 0.9a9) * sqlalchemy (TurboGears 0.9a9) Template Engines * kid (TurboKid 0.9.8) * cheetah (TurboCheetah 0.9.5) * json (TurboJson 0.9.9) Widget Packages * tinymce (TurboTinyMCE 1.0.3) TurboGears Extensions * visit (TurboGears 0.9a9) * identity (TurboGears 0.9a9) Pondering whether anything went wrong? Thanks Sanjay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] yum install TurboGears
As per the documentation at http://docs.turbogears.org/1.0/InstallNix, I tried in my fedora 5 system: yum install TurboGears It showed this: = Package Arch Version Repository Size = Installing: TurboGears noarch 0.8.9-3.fc5 extras 427 k Installing for dependencies: python-TestGearsnoarch 0.2-1.fc5extras 17 k python-cherrypy noarch 2.1.1-1.fc5 extras 235 k python-formencode noarch 0.4-2.fc5extras 262 k python-json noarch 3.4-1.fc5extras 28 k python-kid noarch 0.9.3-1.fc5 extras 145 k python-setuptools noarch 0.6c2-1.fc5 extras 469 k python-sqlobjectnoarch 0.7.0-7.fc5 extras 349 k Transaction Summary = Install 8 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 1.9 M Is this ok [y/N]: N Seeing that TurboGears version as 0.8.9, I got confused whether it was about to install the old version, and so cancelled it. Wondering whether the rpm is obsolete, or something wrong in my system, or my intrepretation about the version is wrong. Thanks Sanjay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] drag and drop
How do I implement a drag and drop with MochiKit using Turbogears? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Error on 'print self' ( raise AttributeError, '%s (with attribute %r)' % (e, name) )
OK, a little more information... It turns out that this error only happens when objects are created, and when one of the overloaded _set_ methods calls another method which references 'self' it doesn't happen if the object has already been created, or if the _set_ method references self. Am i correct in assuming this is a bug? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: RemoteForm degradation, wiki page
Kevin Horn wrote: I haven't delved too deeply into your code, but I have seen this problem with refreshing the page instead of loading data into the widget when there is some error in the javascript. This can be either an error in javascript you have added, or perhaps the javascript for the widget isn't being found properly (I have seen both problems). Hope this is of some use... Kevin H This got me back on track. There was indeed an error executing the javascript... I just didn't notice it because it disapeared when the refresh happened. The error I was getting was 'getElement(loading) has no properties'. Once I put a sleep into the do_search method, it popped up like a sore thumb. So I flipped the divs to use ids instead of names, and it worked like a champ. (ie, in the template, div name=loading became div id=loading ) Kevin, thanks for pointing me in the right direction! -Ken PS: Someone migrated the documentation that I had attempted over to the new doc site (thanks to them, too), so I fixed the bug there as well. Would someone be willing to delete the broken version of the doc at the trac wiki? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] FastDataController with a non-guessable ID
Doing some development with Oprius Web Widgets, and wanted to use the FastDataController but with a hash for an ID instead of a database ID. I posted how to do it on the Oprius blog for those interested. The main tricks are to use an alternateID plus extending a field creation function in the model, and specifying the id_column in the controller. The blog post can be found here: http://blog.oprius.com/2006/10/03/fastdatacontroller-with-a-non-guessable-id/ -Owen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] It's a widget! It's an application! It's... neither.
Howdy!I believe there needs to be a new keyword (and associated aggregator in the CogBin) for generic extensions that add functionality to your application but do not provide widgets, controllers, etc. My specific example (which I'll be packing up and releasing in my next e-mail) is a multi-threaded outbound mail system for TurboGears. Unfortunately there is currently no way to distribute it in an obvious way.My recommendation is for the creation (and use) of the 'turbogears.extension' keyword to provide generic functionality using the entry point by the same name.Have a great day, Matthew Bevan, Systems AdministratorTop Floor Computer Systems Ltd. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] TurboMail 1.0 released!
It is my pleasure to announce TurboMail 1.0, a TurboGears extension to add multi-threaded outbound mail functionality to your TurboGears application. What is TurboMail? -- TurboMail is a TurboGears extension - meaning that it starts up and shuts down alongside TurboGears applications you write in the same way that visit tracking and identity do. TurboMail uses built-in Python modules for SMTP communication and MIME e-mail creation, but greatly simplifies these tasks by performing the grunt-work for you. Being multi-threaded, TurboMail allows you to enqueue messages to be sent and then immediately continue with processing, resulting in a much more fluid user experience. Threads are handled intelligently (increasing the number of threads as demand increases) and they are automatically recycled. There is only ever one SMTP connection per thread. Installing TurboMail Simply easy_install the package: easy_install TurboMail TurboMail installs no external scripts. Using TurboMail --- Before you can send mail, you must enable TurboMail and configure a server. This is done from your dev.cfg, prod.cfg, or app.cfg by placing the following in the general section: mail.on = True mail.server = smtp.myserver.net mail.username = None mail.password = None Set username and password only if your outgoing mail server require them. Once TurboMail is configured, import 'turbomail' into your controller's Python file and use the following code to send a simple plain-text message: message = turbomail.Message( '[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'Subject' ) message.plain = Plain text body. turbomail.enqueue(message) To send a message using a KID template: message = turbomail.TemplateMessage( '[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'Subject', 'application.templates.path', dict(wanted=An argument.) ) turbomail.enqueue(message) The final argument to the TemplateMessage constructor is a dictionary of arguments to pass to the KID template. Callable values will be resolved (executed) just prior to being sent. For additional information, visit the API reference: http://www.topfloor.ca/turbomail/documentation/reference/ Matthew Bevan, Systems Administrator Top Floor Computer Systems Ltd. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: TurboMail 1.0 released!
Hoho, Juicy! Is this already in the tg doc? ^^ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: TurboMail 1.0 released!
Hoho, Juicy! Is this already in the tg doc? ^^Alas, no. I'm working on the epydoc documentation for a bit, then I'll get set on writing something for the documentation area on TurboGears. However, the API documentation does have a LOT of information on it, and I keep uploading new versions of the documentation as I work on them.I'll be describing the important properties and methods first, then work out from there. I'll take requests. ;^) Matthew Bevan, Systems AdministratorTop Floor Computer Systems Ltd. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: install problems mac os x power pc
Of course I have Xcode installed. Here is an update to the problem and it is not unique to me. If anyone else has problems with Apples later patches ... Apples latest Tiger update breaks something, what, I am not exactly sure. In order to get Turbogears installed, on OS X 10.4.7+ Do not use the python binary pkg. You MUST compile python from source. Then TG will install smoothly. Took me awhile to figure this out, but after compiling from source everything was perfect. If I get some time later this week I will post the problem if I can discover it. On 10/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi... Michael Steinfeld wrote: Processing RuleDispatch-0.5a0.dev-r2115.tar.gz Running RuleDispatch-0.5a0.dev-r2115/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mweWH6/RuleDispatch-0.5a0.dev-r2115/egg-dist-tmp-BmbmrC gcc: installation problem, cannot exec 'i686-apple-darwin8-gcc-4.0.0': No such file or directory Some of the packages need a C-Compiler. You have to go to http://developer.apple.com first and get XCode. XCode 2.4 is the newest at the moment. It contains the gcc 4 compiler. -- -mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: install problems mac os x power pc
Sounds like you didn't install the Xcode universal SDK. You need that in order to compile software with the binary distros of Python. I think it's installed by default these days, but you may have turned it off. -bob On 10/3/06, Michael Steinfeld [EMAIL PROTECTED] wrote: Of course I have Xcode installed. Here is an update to the problem and it is not unique to me. If anyone else has problems with Apples later patches ... Apples latest Tiger update breaks something, what, I am not exactly sure. In order to get Turbogears installed, on OS X 10.4.7+ Do not use the python binary pkg. You MUST compile python from source. Then TG will install smoothly. Took me awhile to figure this out, but after compiling from source everything was perfect. If I get some time later this week I will post the problem if I can discover it. On 10/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi... Michael Steinfeld wrote: Processing RuleDispatch-0.5a0.dev-r2115.tar.gz Running RuleDispatch-0.5a0.dev-r2115/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mweWH6/RuleDispatch-0.5a0.dev-r2115/egg-dist-tmp-BmbmrC gcc: installation problem, cannot exec 'i686-apple-darwin8-gcc-4.0.0': No such file or directory Some of the packages need a C-Compiler. You have to go to http://developer.apple.com first and get XCode. XCode 2.4 is the newest at the moment. It contains the gcc 4 compiler. -- -mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Rebuilding TG after easy_install
On Oct 3, 2006, at 3:10 AM, Tjaart de Beer wrote: We are using LDAP for authentication in TurboGears. In order to do this we have to rebuild TG with the approriate modules included in setup.py. How do I include these modules and rebuild Tg when it is installed via the easy_install script (and not via a SVN copy on the local machine)? You shouldn't need to change TG itself. What do you need to change in TG that can't be done in a separate project? Kevin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: expose doing more than one thing...
Adam Jones wrote: Neil Blakey-Milner wrote: I'm doing a technology preview of what TurboGears may look like in the near future - SQLAlchemy, Genshi, and Routes. So far, I like it a lot - Routes allows me to do some stuff I couldn't easily otherwise do. I hadn't heard anything about Routes being in the future for TG. My understanding was that the project is going to stick with CherryPy for the forseeable future. Do you have any pointers to what you saw that suggested this change? If this is just a bit of wishful thinking I agree with you. The rest of CherryPy is outstanding, but I prefer the explicit flexability of solutions like Routes. (That said CP can be very flexible, it just takes more cleverness than I like using in one place) It will certainly be much easier (as in, a one-liner in your config: request.dispatch = RoutesDispatcher) to use Routes with CherryPy 3 if you see fit. At the moment, you need to write your own RoutesDispatcher*, but given its popularity, we may include a RoutesDispatcher in the default distro of CP 3 in the near future. Because CP 3 looks up the handler early and then calls it somewhere in the middle of the request handling process, it's not going to ever be *exactly* like Quixote; however, we're currently discussing ways to come close (via some extension to the default dispatch) before CP 3 final. Until (and after) that time, you can use Routes with CP. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] * A version for CP 2 is at: http://www.aminus.org/blogs/index.php/fumanchu/2006/02/26/making_a_custom_cherrypy_request_class_f It shouldn't be any more than upgrading that one a bit for CP 3 syntax; I just haven't gotten around to it yet. If anyone would like to beat me to the punch... ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: TurboMail 1.0 released!
A updated 1.0.1 version is now available which includes the following: * Minor updates to remove unneeded arguments. * Complete source-level epydoc documentation. Documentation is viewable in the source code and online at the following URL: http://www.topfloor.ca/turbomail/documentation/reference/ To update an existing TurboMail installation, run the following: easy_install -U TurboMail If you have not yet installed TurboMail, run the above without the -U option; the latest version will automatically be used. Have a great day, Matthew Bevan, Systems Administrator Top Floor Computer Systems Ltd. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Debugging with PyDev?
On 10/2/06, Nyenyec N [EMAIL PROTECTED] wrote: Hi, I'm using PyDev for TurboGears development but I can't make the debugger work. I tried to follow the steps described here: http://pydev.blogspot.com/2006/07/configuring-pydev-to-work-with.html But I tihnk that page is outdated. as far as I know nothing has change that will make it break and if I remenber correctly he never talk about debug mode, in fact one problem he had was that he couldn't run the projects from inside eclipse which if I'm correct will not let you debug either (disclaimer I install it to check it out tg/eclipse, I don't use pydev) :p I'm using turbogears 1.0b1and pydev 1.2.2 Putting a breakpoint in my controller seems to have no effect. When trying to step through my startup script in the debugger I get http://trac.turbogears.org/turbogears/ticket/1011 are you sure they are the same issue? if you look at the attachment I send to the patch it gets fixed if you import turbogears/set the trace in a different order. Anyone out there who could make PyDev debugging work with TurboGears? One last thing, remenber that one of the things that import turbogears line does is that it starts a CP server with 10 (default) threads, I'm not sure if you want to debug that :0 Thanks, nyenyec --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: Where's the 0.8.9 download?
On 10/3/06, mabgfounder [EMAIL PROTECTED] wrote: thanks for this link could you post it at http://docs.turbogears.org/1.0/RoughDocs, I'll move it to the 0.8 branch ones we make it. I posted some comments below. My guess is other people will find this thread just as I did - so I will post what I did to get around not being able to get ez_setup to work for version 0.8.9. I am a novice at this so I make no promises that it will work for you - but it worked for me. I was able to perform an offline install using the eggs I found here http://trac.turbogears.org/turbogears/browser/site_resources/oldeggs In my case I copied the following files to /usr/src: cElementTree-1.0.5-20051216.tar.gz CherryPy-2.1.1-py2.4.egg elementtree-1.2.6-py2.4.egg FormEncode-0.4-py2.4.egg json_py-3.4-py2.4.egg kid-0.8-py2.4.egg setuptools-0.6c3-py2.4.egg setuptools-0.6c3.tar.gz SQLObject-0.7.1dev_r1457-py2.4.egg TestGears-0.2-py2.4.egg TestGears-0.2.tar.gz TurboGears-0.8.9-py2.4.egg TurboGears-0.8.9.tar.gz BTW: I don't think I needed the cElementTree-1.0.5-20051216.tar.gz, TestGears-0.2.tar.gz and TurboGears-0.8.9.tar.gz files. I had grabbed them incase I had to rebuild from source for some reason. if there is a cElementTree egg file you don't need the tar. it seems you don't have it here. about testGears your right. if I remenber correctly the Turbogears.tar.gz was a zip with everything you needed made for packagers. so is either that one or all the separate files. if the old TG code works well with the new setuptools you can do an online install of setuptools with it's ez_setup. http://peak.telecommunity.com/dist/ez_setup.py I then executed the following commands: cd /usr/src tar -zxvf setuptools-0.6c3.tar.gz cd /usr/src/setuptools-0.6c3 python2.4 setup.py install cd /usr/src easy_install -f . TurboGears You will also need to install the python database drivers for your system. In my case this was MySQL-python. I copied the MySQL-python-1.2.1_p2.tar.gz file into /usr/src and executed the following commands: cd /usr/src tar -zxvf MySQL-python-1.2.1_p2.tar.gz cd MySQL-python-1.2.1_p2 python2.4 setup.py build python2.4 setup.py install you probably know this but install will call build. Also python-db drivers are very common so installing them with your package manager should be the prefered way. Hopefully this helps the next person who finds this thread... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: TurboMail 1.0 released!
great idea I look forward to ki ups wrong line I look forward of using your extension. On 10/3/06, Matthew Bevan [EMAIL PROTECTED] wrote: It is my pleasure to announce TurboMail 1.0, a TurboGears extension to add multi-threaded outbound mail functionality to your TurboGears application. What is TurboMail? -- TurboMail is a TurboGears extension - meaning that it starts up and shuts down alongside TurboGears applications you write in the same way that visit tracking and identity do. TurboMail uses built-in Python modules for SMTP communication and MIME e-mail creation, but greatly simplifies these tasks by performing the grunt-work for you. Being multi-threaded, TurboMail allows you to enqueue messages to be sent and then immediately continue with processing, resulting in a much more fluid user experience. Threads are handled intelligently (increasing the number of threads as demand increases) and they are automatically recycled. There is only ever one SMTP connection per thread. Installing TurboMail Simply easy_install the package: easy_install TurboMail TurboMail installs no external scripts. Using TurboMail --- Before you can send mail, you must enable TurboMail and configure a server. This is done from your dev.cfg, prod.cfg, or app.cfg by placing the following in the general section: mail.on = True mail.server = smtp.myserver.net mail.username = None mail.password = None Set username and password only if your outgoing mail server require them. Once TurboMail is configured, import 'turbomail' into your controller's Python file and use the following code to send a simple plain-text message: message = turbomail.Message( '[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'Subject' ) message.plain = Plain text body. turbomail.enqueue(message) To send a message using a KID template: message = turbomail.TemplateMessage( '[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'Subject', 'application.templates.path', dict(wanted=An argument.) ) turbomail.enqueue(message) The final argument to the TemplateMessage constructor is a dictionary of arguments to pass to the KID template. Callable values will be resolved (executed) just prior to being sent. For additional information, visit the API reference: http://www.topfloor.ca/turbomail/documentation/reference/ Matthew Bevan, Systems Administrator Top Floor Computer Systems Ltd. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Miscellaneous inquiries
1. How do we generate log.debug output? I'd rather not have to analyse the code to determine the option(s) to set if someone wouldn't mind putting me straight. Couldn't find it in the docs. 2. Does anyone use Wing IDE with TG? When I run my app-start.py script under Wing it terminates after about ten seconds - Wing suggest this is possibly due to a threading issue. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~--~~~~--~~--~--~---
[TurboGears] Re: expose doing more than one thing...
Reply to Neil and Adam On 10/3/06, Adam Jones [EMAIL PROTECTED] wrote: Neil Blakey-Milner wrote: Hey there, I'm doing a technology preview of what TurboGears may look like in the near future - SQLAlchemy, Genshi, and Routes. So far, I like it a lot - Routes allows me to do some stuff I couldn't easily otherwise do. I believe this thread belongs in the trunk list. I hadn't heard anything about Routes being in the future for TG. My understanding was that the project is going to stick with CherryPy for the forseeable future. Do you have any pointers to what you saw that suggested this change? If this is just a bit of wishful thinking I agree with you. The rest of CherryPy is outstanding, but I prefer the explicit flexability of solutions like Routes. (That said CP can be very flexible, it just takes more cleverness than I like using in one place) Correct here As Fumachu says below CP3 will be able to handle Routes as a subcomponent. so if people want it can be done. but there is no milestone/proposal of moving away from CP. about SA because of flexibility and Genshi for speed. One problem I'm experiencing is that the expose decorator is what ties the templating so nicely into things in TG. But its primary purpose (at least going by the name) is to expose the function to CherryPy - to set the .exposed attribute on the function. You can set the template in the return value as well, just return ' tg_template=yoursite.templates.templatename ' I don't know how firmly this is tied in to @expose, if at all. actually the decorator ends up setting tg_template but it's done in a way that if there is an explicit tg_template that one is taken. I have use this myself with expose template being the display data template for the result of a search and if this brings out nothing I return the tg_template with add new entry template. So, maybe this is another vote for using @view instead sometime in the future - @expose(expose=False) looks a bit weird. Until then, I'll just create another decorator to remove the .expose attribute on the methods. why not use @expose() ? about the @view(expose=False) well that's weird too, why will a view wont be exposed that makes even less sence, but that's a dead end since @view issue is solved. You might want to look into simply not using @expose and working with Routes directly. I don't see how changing @expose to @view is going to solve any problems for you. I think he was just saying that it looks weird, about using routes directly I think the best will be to add another rule to expose, but that will need you to learn how to work with the RuleDispatcher package. Also, maybe I'm just missing something obvious on how to deal with a problem like this: Let's say I have a blogging site with multiple web logs. The base is http://foo.bar/, and individual blogs are at http://foo.bar/unique-name/. Within the blog itself, there is /archives, which uses the common pattern /archives/2006/10/03/post-name to find a post. There is /feed.xml, and /categories, and so forth. The base mechanism in TG only gets me to the default function on the root controller, and doesn't seem to offer me a way to restart the processing on the remainder of the path. So: http://foo.bar/unique-name/archives/2006/10/03/post-name I only get to RootController, method default, where I can look up the blog name. I can't then forward the rest of the request to a controller that handles the blog portion (say, BlogController). I don't see why can't you handle the full URL in the default, remenber you get a list where each component is each part of the URL. so in default you will get the nickname (i guess look it up in the db), then take the archives, etc,etc. if you don't like all that code in there then split it up into methods none if them has to be exposed. one method that does everything usernames, another to access the archive and another to search the archive then all will return to the default. and it will show you the results. I've been looking at this problem too. Remember that you can always call another controller function from within one, and return the value of it if you want. This situation would be handled by having a controller function that accepts the unique name and processes the rest of the arguments accordingly and calling that from the default function on your RootController. That is unless there is a better solution. I don't really care for that one too much as it moves the routing decision from one location (@expose decorator) to multiple locations. -Adam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at