[turbogears-commits] [1486] branches/1.0/turbogears: added to_utf8 utility function

2006-05-16 Thread dangoor
Title: [1486] branches/1.0/turbogears: added to_utf8 utility function Revision 1486 Author max Date 2006-05-16 03:28:04 -0500 (Tue, 16 May 2006) Log Message added to_utf8 utility function Modified Paths branches/1.0/turbogears/controllers.py branches/1.0/turbogears/util.py Diff

[turbogears-commits] [1487] trunk/turbogears: merged 1485:1486 from 1.0

2006-05-16 Thread dangoor
Title: [1487] trunk/turbogears: merged 1485:1486 from 1.0 Revision 1487 Author max Date 2006-05-16 03:29:25 -0500 (Tue, 16 May 2006) Log Message merged 1485:1486 from 1.0 Modified Paths trunk/turbogears/controllers.py trunk/turbogears/util.py Diff Modified:

[TurG-es] Re: Como hacer CRUD

2006-05-16 Thread Alberto Valverde
On 16/05/2006, at 14:53, Percy Gonzales wrote: Como podemos generar de forma automatica a partir de una o varias tablas un CRUD al estilo de rails? sobre el cual podamos trabajar o midficar principalmente su vista? Usando la extensión FastData: easy_install -U -Z TGFastData Alberto

[tg-tickets] [TurboGears] #883: Add example to scheduler doc

2006-05-16 Thread TurboGears
#883: Add example to scheduler doc -+-- Reporter: kevin| Owner: anonymous Type: enhancement | Status: new Priority: normal | Milestone: 1.0b1 Component: Docs |

[tg-tickets] [TurboGears] #884: TypeError: 'NoneType' object is not callable in master.py

2006-05-16 Thread TurboGears
#884: TypeError: 'NoneType' object is not callable in master.py +--- Reporter: [EMAIL PROTECTED] | Owner: anonymous Type: defect | Status: new Priority: normal |

[tg-tickets] Re: [TurboGears] #875: [PATCH] Fixed the DeployAsWindowsService docs on the wiki

2006-05-16 Thread TurboGears
#875: [PATCH] Fixed the DeployAsWindowsService docs on the wiki -+-- Reporter: [EMAIL PROTECTED] |Owner: anonymous Type: enhancement | Status: new Priority: normal

[tg-tickets] Re: [TurboGears] #879: Incorrect handling when serveFile returns []

2006-05-16 Thread TurboGears
#879: Incorrect handling when serveFile returns [] +--- Reporter: anonymous |Owner: anonymous Type: defect | Status: new Priority: normal |Milestone: 1.0b1 Component:

[tg-tickets] [TurboGears] #885: Database Logging Handler

2006-05-16 Thread TurboGears
#885: Database Logging Handler +--- Reporter: ivolooser | Owner: anonymous Type: task| Status: new Priority: normal | Milestone: 1.0 Component: Deployment

[tg-tickets] Re: [TurboGears] #808: sql upgrade fails with 0.9.5a

2006-05-16 Thread TurboGears
#808: sql upgrade fails with 0.9.5a ---+ Reporter: ivolooser |Owner: anonymous Type: defect | Status: closed Priority: normal |Milestone: 1.0 Component: SQLObject |

[tg-tickets] Re: [TurboGears] #822: Comment on docs/scheduler.html

2006-05-16 Thread TurboGears
#822: Comment on docs/scheduler.html ---+ Reporter: anonymous |Owner: anonymous Type: task | Status: closed Priority: normal |Milestone: Component: Docs |

[tg-tickets] [TurboGears] #888: provide a default logging directory config option

2006-05-16 Thread TurboGears
#888: provide a default logging directory config option --+- Reporter: jorge.vargas | Owner: anonymous Type: enhancement | Status: new Priority: high | Milestone: 1.0

[tg-tickets] Re: [TurboGears] #888: provide a default logging directory config option

2006-05-16 Thread TurboGears
#888: provide a default logging directory config option --+- Reporter: jorge.vargas |Owner: anonymous Type: enhancement | Status: new Priority: high |Milestone: 1.0

