[tg-docs] Re: Contributing page needs an update
(taking this to the docs ml) gasolin schrieb: The contributing page was updated in svn, just need a publish. So, who's doing that? This situation is one of the reasons I suggested a more open approach to documentation editing. - it is more than two weeks since the SVN site was moved - is the same thing going to happen, when the page goes out-of-date again? or any other of the static documentation pages on the website? - why do we keep two versions of the same information anyway? I don't want to sound negative, I just want to point out problems with the present situation. There are several other updates/improvements for the website that I [1] and others [2] suggested and they haven't been done yet. Sure, we can put them as a ticket in trac, but that probably doesn't change the speed with which they are carried out. Chris [1] http://smurl.name/4hu8 [2] http://smurl.name/63ny --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Docs group. To post to this group, send email to turbogears-docs@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-docs?hl=en -~--~~~~--~~--~--~---
[tg-docs] Re: Contributing page needs an update
On 1/20/07, Karl Guertin [EMAIL PROTECTED] wrote: On 1/20/07, Christopher Arndt [EMAIL PROTECTED] wrote: So, who's doing that? This situation is one of the reasons I suggested a more open approach to documentation editing. The server admins (Lee, Kevin, Alberto?) have the access to this. I do not and this is why I favor moving all documentation onto the wiki. this has been discussed before, I believe we said everything was going into a wiki and linked from the docs site, unless someone step up to maintain the propaganda pages since they indeed look nicer then the wiki pages. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Docs group. To post to this group, send email to turbogears-docs@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-docs?hl=en -~--~~~~--~~--~--~---
[tg-docs] Re: RoughDocs approval process...
On 1/20/07, Karl Guertin [EMAIL PROTECTED] wrote: On 1/19/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: +1, I don't like first 1.0/RoughDocs/thepage then migrate to 1.0/thepage approach. Put those docs under '1.0/RoughDocs' page is sufficient to identify their stat. Change the url didn't change the doc status but break users' bookmarks. When I move pages out of RoughDocs, I always put a #redirect on the page to catch bookmarks. I'm fine with creating docs directly under 1.0, I do that when I'm writing docs. I think only Adam and the people that came on during the sprint put docs in 1.0/RoughDocs. ;] the only problem I see with that is that some docs that the creator forgets to put into a link to it in RoughDocs may get *lost* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Docs group. To post to this group, send email to turbogears-docs@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-docs?hl=en -~--~~~~--~~--~--~---
[tg-docs] Re: RoughDocs approval process...
On 1/20/07, Jorge Vargas [EMAIL PROTECTED] wrote: the only problem I see with that is that some docs that the creator forgets to put into a link to it in RoughDocs may get *lost* Quite possible. I'll notice it because I watch RecentChanges like a hawk, but if I'm busy (as I have been recently) I don't take the time to double check and make sure that it's on RoughDocs. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Docs group. To post to this group, send email to turbogears-docs@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-docs?hl=en -~--~~~~--~~--~--~---
[tg-trunk] Re: Is there a tg_format=pickle option ?
On 1/20/07, Joshua J. Kugler [EMAIL PROTECTED] wrote: [OK...let's try this again and see if I get through. I tried posting through the web interface and through google's SMTP servers (while subscribed via my Gmail account) and neither post has shown up. I subscribed via my work address and we'll see if that works.] well this time it did :) I've tried digging through the code (trunk) but finally got lost and couldn't track down a definitive place where the output is generated. Went back through controllers.py, util.py, and some others. So, I'm posting. :) yea the code is a little dark since the actual method is a generic function based on the ruleDispatch package, alberto knows about it :) Is there any option to return the data as a python pickle? With a good Pythoon GUI toolkit (Qt, Gtk, Wx, etc) you could make a really nice front end to a nice back-end data service. I realize I could use XML-RPC or JSON, but I thought, Why not keep it in Python's native format, and avoid the overhead of conversion? sounds interesting although pickle in itself is not native and has several problems you haven't consider like the fact that pickles may not be compatible between version of python itself. and I think transmitting a json string over the network is faster then a pickle object (smaller data). that said seems interesting I'm sure it wouldn't be that hard to add. I'll do it myself, if someone wants to point me to the right place in the code. :) the first thing is that you need to understand generic functions after that probably you'll need to patch the code in http://trac.turbogears.org/browser/trunk/turbogears/controllers.py#L168 and below to add the new rule type (yes the code is a little dense) after that it's just creating the rules and the API will take care of deciding what to call. Comments? j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[tg-trunk] Re: Is there a tg_format=pickle option ?
What you could try to do is creating a pickle template engine, thats the way json support works. take a look at http://docs.turbogears.org/1.0/TemplatePlugins and perhaps http://trac.turbogears.org/browser/projects/TurboJson for exemples on how to do it. On 1/21/07, Joshua J. Kugler [EMAIL PROTECTED] wrote: [OK...let's try this again and see if I get through. I tried posting through the web interface and through google's SMTP servers (while subscribed via my Gmail account) and neither post has shown up. I subscribed via my work address and we'll see if that works.] I've tried digging through the code (trunk) but finally got lost and couldn't track down a definitive place where the output is generated. Went back through controllers.py, util.py, and some others. So, I'm posting. :) Is there any option to return the data as a python pickle? With a good Pythoon GUI toolkit (Qt, Gtk, Wx, etc) you could make a really nice front end to a nice back-end data service. I realize I could use XML-RPC or JSON, but I thought, Why not keep it in Python's native format, and avoid the overhead of conversion? I'm sure it wouldn't be that hard to add. I'll do it myself, if someone wants to point me to the right place in the code. :) Comments? j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 -- cheers elvelind grandin --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TG and pylint
Hi, I updated the wiki and the pylint_projectname.py file. Next stop: getting a 10/10 for a quickstart project. mfg --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Identity / Firebird
Thank you . password = UnicodeCol(length=40, dbName='pwd') This worked , I can now login / logout correctly. I think the model.py should already include the full working sql of an administrator user whose password could be changed later either via catwalk or a database specific adminstration tool. For Firebird I use flamerobin (www.flamerobin.org) . Db --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Form with multiple fieldSet validation
Hello All, I have tried to find a solution for my question but could not understand much of the stuff that was suggested as I am starting with TG How can I validate a form that has 2 different FieldSets where each fieldset has a different style? (ex. the first field set is a simple table form, the second has 2 inputs per line) I guess my question come to asking how to modify the presentation of the simple forms that are generated by WidgetList and used most of the validation examples we can find on the web. Thanks for you help, Madi --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Form with multiple fieldSet validation
bingo [EMAIL PROTECTED] writes: I guess my question come to asking how to modify the presentation of the simple forms that are generated by WidgetList and used most of the validation examples we can find on the web. You'll have to write a custom template. The standard form templates provide just two rendering options: a table or a list. -- 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Identity / Firebird
DarkBlue [EMAIL PROTECTED] writes: I think the model.py should already include the full working sql of an administrator user whose password could be changed later either via catwalk or a database specific adminstration tool. For Firebird I use flamerobin (www.flamerobin.org) . Every tool that provided a default password has a lot of problems convincing users that it should be changed. We have docs telling how to create users and use them already. To me creating a user with a password would be a greater problem -- where to put this code? how to check if it already exists? why should I be worrying with user names instead of permissions? -- rather than a solution. -- 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: More cool stuff from the dark corners of setuptools
Thanks I think I am finally getting it now. So for my installation the prod.cfg should go here: /usr/lib/python2.4/site-packages/projectname-1.0-py2.4.egg/ I was unclear that i needed to manually copy the file to that location to get the start script to find it. I thought setup.py would be picking it up or something. I think that is why this has the note: needs work, how to configure http://docs.turbogears.org/1.0/DeployWithAnEgg because the prod.cfg file is mentioned as required but it never tells you really where to put it. -Ian On 1/19/07, Christopher Arndt [EMAIL PROTECTED] wrote: Ian Wilson schrieb: Well I was just going to put it into a gentoo startup script. So what is the point of installing start-project or start-project.py in a /usr/bin if you have to run it in a directory containing prod.cfg ? No, you got that wrong. start-project.py looks for (in that order) 1. a cfg (full path) file provided on the command line 2. if setup.py exists in the current directory: dev.cfg in the current directory 3. else: prod.cfg in the current directory Putting the script in the egg as per the recipe you used, does not change that. Chris --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 1.0.1 Status Update
It's nice to see TurboGears finally pass the 1.0 milestone. About the same time TurboGears started gathering steam, several other frameworks either started up or came to my attention in what looked like a Python web framework revolution. I think it's been about a year since and it would be nice to see where these frameworks stand today. A comprehensive list is here: http://wiki.python.org/moin/WebFrameworks. Looks like Django and Pylons (two that I've evaluated) are moving along and nearing 1.0 status. Anyone have enough experience with these other frameworks to say how they compare to TurboGears today? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Contributing page needs an update
I was trying to download from the TurboGears SVN repository, and was using http://www.turbogears.org/svn/turbogears since that's what http://www.turbogears.org/community/contributing.html says to use. I searched the announce list and found that I should actually be looking here: http://svn.turbogears.org/ Whoever can make that change probably should. :) j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: More cool stuff from the dark corners of setuptools
Ian Wilson schrieb: Thanks I think I am finally getting it now. So for my installation the prod.cfg should go here: /usr/lib/python2.4/site-packages/projectname-1.0-py2.4.egg/ I'm afraid not. I think that is why this has the note: needs work, how to configure http://docs.turbogears.org/1.0/DeployWithAnEgg because the prod.cfg file is mentioned as required but it never tells you really where to put it. Because you can put it wherever you like, it just has to be either in the directory from where you start* start-project.py (i.e the current directory), or you have to specify its location on the command line for start-project.py. The current directory of the start-project.py script is *not* the the egg-directory nor the directory, where the start-project.py script is installed (usually /usr/bin or /usr/local/bin), but the directory from where you call it. But you're right in that egg deployment currently does not address this problem, and that's why you have to copy the config file by hand. You could put a default configuration file in the egg (by including it somewhere below your project package directory) and then locate it in your start script with the pkg_resource module, but I haven't seen a ready-made recipe for that yet. HTH, Chris --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Contributing page needs an update
Joshua Kugler schrieb: I was trying to download from the TurboGears SVN repository, and was using http://www.turbogears.org/svn/turbogears since that's what http://www.turbogears.org/community/contributing.html says to use. I searched the announce list and found that I should actually be looking here: http://svn.turbogears.org/ Whoever can make that change probably should. :) Yes, unfortunately there are some static documents on the website [1] that are out-of-date. The up-to-date version of that document is here: http://docs.turbogears.org/1.0/Contributing Note for the DocTeam: we need to decide what to do about these outdated documents on the website. Either somebody has to be responsible for updating them *regularly* or we just replace them with wiki pages. Chris [1] http://trac.turbogears.org/browser/website/docs --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: More cool stuff from the dark corners of setuptools
Ha awesome. All I need is a start/stop script that runs my production server. So I'm just going to put my prod.cfg in /usr/local/project/conf/prod.cfg and just hard code it in the shell script. That was my orignal plan but I thought there might be a cleaner or best practices, way of doing it. Thanks. -Ian On 1/20/07, Christopher Arndt [EMAIL PROTECTED] wrote: Ian Wilson schrieb: Thanks I think I am finally getting it now. So for my installation the prod.cfg should go here: /usr/lib/python2.4/site-packages/projectname-1.0-py2.4.egg/ I'm afraid not. I think that is why this has the note: needs work, how to configure http://docs.turbogears.org/1.0/DeployWithAnEgg because the prod.cfg file is mentioned as required but it never tells you really where to put it. Because you can put it wherever you like, it just has to be either in the directory from where you start* start-project.py (i.e the current directory), or you have to specify its location on the command line for start-project.py. The current directory of the start-project.py script is *not* the the egg-directory nor the directory, where the start-project.py script is installed (usually /usr/bin or /usr/local/bin), but the directory from where you call it. But you're right in that egg deployment currently does not address this problem, and that's why you have to copy the config file by hand. You could put a default configuration file in the egg (by including it somewhere below your project package directory) and then locate it in your start script with the pkg_resource module, but I haven't seen a ready-made recipe for that yet. HTH, Chris --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Contributing page needs an update
The contributing page was updated in svn, just need a publish. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 1.0.1 Status Update
On 1/20/07, Randall [EMAIL PROTECTED] wrote: It's nice to see TurboGears finally pass the 1.0 milestone. About the same time TurboGears started gathering steam, several other frameworks either started up or came to my attention in what looked like a Python web framework revolution. It pretty much was. Looks like Django and Pylons (two that I've evaluated) are moving along and nearing 1.0 status. Anyone have enough experience with these other frameworks to say how they compare to TurboGears today? I use Django when I can do a project using only admin. I prefer SQLAlchemy, Genshi, and TG's returning dictionaries to the Django equivalents, so I don't use it otherwise. Pylons is recommended if you feel that TurboGears makes too many component choices you disagree with. Django has better docs than TG, TG has better docs than Pylons (last I checked). --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 1.0.1 Status Update
On 1/20/07, Karl Guertin [EMAIL PROTECTED] wrote: On 1/20/07, Randall [EMAIL PROTECTED] wrote: It's nice to see TurboGears finally pass the 1.0 milestone. About the same time TurboGears started gathering steam, several other frameworks either started up or came to my attention in what looked like a Python web framework revolution. It pretty much was. Looks like Django and Pylons (two that I've evaluated) are moving along and nearing 1.0 status. Anyone have enough experience with these other frameworks to say how they compare to TurboGears today? I use Django when I can do a project using only admin. I prefer SQLAlchemy, Genshi, and TG's returning dictionaries to the Django equivalents, so I don't use it otherwise. Pylons is recommended if you feel that TurboGears makes too many component choices you disagree with. Django has better docs than TG, TG has better docs than Pylons (last I checked). Pylons and TurboGears are practically the same thing if you're using SQLAlchemy, since none of the TG admin tools really do you any good in that case. The internals to Pylons make more sense to me because it's based on lighter weight stuff than CherryPy (paste and WSGI). It's also a breeze to debug with EvalException. Pylons pretty much covers all of the functionality I was looking for, in a more straightforward manner than TG... but the TG community has a lot more momentum. It would certainly be interesting to see more cooperation between the two, e.g. if the TG admin tools were WSGI based then it could be interchangeable just like the Buffet template plugins that both frameworks use now. -bob --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Opinions wanted on degrading strategy
I'm trying to come up with a good solution for how my Gears based projects should degrade. I want decent accessibility and search bot friendliness, but at the same time, my small business clients are not interested in spending a lot of money on development for fringe cases, so I have to justify every cent spent, and being able to depend on Mochikit makes life a lot easier. My current idea is this: - javascript checks out browser version, viewport size, etc - if viewer has JS on and CSS and browser greater than current - 1, the rich media version of the site is seen - else, the viewer sees a plain text version of the site with dom structure friendly for lynx/scraping/accessibility/google ( Content first, accessibility friendly tags and structure, etc ) The above strategy means that I can avoid ugly hacks in the css and in the DOM structure by having JS functions do any cross browser and screen size adjustments. The downside is that it gives viewers with no JS enabled a plain text site. My feeling is that this is a good compromise that prevents broken site viewing, IMHO worse than seeing a plain text site and a message saying You are viewing the plain text version of this site. The rich content version requires javascript and css to be enabled, and a browser of miniminum IE6, Firefox X.X, etc My question though, is how many people out there am I likely cutting out or going to annoy by saying plain-text *or* JS+CSS, but no CSS without JS? I have never worked in the regular office industries, so I have no real idea how many people view sites behind javascript blocking. Opinions on the above? Strategies that others follow? Thanks Iain --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 1.0.1 Status Update
On Saturday 20 January 2007 14:10, Karl Guertin wrote: Pylons is recommended if you feel that TurboGears makes too many component choices you disagree with. How does Pylons compare with some of the convenience features of TurboGears such as Catwalk and Model Designer? j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 1.0.1 Status Update
On 1/20/07, Joshua J. Kugler [EMAIL PROTECTED] wrote: On Saturday 20 January 2007 14:10, Karl Guertin wrote: Pylons is recommended if you feel that TurboGears makes too many component choices you disagree with. How does Pylons compare with some of the convenience features of TurboGears such as Catwalk and Model Designer? Doesn't have them. Neither does TG if you're using SQLAlchemy :) It does have a really good implementation of EvalException for debugging, which is a LOT more useful than the model design stuff in my experience. -bob --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: 1.0.1 Status Update
On 1/20/07, Bob Ippolito [EMAIL PROTECTED] wrote: Pylons and TurboGears are practically the same thing if you're using SQLAlchemy, since none of the TG admin tools really do you any good in that case. I know, but I'm comfortable with TG. The internals to Pylons make more sense to me because it's based on lighter weight stuff than CherryPy (paste and WSGI). It's also a breeze to debug with EvalException. There's an option to enable EvalException debugging in TG by setting tg.fancy_exception = True, but the CSS was messed up last I checked. if the TG admin tools were WSGI based then it could be interchangeable just like the Buffet template plugins that both frameworks use now. I don't know how closely you've been following the planning, but the goal is to get TG split back up into reusable components. Alberto has started this with ToscaWidgets. I know a number of people expressed interest in developing the FastData module into an independent project. I'm interested in doing an admin-type project, but the docs for 1.0 need to be finished first. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] sqlobject and tables
I have several tables in my database which have the same structure as each other but have different names. How would I create a class in python code to access these individual tables? I can provide a tuple of all the names of the tables in the database, but how do I go about creating the class for each of them? I know this is probably confusing because I really dont know how to explain. I dont want to have to create a class for each table since they are all identical structures. Thanks! -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.2/641 - Release Date: 1/20/2007 10:24 AM --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: sqlobject and tables
Hi Lee, Just create a class with all your common definition (derived from SQLObject) later derive from this class fore each of your tables. for example: class Common(SQLOBject): name = StringCol() age = IntCol() [...] class FirstDerived(Common): pass class SecondDerived(Common): class sqlmeta: table = tableNameInDB [...] Just replace your definition on Common class and name all other classes as required, maybe by sqlmeta. Hope it helps. Regards. On 1/20/07, Lee Connell [EMAIL PROTECTED] wrote: I have several tables in my database which have the same structure as each other but have different names. How would I create a class in python code to access these individual tables? I can provide a tuple of all the names of the tables in the database, but how do I go about creating the class for each of them? I know this is probably confusing because I really don't know how to explain. I don't want to have to create a class for each table since they are all identical structures. Thanks! -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.2/641 - Release Date: 1/20/2007 10:24 AM -- Julio --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Opinions wanted on degrading strategy
In theory, you shouldn't have many problems always including CSS *and* always serving something that is nice and accessible. CSS is capable of repositioning everything, and if you are willing to use conditional comments[1] getting it all to work in IE isn't *too* painful. The problem is that at that point you are relying on CSS entirely for your page layout, which is admirable but not always the most efficient way to get things done. If you are looking to conditionally do anything, I would advise using the user agent string that the browser reports. You can access this from the server using: cherrypy.request.headers[User-Agent] A sample value looks something like this: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060124 Firefox/1.5.0.1 From there you have just about all the info you need, and can define different styles for each. It looks like there are some decent sites on the net that classify user agents by purpose (download/bot/browser/etc) so you can use that to figure everything out. From there your control is pretty granular, and you can use JSLink and CSSLink widgets to dynamically add and remove javascript/CSS resources from your template. (as well as conditionally changing the whole thing). Let me know if you need pointers for anything. It sounds like a comprehensive user agent classifier would be a somewhat useful resource. At the least it would be simpler to use than relying on JS to handle things, and handles the (relatively rare, to answer your question) cases where JS is disabled more elegantly. -Adam [1] http://www.quirksmode.org/css/condcom.html --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: sqlobject and tables
Julio Oña wrote: Hi Lee, Just create a class with all your common definition (derived from SQLObject) later derive from this class fore each of your tables. for example: class Common(SQLOBject): name = StringCol() age = IntCol() [...] I *think* this needs to derive from InheritableSQLObject instead of a regular SQLObject, but I am not entirely sure about that. Either way this is how I would approach the problem. (That or refactor the tables into each other unless their definitions are planned to diverge later) -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?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: sqlobject and tables
On 1/20/07, Lee Connell [EMAIL PROTECTED] wrote: I don't want to have to create a class for each table since they are all identical structures. you can do that programtically although you will need to a) hardcode the names of the tables b) do some sql foo with your system db tables to get the metadata out for all the names. I saw something like this on trac which was very handy http://trac.edgewall.org/browser/trunk/trac/web/api.py#L32 in case you got lost, they read all possible HTTP responses from the stdlib, and then loop overthem creating classes adding them to the api namespace. that way they have a class for each possible HTTP response code. In some people's minds beautiful in others a hack :) on the other hand you may want to use the fromDatabase attribute in the sqlmeta although you still need one class for each table. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---