[tg-tickets] Re: [TurboGears] #36: /docs/wiki20/index.html Printable Version

2006-05-16 Thread TurboGears
#36: /docs/wiki20/index.html Printable Version +--- Reporter: Chris Williams |Owner: anonymous Type: defect | Status: closed Priority: normal |Milestone:

[tg-trunk] Logging Extension Idea

2006-05-16 Thread Ivo Looser
Hi Together I Just would like to discus about a Loggingmodel. The new way 0.9a5 to use Python logger looks for me very nice. Anyway i have no experience at all about this Logger :-). So far i understand its possible to extend the logger with a own Loghandler. I think is not that difficult. One

[tg-trunk] Re: Logging Extension Idea

2006-05-16 Thread Kevin Dangoor
Hi Ivo, On 5/16/06, Ivo Looser [EMAIL PROTECTED] wrote: I Just would like to discus about a Loggingmodel. The new way 0.9a5 to use Python logger looks for me very nice. Anyway i have no experience at all about this Logger :-). So far i understand its possible to extend the logger with a own

[tg-trunk] Re: Difficulties on upgrading to latest version (0.9a7)

2006-05-16 Thread prla
I've just followed those instructions and everything seems to have gone smoothly, except for the Identity changes from 0.9a4 to 0.9a5. I have some code in my controllers which query the TG_User table. For instance, to get the row that represents the user that's currently logged in: user =

[tg-trunk] Re: Logging Extension Idea

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 08:50, Kevin Dangoor escreveu: I can certainly imagine including a database handler class and telling people how to use it, but it just doesn't seem like a quickstart sort of need. I agree with not making this by default in quickstart or making this an option for a

[tg-trunk] Re: Logging Extension Idea

2006-05-16 Thread Kevin Dangoor
On 5/16/06, Jorge Godoy [EMAIL PROTECTED] wrote: Em Terça 16 Maio 2006 08:50, Kevin Dangoor escreveu: I can certainly imagine including a database handler class and telling people how to use it, but it just doesn't seem like a quickstart sort of need. I agree with not making this by

[tg-trunk] Re: Logging Extension Idea

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 10:39, Kevin Dangoor escreveu: That's a good point. We could certainly add some smarts to the logging (like a configuration value for IP address header, so if there's an X-Forwarded-For or similar, you can grab it.) These smarts I believe could go into default

[tg-trunk] Merging branchs (1.0 = trunk)

2006-05-16 Thread Roger Demetrescu
Hi guys... I noticed that there are some changesets from 1.0 branch that weren't merged into trunk... (eg.: [1477])... Since here at work I can't have a svn access, I depend on the Nightly Snapshots version... and they are a snapshot of trunk branch... which in this moment isn't so

[tg-trunk] Re: Logging Extension Idea

2006-05-16 Thread Jorge Vargas
On 5/16/06, Ivo Looser [EMAIL PROTECTED] wrote: One Example of an nice Logger extension i saw on http://www.red-dove.com/python_logging.html. For me, and maybe for others turbogear users is log_test14.py. It just a Database Logger. It would be nice to have an possibility in Quickstart to

[tg-trunk] Re: Logging Extension Idea

2006-05-16 Thread Ivo Looser
Yes, a turbogear like approache whould be the best. tg appoach? guys its a logging module it follows the std, all you need to do is take the class out and let TG know how to import it. Sorry may be i choose the wrong words. I mean Turbogear approach with Connection from SQLObjects or

[tg-trunk] Re: Logging Extension Idea

2006-05-16 Thread Jorge Vargas
On 5/16/06, Ivo Looser [EMAIL PROTECTED] wrote: Yes, a turbogear like approache whould be the best. tg appoach? guys its a logging module it follows the std, all you need to do is take the class out and let TG know how to import it. Sorry may be i choose the wrong words. I mean Turbogear

[tg-trunk] Re: Difficulties on upgrading to latest version (0.9a7)

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 20:52, jvanasco escreveu: 0.9a7 ? when did that come out? i see no announcement and the site still reads .9a6 It's the signature from the trunk / 1.0 branch in the svn repository. After all, this is the trunk mailing list. The other list is for released versions.

[tg-trunk] Re: Difficulties on upgrading to latest version (0.9a7)

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 22:25, jvanasco escreveu: ah, i expected people to refer to the svn version as svn , trunk or head -- as .9a7 is untagged Me too ;-) But since TG is identifying itself like that, this sounds valid... Of course, the svn revision would still be needed, but... :-) --

[TurboGears] Re: Refering to callables in widgets

2006-05-16 Thread Michele Cella
Jason Chu wrote: I'm now trying to migrate our code from 0.9a4 to 0.9a6. Now if I do a self.variable inside a widget and variable is callable, the widget's metaclass will call variable() and return its value. Couple that with widgets being callable and I can no longer pass references to my

[TurboGears] Re: request: turbogears scheduler example

2006-05-16 Thread Kevin Dangoor
On 5/15/06, jvanasco [EMAIL PROTECTED] wrote: this feature looks like its exactly what i need to keep a session db connection active any chance of just tossing in a sample of how its used? the docs describe nicely the features and the options, but not how to implement it. At least it has

[TurboGears] Re: tg 0.9a6 py23 - failures=12, errors=11

2006-05-16 Thread Kevin Dangoor
On 5/15/06, hal [EMAIL PROTECTED] wrote: I'm not sure it's worth emailing the 565 lines :) Not likely :) A summary follows - I'd appreciate comments on how nervous this makes folks feel. I'm willing to help chase these, but would also (at this point) be happy with advice like don't use

[TurboGears] Re: tg 0.9a6 py23 - failures=12, errors=11

2006-05-16 Thread Kevin Dangoor
Responding to myself... On 5/16/06, Kevin Dangoor [EMAIL PROTECTED] wrote: The common thread in your report seems to be the error handling. Was this run against the trunk or the 1.0 branch? The subject says 0.9a6. Did you check out the tag to run these tests? Kevin

[TurboGears] Re: What are all directories TurboGears Eggs put software in? (How uninstall?)

2006-05-16 Thread Kevin Dangoor
On 5/15/06, Jorge Vargas [EMAIL PROTECTED] wrote: eggs are not TG, they are setuptools and that's the way all setuptools packages work, which doesn;t has an uninstaller ;( Not yet. One is planned. Kevin --~--~-~--~~~---~--~~ You received this message because

[TurboGears] Re: CSSLink JSLink

2006-05-16 Thread Kevin Dangoor
On 5/15/06, Randy [EMAIL PROTECTED] wrote: Can anyone tell me why this doesn't work In mywidget.py: class mywidget(widgets.Widget): css = [widgets.CSSLink(myproj, mywidget.css)] javascript = [JSLink(myproj, mywidget.js)] template = ''' divblah blah

[TurboGears] Re: py2exe

2006-05-16 Thread Kevin Dangoor
On 5/15/06, Simon Belak [EMAIL PROTECTED] wrote: Let's just say I wouldn't be surprised if SoC brought us tg.exe ... ;) I hadn't thought of that. That would be an excellent project. I hope it makes it completely through the process! Kevin --~--~-~--~~~---~--~~

[TurboGears] Re: cherrypy's serveFile fails every-other request

2006-05-16 Thread Kevin Dangoor
On 5/15/06, Arnar Birgisson [EMAIL PROTECTED] wrote: Answering myself: there's already a bug-report (#686) which is marked fixed in [1026] Actually, 1026 is long past. You've found a legitimate bug. Please open a ticket and set the milestone to 1.0b1... http://trac.turbogears.org/ Thanks!

[TurboGears] Re: identity/tg-admin shell

2006-05-16 Thread Ed Singleton
We could do with a better way to do it, but for the moment I use the WebConsole in the toolbox and copy and paste my script in there. Works fine so far. Ed On 5/16/06, Jorge Vargas [EMAIL PROTECTED] wrote: On 5/15/06, Brandon Goldfedder [EMAIL PROTECTED] wrote: Great question - this is

[TurboGears] Re: identity/tg-admin shell

2006-05-16 Thread Arthur Clune
On 16 May 2006, at 13:38, Ed Singleton wrote: We could do with a better way to do it, but for the moment I use the WebConsole in the toolbox and copy and paste my script in there. Works fine so far. That's a useful tip, but what I want is a way to script the creation of inital admin users

[TurboGears] Re: tg 0.9a6 py23 - failures=12, errors=11

2006-05-16 Thread hal
Kevin Dangoor wrote: The subject says 0.9a6. Did you check out the tag to run these tests? No, just a non-dev easyinstall -U Which is the same thing I did for the py24, and got no errors or failures. (I can run both pythons on my dev box, but we only deploy py23 to our production machines)

[TurboGears] Re: how to debug: 'NoneType' object is not callable

2006-05-16 Thread Robin Haswell
Just a fresher for this thread, I'm still getting this intermittently (nearly identical tracebacks) on .9a6. I have SQLObject calls in my template, and my errors are on line 25 of master.py. Sorry I lost my tracebacks applying the kid.precompiled fixes (which failed spectacularly, by the way),

[TurboGears] Re: how to debug: 'NoneType' object is not callable

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 10:22, Robin Haswell escreveu: Is there a way to stop Kid deleting its .py files so I can see the code that was failing? You can compile your .kid files by hand and ask for the source .py to be kept. kidc -s file.kid kidc --help show other options. -- Jorge Godoy

[TurboGears] Re: how to debug: 'NoneType' object is not callable

2006-05-16 Thread Cox Chen
Hi, Do you use customized widget? Maybe the widget is not instantiated as you expect. (I've encountered similar problem when working with widgets from FastTrack 0.5) -Cox 於 二,2006-05-16 於 14:38 +0100,Robin Haswell 提到: Traceback included: Page handler: bound method Root.default of

[TurboGears] Re: identity/tg-admin shell

2006-05-16 Thread Ed Singleton
On 5/16/06, Arthur Clune [EMAIL PROTECTED] wrote: On 16 May 2006, at 13:38, Ed Singleton wrote: We could do with a better way to do it, but for the moment I use the WebConsole in the toolbox and copy and paste my script in there. Works fine so far. That's a useful tip, but what I want

[TurboGears] Re: how to debug: 'NoneType' object is not callable

2006-05-16 Thread Robin Haswell
Cox Chen wrote: Hi, Do you use customized widget? Maybe the widget is not instantiated as you expect. (I've encountered similar problem when working with widgets from FastTrack 0.5) -Cox I do use one custom widget but it's not called on the pages I see errors on. -Rob

[TurboGears] Re: cherrypy's serveFile fails every-other request

2006-05-16 Thread Arnar Birgisson
On 5/16/06, Kevin Dangoor [EMAIL PROTECTED] wrote: Actually, 1026 is long past. You've found a legitimate bug. Please open a ticket and set the milestone to 1.0b1... Yup, I didn't read #686 carefully before posting here :o) I filed another ticket yesterday, #879 - setting the milestone now.

[TurboGears] Re: cherrypy's serveFile fails every-other request

2006-05-16 Thread Sylvain Hellegouarch
Yup, I didn't read #686 carefully before posting here :o) I filed another ticket yesterday, #879 - setting the milestone now. Until then, if anyone else is having problems with this, a workaround is to remove the 'If-Modified-Since' header from the request before calling serveFile: if

[TurboGears] Re: scheduling one time tasks with tg.scheduler

2006-05-16 Thread Robin Haswell
Tim Lesher wrote: I agree with that; the ticket Robin submitted didn't mention running the task at a specific time, though. If that's what he meant, I apologize. In which case I apologize for being unclear - that is what I meant, however I also see the use in being able to use the scheduler

[TurboGears] some questions about logging

2006-05-16 Thread Jorge Vargas
I'm writting a little app to show off logging and scheduler as well as provide something really nice to the comunity, and no i wont tell until i release it :pI'm writting the logger part of it and some questions came to me in a new quickstarted project how does the log object knows to which

[TurboGears] Re: scheduling one time tasks with tg.scheduler

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 12:07, Robin Haswell escreveu: Regardless of that though, I think scheduling a one-time task is a good idea IMO. In at least one of my TG apps I need to perform an action in 24 hours' time (although I don't use the TG scheduler for that as I don't trust the server to

[TurboGears] Re: how to debug: 'NoneType' object is not callable

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 11:33, Robin Haswell escreveu: Doing this indicates a Kid error. Lines 25-27 are: But the source should be kept there... The error might be for the compilation from .py to .pyc. def initialize(self): rslt = initialize(self) if rslt != 0:

[TurboGears] Re: New scheduler doc

2006-05-16 Thread [EMAIL PROTECTED]
Tim did you posted that recipe? Why don't make it a buildin? --~--~-~--~~~---~--~~ 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

[TurboGears] Re: scheduling one time tasks with tg.scheduler

2006-05-16 Thread Robin Haswell
The software, based on my development experiences. That and if I want to change a character of code I have to restart the server - and scheduler. -Rob Jorge Godoy wrote: Em Terça 16 Maio 2006 12:07, Robin Haswell escreveu: Regardless of that though, I think scheduling a one-time task is a

[TurboGears] Re: EasyInstall Question on TG app deployment

2006-05-16 Thread Brandon Goldfedder
Jorge/All, One other piece of info. Tg-admin toolbox also has a similar issue as the catwalk does. It seems like it cant find the project. Just to doublecheck on two basic things that may be the source of my problems: 1) Should the config files (prod.cfg and the config dir) be in a local

[TurboGears] Re: how to debug: 'NoneType' object is not callable

2006-05-16 Thread Robin Haswell
The problem with these results is I can't be sure that the output from kidc -sf is the same as the compiled code that TG is running. I really need Kid to not delete the .py files that it generates as TG runs normally. -Rob Jorge Godoy wrote: Em Terça 16 Maio 2006 11:33, Robin Haswell escreveu:

[TurboGears] turbogears email plugin

2006-05-16 Thread Max Ischenko
Hello, There have been several attempts to provide some e-mail related functionality to TG. It is not unclear whether it should go into TG core because it can be very application-specific. Nevertheless, it can be a good idea to have some basic stuff in core so that other modules can use it

[TurboGears] Re: turbogears email plugin

2006-05-16 Thread jvanasco
i can't download your version. the dns won't resolve to anything anyways, a few weeks ago i made this wrapper and posted it to the list and submitted for the 1.0 branch: http://dev.2xlp.com/svn/turbogears_extensions/turboemail/trunk/turboemail.py

[TurboGears] Re: CSSLink JSLink

2006-05-16 Thread Randy
Actually neither of them worked, I was testing them individually but tossed both of them into my example. I'm still getting LINK MEDIA=all HREF=/tg_widgets/myproj/css/mywidget.css TYPE=text/css REL=stylesheet Is turbogears supposed to be creating and putting widgets in a temporary tg_widgets

[TurboGears] Re: template reading optimization

2006-05-16 Thread jvanasco
do you have any more info on that? just looking at the design of TG everything is memory resident, so i would find it very beneficial to get the template part of TG into memory as well. i imagine that there's some sort of caching going on, and kid is only reading the files if they've changed,

[TurboGears] Re: CSSLink JSLink

2006-05-16 Thread Randy
Figures I would get it working right after posting, still had static/css instead of just static, although to be honest I still don't really understand how it works. Thanks for help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[TurboGears] Re: CSSLink JSLink

2006-05-16 Thread Kevin Dangoor
On 5/16/06, Randy [EMAIL PROTECTED] wrote: Actually neither of them worked, I was testing them individually but tossed both of them into my example. I'm still getting LINK MEDIA=all HREF=/tg_widgets/myproj/css/mywidget.css TYPE=text/css REL=stylesheet Is turbogears supposed to be

[TurboGears] Re: template reading optimization

2006-05-16 Thread Kevin Dangoor
On 5/16/06, jvanasco [EMAIL PROTECTED] wrote: do you have any more info on that? just looking at the design of TG everything is memory resident, so i would find it very beneficial to get the template part of TG into memory as well. i imagine that there's some sort of caching going on, and

[TurboGears] Re: some questions about logging

2006-05-16 Thread Kevin Dangoor
On 5/16/06, Jorge Vargas [EMAIL PROTECTED] wrote: I'm writting a little app to show off logging and scheduler as well as provide something really nice to the comunity, and no i wont tell until i release it :p Tease :) in a new quickstarted project how does the log object knows to which

[TurboGears] Re: request: turbogears scheduler example

2006-05-16 Thread Jorge Vargas
I'm working on a tutorial that will explain the other 2. On 5/15/06, jvanasco [EMAIL PROTECTED] wrote: in model.py this worked{{{import psycopg2def get_db_for_sessions(): dsn = get('sessions.postgres.dsn')return psycopg2.connect(dsn)def _session_db_ping():print _session_db_pingx=

[TurboGears] Re: EasyInstall Question on TG app deployment

2006-05-16 Thread Jorge Vargas
On 5/16/06, Brandon Goldfedder [EMAIL PROTECTED] wrote: Jorge/All, One other piece of info. Tg-admin toolbox also has a similar issue as the catwalk does. It seems like it can't 'find' the project. Just to doublecheck on two basic things that may be the source of my problems: 1)

[TurboGears] Re: some questions about logging

2006-05-16 Thread Jorge Vargas
On 5/16/06, Kevin Dangoor [EMAIL PROTECTED] wrote: On 5/16/06, Jorge Vargas [EMAIL PROTECTED] wrote: I'm writting a little app to show off logging and scheduler as well as provide something really nice to the comunity, and no i wont tell until i release it :pTease :)TurBot, unless I can think of

[TurboGears] Re: template reading optimization

2006-05-16 Thread jvanasco
So are templates loaded into memory on first hit already? If so, that solves my issue. I just want to get templates read from memory and not from disk. In mod_perl, I need to do that at startup to push them into shared memory -- but tg is different. I'm fine with stuff running after first

[TurboGears] Re: template reading optimization

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 15:31, jvanasco escreveu: So are templates loaded into memory on first hit already? If so, that solves my issue. I just want to get templates read from memory and not from disk. In mod_perl, I need to do that at startup to push them into shared memory -- but tg is

[TurboGears] Re: scheduling one time tasks with tg.scheduler

2006-05-16 Thread Jorge Vargas
I'm looking at the internals of this I I believe sending in interval=0 will do a one-time taskLooking all the way into the sched.py module you will see the sheduler class enter and enterabs, so 0 will make both functions equal then you will see in the run method it just get callthat will be

[TurboGears] Re: template reading optimization

2006-05-16 Thread jvanasco
well thats out of the control of the framework - and you just toss memory at that problem. i just wanted to keep the framework from reading the disk. i'm a big believe in webapps being completely memroy resident and never touching the disk - they either get all their content from memory or a db

[TurboGears] Re: template reading optimization

2006-05-16 Thread Robin Haswell
Funny, operating systems are the same, which is why frequently used files get put in memory (I think). Every wondered why PHP doesn't crawl? I agree with your philosophy, I just think you need to be a little less zealous about it. -Rob jvanasco wrote: well thats out of the control of the

[TurboGears] Re: Strip spaces from output...

2006-05-16 Thread Ivo Looser
Hi Together I got an answer about this on the Kid Mailinglist. Solution One was: # assuming your template is stored in test.kid import kid from kid.serialization import XMLSerializer template = kid.load_template('test.kid') t = template.Template() serializer = XMLSerializer(decl=1)

[TurboGears] Re: template reading optimization

2006-05-16 Thread jvanasco
php doesn't cache into memory at any level natively if you have to use php for anything (i do) i STRONGLY suggest using the eaccelerator optimizer in cacheonly mode and give it 8-16 megs or so -- you'll get a 400% speed increase on average. whatever you do, don't use the code optimizer, it'll

[TurboGears] Re: template reading optimization

2006-05-16 Thread Robin Haswell
jvanasco wrote: php doesn't cache into memory at any level natively Yes, I meant the operating caches the PHP files in to memory. Obviously not the bytecode compiled ones though. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[TurboGears] Re: New scheduler doc

2006-05-16 Thread Robin Haswell
Hm I'm personally of the opinion that the scheduler should *depend* on a database, like identity. -Rob [EMAIL PROTECTED] wrote: Tim did you posted that recipe? Why don't make it a buildin? --~--~-~--~~~---~--~~ You received this message because you are

[TurboGears] Re: Refering to callables in widgets

2006-05-16 Thread Jason Chu
On Tue, May 16, 2006 at 06:46:16AM -, Michele Cella wrote: Jason Chu wrote: I'm now trying to migrate our code from 0.9a4 to 0.9a6. Now if I do a self.variable inside a widget and variable is callable, the widget's metaclass will call variable() and return its value. Couple that

[TurboGears] [DOCS] how to use Logging in TG

2006-05-16 Thread Jorge Vargas
Hi everyone, I factor out the logging docs of a tutorial i'm making (it was almost 300 lines) and post it at the wiki.Please make any corrections you will like and let me know so I can move it to the official docs soon :) Specially with my

[TurboGears] Re: Strip spaces from output...

2006-05-16 Thread Fred C
I think it would be great to have this option in the dev.cfg and prod.cfg files.You may want to have the spaces stripped in the prod version but not when you develop. my .2 cent.-fred-On May 16, 2006, at 3:36 PM, Jorge Vargas wrote:I had come to exactly the same comclusion earlier today.I need to

[TurboGears] How to join a table with itself in the model

2006-05-16 Thread Ed Singleton
I want to join a table with itself in the model definition. Something like: class Page(SQLObject): parent_page = ForeignKey('Page') child_pages = MultipleJoin('Page') but when I do, and I try to pull out the child pages I get the error: OperationalError: (1054, Unknown column 'page_id'

[TurboGears] Re: How to join a table with itself in the model

2006-05-16 Thread Ed Singleton
Full traceback in case anyone's intrested: Page handler: bound method Root.index of sti.controllers.root.Root object at 0x01564590 Traceback (most recent call last): File c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py, line 105, in _run self.main() File

[TurboGears] Re: New scheduler doc

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 19:40, Jorge Vargas escreveu: database? why does cron depends on a db? In this case, for persistence of information. But I believe that this should not be a dependency but some kind of extra feature. I also believe that putting these scheduled events inside a database

[TurboGears] Re: Strip spaces from output...

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 19:11, Fred C escreveu: I think it would be great to have this option in the dev.cfg and prod.cfg files. You may want to have the spaces stripped in the prod version but not when you develop. One has to take care with the size of the resulting line or you might get

[TurboGears] Re: How to join a table with itself in the model

2006-05-16 Thread Matthew Bevan
Try: class Page(SQLObject): parent_page = ForeignKey('Page') child_pages = MultipleJoin('Page', joinColumn=parent_page_id) Also useful, if page order is important, is adding a orderBy to child_pages. --~--~-~--~~~---~--~~ You received this message

[TurboGears] Re: How to join a table with itself in the model

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 19:18, Ed Singleton escreveu: I want to join a table with itself in the model definition. Something like: class Page(SQLObject): parent_page = ForeignKey('Page') child_pages = MultipleJoin('Page') but when I do, and I try to pull out the child pages I get

[TurboGears] custom session class / package?

2006-05-16 Thread jvanasco
has anyone written a custom session class / package they can share? cherrypy's sessions are not an option. they've been acting very buggy and don't support delete. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[TurboGears] Re: Strip spaces from output...

2006-05-16 Thread Robin Haswell
Some more pennies for the jar, when I develop PHP work I pipe the output through W3C's tidy util to get properly indented HTML - it helps the designer a lot, especially with complicated HTML. There's even couple of stable Python interfaces. libtidy ships with just about anything, although I

[TurboGears] Re: How to join a table with itself in the model

2006-05-16 Thread Robin Haswell
I think this helps, it's sample working code for my Article model. Articles have related articles: class Article(SQLObject): title = UnicodeCol() body = UnicodeCol() created = DateTimeCol(default=datetime.now) sort = IntCol(default=0) slug = StringCol(alternateID=True,

[TurboGears] Re: custom session class / package?

2006-05-16 Thread Alberto Valverde
On 17/05/2006, at 1:13, jvanasco wrote: has anyone written a custom session class / package they can share? cherrypy's sessions are not an option. they've been acting very buggy and don't support delete. You could try paste.session or paste.flup_session middleware layers which are

[TurboGears] Re: New scheduler doc

2006-05-16 Thread Jorge Godoy
Em Terça 16 Maio 2006 20:49, Robin Haswell escreveu: This is true, in fact I think the only slightly complicated bit would be maintaining concurrency between the scheduler in memory and the tasks in the table. You don't want to be querying a database every second (although that would work

[TurboGears] Re: New scheduler doc

2006-05-16 Thread Jorge Vargas
On 5/16/06, Jorge Godoy [EMAIL PROTECTED] wrote: Em Terça 16 Maio 2006 19:40, Jorge Vargas escreveu: database? why does cron depends on a db?In this case, for persistence of information.But I believe that this shouldnot be a dependency but some kind of extra feature.I also believe that putting

[TurboGears] Re: custom session class / package?

2006-05-16 Thread jvanasco
well i use sessions for more than just loggedin/out - so getting rid of them isn't an option as there's too much data to pass than in cookie form i'm looking into paste now. if it works, i'm all up on it. it not, i might just give up tg and move back to perl

[TurboGears] Re: custom session class / package?

2006-05-16 Thread Alberto Valverde
On 17/05/2006, at 2:13, jvanasco wrote: well i use sessions for more than just loggedin/out - so getting rid of them isn't an option as there's too much data to pass than in cookie form Well, AFAIK, a cookie can hold up to 4kb of data. Remember you can pickle almost any python object,

[TurboGears] Re: Strip spaces from output...

2006-05-16 Thread Fred C
On May 16, 2006, at 7:35 PM, Robin Haswell wrote: Some more pennies for the jar, when I develop PHP work I pipe the output through W3C's tidy util to get properly indented HTML - it helps the designer a lot, especially with complicated HTML. There's even couple of stable Python

[TurboGears] Re: custom session class / package?

2006-05-16 Thread Kevin Dangoor
FYI, there's also Beaker: http://beaker.groovie.org/ * Fast, robust performance * Lazily loaded so that sessions are loaded only if they're used * File-base, in-memory, or memcached for storage * Signed cookie's to prevent session hijacking/spoofing Kevin

[TurboGears] Re: New scheduler doc

2006-05-16 Thread Kevin Dangoor
On 5/16/06, Robin Haswell [EMAIL PROTECTED] wrote: Hm I'm personally of the opinion that the scheduler should *depend* on a database, like identity. I think that there are many cases for which persistent storage is just not important, and there's no reason to make it so. I'm not opposed to

[TurboGears] Re: [DOCS] how to use Logging in TG

2006-05-16 Thread Kevin Dangoor
Hi Jorge, That's quite a bit of detail you're bringing in there. I hadn't planned on going into that level of detail given that it's basically the standard python docs. One thing that would be good to mention in there is that the qualnames are hierarchical (depending on the propogate setting).

[TurboGears] Re: some questions about logging

2006-05-16 Thread Kevin Dangoor
On 5/16/06, Jorge Vargas [EMAIL PROTECTED] wrote: I see, one thing I don't like about that is that the info in one file depends on the other one. But it makes sence DRY. I think there may even be a note in dev.cfg to look at log.cfg... (or there should be if there isn't) Kevin

[TurboGears] Re: template reading optimization

2006-05-16 Thread [EMAIL PROTECTED]
Yes, Kid templates are compiled and loaded into sys.modules the first time they're accessed. Subsequent accesses will only reload the template if the modification time has changed. If you wish to avoid event the modification time check you can set the config option kid.precompiled = True. If

[TurboGears] Re: custom session class / package?

2006-05-16 Thread [EMAIL PROTECTED]
Paste provides 2 session implementations as WSGI middleware: http://pythonpaste.org/module-paste.session.html http://pythonpaste.org/module-paste.flup_session.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[TurboGears] Re: custom session class / package?

2006-05-16 Thread jvanasco
ok. here's a question I've got- btw , i think some session issues I could have had were from the way that tg and database connections are structured to explain: tg encapsulates a db transaction within run_with_transaction during 'before_main' session reading writing occurs much earlier