[turbogears-commits] [1939] branches/1.0/turbogears/qstemplates/quickstart/+package+: merge [1938] from trunk

2006-10-02 Thread dangoor
Title: [1939] branches/1.0/turbogears/qstemplates/quickstart/+package+: merge [1938] from trunk








Revision 1939
Author fredlin
Date 2006-10-03 02:23:03 -0400 (Tue, 03 Oct 2006)


Log Message
merge [1938] from trunk

Added Paths

branches/1.0/turbogears/qstemplates/quickstart/+package+/static/
branches/1.0/turbogears/qstemplates/quickstart/+package+/static/css/
branches/1.0/turbogears/qstemplates/quickstart/+package+/static/css/style.css
branches/1.0/turbogears/qstemplates/quickstart/+package+/static/images/
branches/1.0/turbogears/qstemplates/quickstart/+package+/static/images/header_inner.png
branches/1.0/turbogears/qstemplates/quickstart/+package+/static/images/info.png
branches/1.0/turbogears/qstemplates/quickstart/+package+/static/images/ok.png


Removed Paths

branches/1.0/turbogears/qstemplates/qsbase/+package+/static/css/style.css
branches/1.0/turbogears/qstemplates/qsbase/+package+/static/images/header_inner.png
branches/1.0/turbogears/qstemplates/qsbase/+package+/static/images/info.png
branches/1.0/turbogears/qstemplates/qsbase/+package+/static/images/ok.png




Diff

Deleted: branches/1.0/turbogears/qstemplates/qsbase/+package+/static/css/style.css (1938 => 1939)

--- branches/1.0/turbogears/qstemplates/qsbase/+package+/static/css/style.css	2006-10-03 06:13:36 UTC (rev 1938)
+++ branches/1.0/turbogears/qstemplates/qsbase/+package+/static/css/style.css	2006-10-03 06:23:03 UTC (rev 1939)
@@ -1,124 +0,0 @@
-/*
- * Quick mash-up of CSS for the TG quick start page.
- */
-
-html, body, th, td {
-  color: black;
-  background-color: #ddd;
-  font: x-small Lucida Grande, Lucida Sans Unicode, geneva, verdana, sans-serif;
-  margin: 0;
-  padding: 0;
-}
-
-#header {
-  height: 80px;
-  width: 777px;
-  background: blue URL('../images/header_inner.png') no-repeat;
-  border-left: 1px solid #aaa;
-  border-right: 1px solid #aaa;
-  margin: 0 auto 0 auto;
-}
-
-a.link, a, a.active {
-  color: #369;
-}
-
-
-#main_content {
-  color: black;
-  font-size: 127%;
-  background-color: white;
-  width: 757px;
-  margin: 0 auto 0 auto;
-  border-left: 1px solid #aaa;
-  border-right: 1px solid #aaa;
-  padding: 10px;
-}
-
-#sidebar {
-  border: 1px solid #aaa;
-  background-color: #eee;
-  margin: 0.5em;
-  padding: 1em;
-  float: right;
-  width: 200px;
-  font-size: 88%;
-}
-
-#sidebar h2 {
-  margin-top: 0;
-}
-
-#sidebar ul {
-  margin-left: 1.5em;
-  padding-left: 0;
-}
-
-h1,h2,h3,h4,h5,h6,#getting_started_steps {
-  font-family: Century Schoolbook L, Georgia, serif;
-  font-weight: bold;
-}
-
-h2 {
-  font-size: 150%;
-}
-
-#getting_started_steps a {
-  text-decoration: none;
-}
-
-#getting_started_steps a:hover {
-  text-decoration: underline;
-}
-
-#getting_started_steps li {
-  font-size: 80%;
-  margin-bottom: 0.5em;
-}
-
-#getting_started_steps h2 {
-  font-size: 120%;
-}
-
-#getting_started_steps p {
-  font: 100% Lucida Grande, Lucida Sans Unicode, geneva, verdana, sans-serif;
-}
-
-#footer {
-  border: 1px solid #aaa;
-  border-top: 0px none;
-  color: #999;
-  background-color: white;
-  padding: 10px;
-  font-size: 80%;
-  text-align: center;
-  width: 757px;
-  margin: 0 auto 1em auto;
-}
-
-.code {
-  font-family: monospace;
-}
-
-span.code {
-  font-weight: bold;
-  background: #eee;
-}
-
-#status_block {
-  margin: 0 auto 0.5em auto;
-  padding: 15px 10px 15px 55px;
-  background: #cec URL('../images/ok.png') left center no-repeat;
-  border: 1px solid #9c9;
-  width: 450px;
-  font-size: 120%;
-  font-weight: bolder;
-}
-
-.notice {
-  margin: 0.5em auto 0.5em auto;
-  padding: 15px 10px 15px 55px;
-  width: 450px;
-  background: #eef URL('../images/info.png') left center no-repeat;
-  border: 1px solid #cce;
-}


Deleted: branches/1.0/turbogears/qstemplates/qsbase/+package+/static/images/header_inner.png

(Binary files differ)


Deleted: branches/1.0/turbogears/qstemplates/qsbase/+package+/static/images/info.png

(Binary files differ)


Deleted: branches/1.0/turbogears/qstemplates/qsbase/+package+/static/images/ok.png

(Binary files differ)


Added: branches/1.0/turbogears/qstemplates/quickstart/+package+/static/css/style.css (0 => 1939)

--- branches/1.0/turbogears/qstemplates/quickstart/+package+/static/css/style.css	(rev 0)
+++ branches/1.0/turbogears/qstemplates/quickstart/+package+/static/css/style.css	2006-10-03 06:23:03 UTC (rev 1939)
@@ -0,0 +1,124 @@
+/*
+ * Quick mash-up of CSS for the TG quick start page.
+ */
+
+html, body, th, td {
+  color: black;
+  background-color: #ddd;
+  font: x-small Lucida Grande, Lucida Sans Unicode, geneva, verdana, sans-serif;
+  margin: 0;
+  padding: 0;
+}
+
+#header {
+  height: 80px;
+  width: 777px;
+  background: blue URL('../images/header_inner.png') no-repeat;
+  border-left: 1px solid #aaa;
+  border-right: 1px solid #aaa;
+  margin: 0 auto 0 auto;
+}
+
+a.link, a, a.active {
+  color: #369;
+}
+
+
+#main_content {
+  color: black;
+  font-size: 127%;
+  background-color: white;
+  width: 757px;
+  margin: 0 auto 

[tg-tickets] Re: [TurboGears] #1011: Using sys.settrace causes odd errors

2006-10-02 Thread TurboGears
#1011: Using sys.settrace causes odd errors
+---
 Reporter:  jpellerin   |Owner:  anonymous
 Type:  defect  |   Status:  new  
 Priority:  normal  |Milestone:  1.0b3
Component:  TurboGears  |  Version:  1.0b1
 Severity:  normal  |   Resolution:   
 Keywords:  |  
+---
Comment (by nyenyec):

 I see this too, when I try to run TurboGears through the PyDev debugger
 and try to step over the
 {{{
 import turbogears
 }}}

 line.

-- 
Ticket URL: http://trac.turbogears.org/turbogears/ticket/1011
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] #1011: Using sys.settrace causes odd errors

2006-10-02 Thread TurboGears
#1011: Using sys.settrace causes odd errors
+---
 Reporter:  jpellerin   |Owner:  anonymous
 Type:  defect  |   Status:  new  
 Priority:  normal  |Milestone:  1.0b3
Component:  TurboGears  |  Version:  1.0b1
 Severity:  normal  |   Resolution:   
 Keywords:  |  
+---
-- 
Ticket URL: http://trac.turbogears.org/turbogears/ticket/1011
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: easy_install not upgrading paster script

2006-10-02 Thread Kevin Dangoor

That's pretty odd. You might want to put that question up on  
distutils-sig where Phillip would see it. (or cc Phillip directly.)

On Oct 1, 2006, at 2:29 PM, Jorge Vargas wrote:


 hi I was looking at http://trac.turbogears.org/turbogears/ticket/1073
 and I ran the command there. for my surprise this error came back.

 [EMAIL PROTECTED] ~/python/tg $ paster create --list-templates
 Warning: could not load entry point tgbase (VersionConflict:
 (PasteScript 0.5.1
 (/usr/lib/python2.4/site-packages/PasteScript-0.5.1-py2.4.egg),
 Requirement.parse('PasteScript=0.9.7')))
 Warning: could not load entry point tgwidget (VersionConflict:
 (PasteScript 0.5.1
 (/usr/lib/python2.4/site-packages/PasteScript-0.5.1-py2.4.egg),
 Requirement.parse('PasteScript=0.9.7')))
 Warning: could not load entry point tgbig (VersionConflict:
 (PasteScript 0.5.1
 (/usr/lib/python2.4/site-packages/PasteScript-0.5.1-py2.4.egg),
 Requirement.parse('PasteScript=0.9.7')))
 Warning: could not load entry point turbogears (VersionConflict:
 (PasteScript 0.5.1
 (/usr/lib/python2.4/site-packages/PasteScript-0.5.1-py2.4.egg),
 Requirement.parse('PasteScript=0.9.7')))
 Available templates:
   basic_package:  A basic setuptools-enabled package
   paste_deploy:   A web application deployed through paste.deploy


 I went to check and I do have 0.9.7

 [EMAIL PROTECTED] /usr/lib/python2.4/site-packages $ ls Paste
 Paste-0.5-py2.4.egg/ PasteScript-0.5.1-py2.4.egg/
 PasteDeploy-0.5-py2.4.egg/   PasteScript-0.9.7-py2.4.egg/

 so I ran which should fix the active version.

 [EMAIL PROTECTED] /usr/local/bin $ sudo easy_install -U --script-dir
 /usr/local/bin TurboGears

 so I track it down and my paster script is not being replace

 [EMAIL PROTECTED] ~/python/tg $ which paster
 /usr/local/bin/paster

 shows 0.5 dependancy.

 and my easy-install.pth has 0.9.7 there


 could someone confirm/deny this?

 


--
Kevin Dangoor
TurboGears / Zesty News

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com




--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[tg-trunk] new calendar widget

2006-10-02 Thread Jonathan LaCour

For a long time I have felt that the TurboGears calendar widget is
less than ideal.  Primarily its because its doesn't work properly for
me in WebKit-based browsers.  Secondarily, I think its not very pretty.

Today, I stumbled upon this calendar widget:

http://www.frequency-decoder.com/2006/10/02/unobtrusive-date-picker- 
widgit-update

It seems to work well in Safari (although, you have to press the
create new input link at the bottom of the demo before it works) and
I think its absolutely gorgeous.

If I made a TurboGears widget out of this, would it be a good candidate
to replace the existing calendar widget?

--
Jonathan LaCour
http://cleverdevil.org


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[tg-trunk] Re: new calendar widget

2006-10-02 Thread Karl Guertin

On 10/2/06, Jonathan LaCour [EMAIL PROTECTED] wrote:
 If I made a TurboGears widget out of this, would it be a good candidate
 to replace the existing calendar widget?

Without actually clicking through, I believe the current widget was
accepted due to licensing concerns more than beauty or functionality.

I'm having problems with the date picker you linked on firefox 1.5
linux. The ctrl_arrows don't seem to work consistently (e.g. I can
only change years in August and then only 06/07).

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[tg-trunk] Re: new calendar widget

2006-10-02 Thread Jonathan LaCour

Karl Guertin wrote:

 Without actually clicking through, I believe the current widget was
 accepted due to licensing concerns more than beauty or functionality.

Fair enough.

 I'm having problems with the date picker you linked on firefox 1.5
 linux. The ctrl_arrows don't seem to work consistently (e.g. I can
 only change years in August and then only 06/07).

Interesting, I only tried it in a few places, and it worked okay for
me, but I am not on Linux.  Maybe I just got lulled in by how pretty
it is in comparison to the current widget.

This same guy has a fantastic sortable tables hunk-o-javascript that
I am using, which is very liberally licensed.  I reported an issue
with it, and he had it fixed within a day or two.  He is certainly
responsive to licensing concerns and bug reports.

Ah, well, I'll keep my eye on it...

--
Jonathan LaCour
http://cleverdevil.org


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[tg-trunk] Re: new calendar widget

2006-10-02 Thread Karl Guertin

On 10/2/06, Jonathan LaCour [EMAIL PROTECTED] wrote:
 Ah, well, I'll keep my eye on it...

That wasn't meant to dissuade discussion about it, just pointing out
that better looking and working widgets did exist at the time the
current widget was put it, but I remember licensing being the reason
they weren't used.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[tg-trunk] Re: new calendar widget

2006-10-02 Thread Elvelind Grandin

You did read that The following date-pickers have a specified date
range of 11/08/2006 to 13/09/2007. Dates outside of this range are
unselectable. right? :)

It sure looks a lot better then our current one atleast.

On 10/2/06, Karl Guertin [EMAIL PROTECTED] wrote:

 On 10/2/06, Jonathan LaCour [EMAIL PROTECTED] wrote:
  If I made a TurboGears widget out of this, would it be a good candidate
  to replace the existing calendar widget?

 Without actually clicking through, I believe the current widget was
 accepted due to licensing concerns more than beauty or functionality.

 I'm having problems with the date picker you linked on firefox 1.5
 linux. The ctrl_arrows don't seem to work consistently (e.g. I can
 only change years in August and then only 06/07).

 



-- 
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
-~--~~~~--~~--~--~---



[tg-trunk] Re: new calendar widget

2006-10-02 Thread Jorge Godoy

Jonathan LaCour [EMAIL PROTECTED] writes:

 For a long time I have felt that the TurboGears calendar widget is
 less than ideal.  Primarily its because its doesn't work properly for
 me in WebKit-based browsers.  Secondarily, I think its not very pretty.

I agree that this one is prettier.  How about its I18Nization?  I found it a
bit weird to have a calendar in English and have the fields filled in like I
would here in .br (DD/MM/)... 

I also missed the today button (yes!  I'm one of these people that don't
know what day it is today without looking at my cellphone or computer
screen...).



-- 
Jorge Godoy  [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[tg-trunk] Re: new calendar widget

2006-10-02 Thread Kevin Dangoor

On Oct 2, 2006, at 3:11 PM, Jorge Godoy wrote:


 Jonathan LaCour [EMAIL PROTECTED] writes:

 For a long time I have felt that the TurboGears calendar widget is
 less than ideal.  Primarily its because its doesn't work properly for
 me in WebKit-based browsers.  Secondarily, I think its not very  
 pretty.

 I agree that this one is prettier.  How about its I18Nization?  I  
 found it a
 bit weird to have a calendar in English and have the fields filled  
 in like I
 would here in .br (DD/MM/)...

 I also missed the today button (yes!  I'm one of these people  
 that don't
 know what day it is today without looking at my cellphone or computer
 screen...).

I certainly have no great love for our current calendar. If the  
licensing, functionality, and i18n are all in order, switching is  
cool by me.

Kevin


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[tg-trunk] Re: new calendar widget

2006-10-02 Thread Jorge Godoy

Kevin Dangoor [EMAIL PROTECTED] writes:

 I certainly have no great love for our current calendar. If the  
 licensing, functionality, and i18n are all in order, switching is  
 cool by me.

I have the same opinion (I even suggested some replacements in the past :-)) 

-- 
Jorge Godoy  [EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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: Kid templates in subdirectories

2006-10-02 Thread Christoph Zwerschke

Ian Wilson wrote:
 Make sure py:extends='master.kid' gets change to reflect its new
 location.  For example:
   py:extends='../master.kid' when your kid file is in
 /templates/folder/file.kid.  This syntax is really touchy so make sure
 you have the single quotes around the path inside the double quotes.
 The error message is usually totally useless in this case(As are most
 kid error messages).

The bad error message will be fixed in Kid 0.9.4. Maybe I can make the 
syntax for py:extends less touchy as well (the py:extends arguments 
cannot be dynamic anyway, contrary to py:layout).

-- Christoph

--~--~-~--~~~---~--~~
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] Problems connecting to Firebird

2006-10-02 Thread RadOldMan

I have been trying to connect to a Firebird database on win2K and have
found 3 problems.
1) Can't figure how to set type_conv=200, this is necessary if not
using mx_time, I can do this if I create connection at SQLObject level,
will attach code below I tried to add ?type_conv=200 to
sqlobject.dburi value but that fails with invalid arguments.

2) When I try to run tg-admin sql create I get :
  File C:\Python24\Lib\site-packages\kinterbasdb\__init__.py, line
272, in ini
t
_k.concurrency_level_set(concurrency_level)
kinterbasdb.ProgrammingError: (0, 'The concurrency level cannot be
changed once
it has been set.  Use kinterbasdb.init(concurrency_level=?) to set the
concurren
cy level legally.')


I will include entire traceback, also below. Some reseach indicated
that this error may be because of attempting to call init more than
once?

) Probably a SQLObject problem, but when I create a table within
SQLObject it includes the ID field and a generator to perform the
auto-increment process, but does not create a corresponding ON Insert
trigger.

== Code that works ==
Here is the code that works (with exception of on-insert trigger
problem) when run using SQLObject, note call to kinterbasdb.init,
without this it fails:

import kinterbasdb
kinterbasdb.init(type_conv=200)
from sqlobject import *
cs =
firebird://sysdba:[EMAIL PROTECTED]:3050/c|/tutorial/tutorial.fdb
sqlhub.processConnection = connectionForURI(cs)
class Person(SQLObject):
fname = StringCol()

Person.createTable()

 Here is full traceback when I use the same connect string
in dev.cfg and run tg-admin sql create:  ===

C:\tutorialtg-admin sql create
Using database URI
firebird://sysdba:[EMAIL PROTECTED]:3050/c|/tutorial/tutori
al.fdb
Traceback (most recent call last):
  File c:\python24\scripts\tg-admin-script.py, line 7, in ?
sys.exit(
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\comm
and\base.py, line 356, in main
command.run()
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\comm
and\base.py, line 143, in run
command.the_runner.run(sys.argv)
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\manager\command.py, line 102, in run
runner.run()
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\manager\command.py, line 233, in run
self.command()
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\manager\command.py, line 556, in command
exists = soClass._connection.tableExists(soClass.sqlmeta.table)
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\firebird\firebirdconnection.py, line 146, in tableExists
result = self.queryOne(SELECT COUNT(rdb$relation_name) FROM
rdb$relations W
HERE rdb$relation_name = '%s'
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\dbconnection.py, line 349, in queryOne
return self._runWithConnection(self._queryOne, s)
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\firebird\firebirdconnection.py, line 51, in _runWithConnection
conn = self.getConnection()
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\dbconnection.py, line 229, in getConnection
conn = self.makeConnection()
  File
c:\python24\lib\site-packages\SQLObject-0.7.1dev_r1860-py2.4.egg\sqlobje
ct\firebird\firebirdconnection.py, line 82, in makeConnection
charset=self.charset,
  File C:\Python24\Lib\site-packages\kinterbasdb\__init__.py, line
435, in con
nect
return Connection(*args, **keywords_args)
  File C:\Python24\Lib\site-packages\kinterbasdb\__init__.py, line
533, in __i
nit__
_ensureInitialized()
  File C:\Python24\Lib\site-packages\kinterbasdb\__init__.py, line
348, in _en
sureInitialized
init()
  File C:\Python24\Lib\site-packages\kinterbasdb\__init__.py, line
272, in ini
t
_k.concurrency_level_set(concurrency_level)
kinterbasdb.ProgrammingError: (0, 'The concurrency level cannot be
changed once
it has been set.  Use kinterbasdb.init(concurrency_level=?) to set the
concurren
cy level legally.')


--~--~-~--~~~---~--~~
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 to match against a user in groups

2006-10-02 Thread [EMAIL PROTECTED]

Is it possible to do a select on the groups with a condition that the
user's table contains a specific user?

I wasn't able to find in the sql documentation how to do this.

The psuedocode i have is:
selectGroups =
model.Groups.select(model.Groups.users.__contains__(selectUser.id)

Of course .__contains__ is not correct sql syntax...


--~--~-~--~~~---~--~~
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: Re-usable components

2006-10-02 Thread Sanjay

 TinyMCE (http://tinymce.moxiecode.com/) has been wrapped in a TG
 widget (http://cheeseshop.python.org/pypi/TurboTinyMCE/1.0.3).

Thanks for the info on the great widget! However, while using it, I get
only a textarea without any buttons. Being a beginner, not succeeding
in troubleshooting. Any sample code on how to use it will be of vital
help. A tiny tutorial, exploring various options (can be posted in the
documentation or wiki), will be really great!

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] Re: Re-usable components

2006-10-02 Thread Ed Singleton

On 10/2/06, Sanjay [EMAIL PROTECTED] wrote:

  TinyMCE (http://tinymce.moxiecode.com/) has been wrapped in a TG
  widget (http://cheeseshop.python.org/pypi/TurboTinyMCE/1.0.3).

 Thanks for the info on the great widget! However, while using it, I get
 only a textarea without any buttons. Being a beginner, not succeeding
 in troubleshooting. Any sample code on how to use it will be of vital
 help. A tiny tutorial, exploring various options (can be posted in the
 documentation or wiki), will be really great!

Untested, but the below should be enough to work:

from turbogears.widgets import *
from tinymce import TinyMCE

class EditorForm(WidgetsList):
title = TextField()
body = TinyMCE()

editor_form = TableForm(fields=EditorForm(), action=/save)

Ed

--~--~-~--~~~---~--~~
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 to match against a user in groups

2006-10-02 Thread Peter S Russell

On Sun, 2006-10-01 at 22:29 +, [EMAIL PROTECTED] wrote:
 Is it possible to do a select on the groups with a condition that the
 user's table contains a specific user?

To get a list of groups containing a given user, you would do:

my_user.groups

However if you want this information in SelectResults object (because,
for example you want to display it in a fast data grid), you have two
choices.  

One is to change your model to use an SQLRelatedJoin instead of a
RelatedJoin.  This is not ideal if you want one format some of the time,
and the other format the rest, as if you have both columns SQLObject
will try to create two join tables with the same name.  You can prevent
this by adding createRelatedTable=False in your column definition for
one of the columns, and creating the tables will work fine, but it will
still complain when your try to drop the tables.

The other (less succinct, slower, but easier, and more understandable)
option is to use the IN function:

from sqlbuilder import IN

model.Group.select(IN(model.Group.q.id, [group.id for group in
my_user.groups]))

HTH

 I wasn't able to find in the sql documentation how to do this.
 
 The psuedocode i have is:
   selectGroups =
 model.Groups.select(model.Groups.users.__contains__(selectUser.id)
 
 Of course .__contains__ is not correct sql syntax...
 
 
  
-- 
Peter S Russell [EMAIL PROTECTED]
Qustom


--~--~-~--~~~---~--~~
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] Renaming fields using a Schema

2006-10-02 Thread Ed Singleton

I'm using a FormEncode Schema to validate a dictionary, and I was
wondering if it would be easy to get the validator to rename fields on
the way through?

Something like:

data = {'email': '[EMAIL PROTECTED]'}

class MyValidator(validators.Schema):
email = validators.Email(not_empty=True, new_field_name='user_email')

my_validator = MyValidator()

valid_data = my_validator.to_python(data)

print valid_data

## {'user_email': '[EMAIL PROTECTED]'}

Thanks

Ed

--~--~-~--~~~---~--~~
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] Debugging Kid template issues

2006-10-02 Thread [EMAIL PROTECTED]

This is someting that appears to have been troublesome to others too,
so I wondered whether there are definite plans to improve the issues it
raises. I just started to port an existing web app, the one from
Chapter 18 of Python Web Programming, to help me learn TurboGears in
a way that would explain it clearly to people who'd read the book.

Unfortunately this initially (until I can start making proper use of
Kid) required me to insert various generated chunks of HTML into Kid
templates using the ${XML(...)} feature. Alas, when the HTML isn't
properly-formed I get a huge traceback which ends with the information
that there's a problem at line 1, column 41. But it doesn't show me the
XML source it's complaining about. As of this writing I have spent
about an hour looking for an XML problem and I'm about ready to give
up.

Are there options I can set to improve the debug information I get
back? If not, are their plans to improve the XML diagnostics? I append
the actual traceback I am dealing with just as an example of its
general uselessness.

regards
 Steve

Page handler: bound method Root.index of gs.controllers.Root object
at 0x01573530
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
c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py,
line 254, in main
body = page_handler(*virtual_path, **self.params)
  File string, line 3, in index
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py,
line 326, in expose
output = database.run_with_transaction(
  File string, line 5, in run_with_transaction
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\database.py,
line 246, in so_rwt
retval = func(*args, **kw)
  File string, line 5, in _expose
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py,
line 343, in lambda
mapping, fragment, args, kw)))
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py,
line 380, in _execute_func
return _process_output(output, template, format, content_type,
mapping, fragment)
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\controllers.py,
line 74, in _process_output
fragment=fragment)
  File
c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears\view\base.py,
line 131, in render
return engine.render(**kw)
  File
c:\python24\lib\site-packages\TurboKid-0.9.8-py2.4.egg\turbokid\kidsupport.py,
line 156, in render
return t.serialize(encoding=self.defaultencoding, output=format,
fragment=fragment)
  File
c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\__init__.py,
line 236, in serialize
return serializer.serialize(self, encoding, fragment)
  File
c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\serialization.py,
line 51, in serialize
text = list(self.generate(stream, encoding, fragment))
  File
c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\serialization.py,
line 329, in generate
for ev, item in self.apply_filters(stream):
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 210, in _coalesce
for ev, item in stream:
  File
c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\filter.py, line
21, in transform_filter
for ev, item in apply_matches(stream, template, templates,
apply_func):
  File
c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\filter.py, line
31, in apply_matches
item = stream.expand()
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 99, in expand
for ev, item in self._iter:
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 168, in _track
for p in stream:
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 210, in _coalesce
for ev, item in stream:
  File C:\Steve\Projects\PyTeach\gs\templates\index.py, line 136, in
_pull
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 123, in strip
for (ev, item) in self._iter:
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 168, in _track
for p in stream:
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 210, in _coalesce
for ev, item in stream:
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 374, in __iter__
for (ev, stuff) in self._expat_stream():
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 346, in _expat_stream
feed(data)
  File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\pull.py,
line 414, in feed
raise e
ExpatError: not well-formed (invalid token): line 1, column 41

Of course, why didn't I *see* that!?!?!?!?!?!?!?!


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
TurboGears group.
To post 

[TurboGears] Re: how to split model into multiple files

2006-10-02 Thread Ken Kuhlman

Are you using soclasses to control your build order?  If so, you need
to make sure your submodels get added to the one defined in model.py.
See below for how I do it, without having to tweak sqlobject.txt.

Admittedly, this two import solution is a bit of a hack, but I prefer
it to sqlobject.txt because what's happening is a little more visible.
Of course, YMMV:

# Import the tables from the submodels.
from submodels.changerequest import *

# These imports are just for the soClasses.
#   soClasses needs to be extended for each submodel
from submodels import changerequest

# These tables are defined in my models.py
soClasses = (Person, Groups, Permission, Visit,
VisitIdentity)

soClasses += (changerequest.soClasses)


--~--~-~--~~~---~--~~
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 Kid template issues

2006-10-02 Thread Christoph Zwerschke

[EMAIL PROTECTED] wrote:
 Unfortunately this initially (until I can start making proper use of
 Kid) required me to insert various generated chunks of HTML into Kid
 templates using the ${XML(...)} feature. Alas, when the HTML isn't
 properly-formed I get a huge traceback which ends with the information
 that there's a problem at line 1, column 41. But it doesn't show me the
 XML source it's complaining about. As of this writing I have spent
 about an hour looking for an XML problem and I'm about ready to give
 up.

This is a problem caused by Kid's way of operating by compiling XML to
Python and then using pull streams. Two things could be done:

First, in many cases, Kid should supplement the usual traceback with an
output of the data or Python expression it was processing when the error
occurred. This was already implemented for py:attrs expressions, for
instance. Maybe I can do something similar for the XML() feature. Can
you send me a small example template where you get such a meaningless
message with XML()? I'll try to improve this and get it in Kid 0.9.4
which I think should appear soon.

Second, in the long run, we will also need to implement some way of
preserving the context. Some suggestions have been made, e.g. here:
http://www.kid-templating.org/trac/ticket/95
This should be best discussed on the Kid mailing list:
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Also, please note that there Genshi now (http://genshi.edgewall.org)
that may supersede Kid in the long run, because it uses a different
approach that allows for much better error messages.

Anyway, I think there is still a lot of potential for Kid to be improved
and I would like to see Kid alive for quite a while, since it is still
very useful and elegant.

-- Christoph

--~--~-~--~~~---~--~~
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: Scalability

2006-10-02 Thread Kevin Dangoor


On Oct 2, 2006, at 2:17 AM, [EMAIL PROTECTED] wrote:

 I just want to say what a wonderful toolset Turbogears is.  I'm having
 a blast using it.

Great!


 I want to ask some questions, however, about scalability.  I'm
 developing a web system (the pages of which will be customised on a
 per-user basis), that may grow to be quite popular.  I need to
 implement this, such that it's horizontally scalable in an indefinite
 manner.

 OK, so web server replication and load balancing is easy.  My problem
 is with the DB.  I can find several good-looking master-slave DB
 replicators (Slony for PG, for example), but I can't find a suitable
 load-balancing mechanism, especially one that integrates with  
 SQLObject
 or SQLAlchemy.

I'm not sure what you mean here. In what way is the ORM involved with  
the database replication? Do you mean from the standpoint of having  
some collection of web servers talk to some specifically collection  
of database servers?

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: Scalability

2006-10-02 Thread Stuart Clarke

Thanks for the reply Kevin...

  I want to ask some questions, however, about scalability.  I'm
  developing a web system (the pages of which will be customised on a
  per-user basis), that may grow to be quite popular.  I need to
  implement this, such that it's horizontally scalable in an indefinite
  manner.
 
  OK, so web server replication and load balancing is easy.  My problem
  is with the DB.  I can find several good-looking master-slave DB
  replicators (Slony for PG, for example), but I can't find a suitable
  load-balancing mechanism, especially one that integrates with  
  SQLObject
  or SQLAlchemy.
 
 I'm not sure what you mean here. In what way is the ORM involved with  
 the database replication? Do you mean from the standpoint of having  
 some collection of web servers talk to some specifically collection  
 of database servers?

*** As I see it, there are two problems in using a distributed
master-slave arrangement for the DB: replication (i.e. mirroring data
from the master to the slaves) and load balancing (i.e. balancing the
DB-read load across the slaves).

Replication is handled by tools such as Slony.  What I need from the ORM
(or whatever) is a mechanism for load balancing.  I need to be able to
say: here's my master server (for writing) and here is my list of slave
servers (for reading).  Please balance the system load appropriately,
across these servers.  Or I need a hook where I can insert code of my
own to do this.

I have a sneaking suspicion that it might be possible in SQLAlchemy, but
I don't think it will integrate out of the box with TG's Identity
implementation.

Plus, I would like to do it in SQLObject, so I can have Catwalk.

Any suggestions?

Thanks,

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: Scalability

2006-10-02 Thread Bob Ippolito

On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:

 Thanks for the reply Kevin...

   I want to ask some questions, however, about scalability.  I'm
   developing a web system (the pages of which will be customised on a
   per-user basis), that may grow to be quite popular.  I need to
   implement this, such that it's horizontally scalable in an indefinite
   manner.
  
   OK, so web server replication and load balancing is easy.  My problem
   is with the DB.  I can find several good-looking master-slave DB
   replicators (Slony for PG, for example), but I can't find a suitable
   load-balancing mechanism, especially one that integrates with
   SQLObject
   or SQLAlchemy.
 
  I'm not sure what you mean here. In what way is the ORM involved with
  the database replication? Do you mean from the standpoint of having
  some collection of web servers talk to some specifically collection
  of database servers?

 *** As I see it, there are two problems in using a distributed
 master-slave arrangement for the DB: replication (i.e. mirroring data
 from the master to the slaves) and load balancing (i.e. balancing the
 DB-read load across the slaves).

 Replication is handled by tools such as Slony.  What I need from the ORM
 (or whatever) is a mechanism for load balancing.  I need to be able to
 say: here's my master server (for writing) and here is my list of slave
 servers (for reading).  Please balance the system load appropriately,
 across these servers.  Or I need a hook where I can insert code of my
 own to do this.

 I have a sneaking suspicion that it might be possible in SQLAlchemy, but
 I don't think it will integrate out of the box with TG's Identity
 implementation.

 Plus, I would like to do it in SQLObject, so I can have Catwalk.

 Any suggestions?

Why don't you do load balancing at the DB layer with pgpool or something?

-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
-~--~~~~--~~--~--~---



[TurboGears] Re: Scalability

2006-10-02 Thread Stuart Clarke

On Mon, 2006-10-02 at 10:04 -0700, Bob Ippolito wrote:
 On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
 
  Thanks for the reply Kevin...
 
I want to ask some questions, however, about scalability.  I'm
developing a web system (the pages of which will be customised on a
per-user basis), that may grow to be quite popular.  I need to
implement this, such that it's horizontally scalable in an indefinite
manner.
   
OK, so web server replication and load balancing is easy.  My problem
is with the DB.  I can find several good-looking master-slave DB
replicators (Slony for PG, for example), but I can't find a suitable
load-balancing mechanism, especially one that integrates with
SQLObject
or SQLAlchemy.
  
   I'm not sure what you mean here. In what way is the ORM involved with
   the database replication? Do you mean from the standpoint of having
   some collection of web servers talk to some specifically collection
   of database servers?
 
  *** As I see it, there are two problems in using a distributed
  master-slave arrangement for the DB: replication (i.e. mirroring data
  from the master to the slaves) and load balancing (i.e. balancing the
  DB-read load across the slaves).
 
  Replication is handled by tools such as Slony.  What I need from the ORM
  (or whatever) is a mechanism for load balancing.  I need to be able to
  say: here's my master server (for writing) and here is my list of slave
  servers (for reading).  Please balance the system load appropriately,
  across these servers.  Or I need a hook where I can insert code of my
  own to do this.
 
  I have a sneaking suspicion that it might be possible in SQLAlchemy, but
  I don't think it will integrate out of the box with TG's Identity
  implementation.
 
  Plus, I would like to do it in SQLObject, so I can have Catwalk.
 
  Any suggestions?
 
 Why don't you do load balancing at the DB layer with pgpool or something?

*** pgpool is limited to one master, and one slave.  It's scalability is
therefore quite limited.

I haven't found any general-purpose tools which can provide unlimited
(say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
anyone know of one?

Thanks,

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: Scalability

2006-10-02 Thread mulicheng


 I haven't found any general-purpose tools which can provide unlimited
 (say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
 anyone know of one?

Well, for me, I use memcached instead of having lots of db servers.
This may or may not be an option depending on your type of workload,
but it works well for our usage.

-Dennis
http://mydrawings.com


--~--~-~--~~~---~--~~
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: Scalability

2006-10-02 Thread Bob Ippolito

On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:

 On Mon, 2006-10-02 at 10:04 -0700, Bob Ippolito wrote:
  On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
  
   Thanks for the reply Kevin...
  
 I want to ask some questions, however, about scalability.  I'm
 developing a web system (the pages of which will be customised on a
 per-user basis), that may grow to be quite popular.  I need to
 implement this, such that it's horizontally scalable in an indefinite
 manner.

 OK, so web server replication and load balancing is easy.  My problem
 is with the DB.  I can find several good-looking master-slave DB
 replicators (Slony for PG, for example), but I can't find a suitable
 load-balancing mechanism, especially one that integrates with
 SQLObject
 or SQLAlchemy.
   
I'm not sure what you mean here. In what way is the ORM involved with
the database replication? Do you mean from the standpoint of having
some collection of web servers talk to some specifically collection
of database servers?
  
   *** As I see it, there are two problems in using a distributed
   master-slave arrangement for the DB: replication (i.e. mirroring data
   from the master to the slaves) and load balancing (i.e. balancing the
   DB-read load across the slaves).
  
   Replication is handled by tools such as Slony.  What I need from the ORM
   (or whatever) is a mechanism for load balancing.  I need to be able to
   say: here's my master server (for writing) and here is my list of slave
   servers (for reading).  Please balance the system load appropriately,
   across these servers.  Or I need a hook where I can insert code of my
   own to do this.
  
   I have a sneaking suspicion that it might be possible in SQLAlchemy, but
   I don't think it will integrate out of the box with TG's Identity
   implementation.
  
   Plus, I would like to do it in SQLObject, so I can have Catwalk.
  
   Any suggestions?
 
  Why don't you do load balancing at the DB layer with pgpool or something?

 *** pgpool is limited to one master, and one slave.  It's scalability is
 therefore quite limited.

 I haven't found any general-purpose tools which can provide unlimited
 (say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
 anyone know of one?

Well, you only want one master... at least for any of the free
PostgreSQL replication solutions. I always partition my usage between
read-only and read-write connections, so it's rather easy to make that
work.

I'd take a look at SQLRelay, at least until pgpool-II is out.

-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
-~--~~~~--~~--~--~---



[TurboGears] test

2006-10-02 Thread pythonwin

test


--~--~-~--~~~---~--~~
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?

2006-10-02 Thread mabgfounder

I have also inherited an old project that requires TurboGears 0.8.9. I
tried using ez_setup to install version 0.8.9 by executing the
following command:

  # python2.4 ez_setup.py -f
http://www.turbogears.org/0.8/download/index.html --script-dir
/usr/local/bin TurboGears

I have tried this with and without the explicit ==0.8.9 and neither
worked. I received the following  output

  Downloading
http://cheeseshop.python.org/packages/2.4/s/setuptools/setuptools-0.6c2-py2.4.egg
  Searching for TurboGears
  Reading http://www.turbogears.org/0.8/download/index.html
  Best match: TurboGears 0.8.9
  Downloading
http://files.turbogears.org/eggs/TurboGears-0.8.9-py2.4.egg
  error: Can't download
http://files.turbogears.org/eggs/TurboGears-0.8.9-py2.4.egg: 404 Not
Found

Should I be pointing ez_setup at another location?

Thanks for your help!

-Brian

Kevin Dangoor wrote:
 Hi Ivo,

 Sorry about that. The download page had gotten messed up.

 http://www.turbogears.org/0.8/download/
 
 Kevin
 
 blog: http://www.BlueSkyOnMars.com


--~--~-~--~~~---~--~~
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] Bug: omitted 'import cherrypy' in quickstarted controllers.py

2006-10-02 Thread dvska

Hi all,

Just installed a fresh version of TG (r1937, WinXP) invoking
svn co http://www.turbogears.org/svn/turbogears/trunk
setup.py install

Than '''
tg-admin quickstart
...
Do you need Identity (usernames/passwords) in this project? [no] yes
'''

Pointing browser to http://127.0.0.1:8080/login caused a
'''
...\controllers.py, line 26, in login
previous_url= cherrypy.request.path
NameError: global name 'cherrypy' is not defined
''' exception


--~--~-~--~~~---~--~~
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: Scalability

2006-10-02 Thread Stuart Clarke

  I haven't found any general-purpose tools which can provide unlimited
  (say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
  anyone know of one?
 
 Well, for me, I use memcached instead of having lots of db servers.
 This may or may not be an option depending on your type of workload,
 but it works well for our usage.

*** I plan to use memcached also.  But my client has explicitly
requested that we be capable of horizontally scaling the DB
architecture, if required.

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: Scalability

2006-10-02 Thread Stuart Clarke

On Mon, 2006-10-02 at 10:45 -0700, Bob Ippolito wrote:
 On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
 
  On Mon, 2006-10-02 at 10:04 -0700, Bob Ippolito wrote:
   On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
   
Thanks for the reply Kevin...
   
  I want to ask some questions, however, about scalability.  I'm
  developing a web system (the pages of which will be customised on a
  per-user basis), that may grow to be quite popular.  I need to
  implement this, such that it's horizontally scalable in an 
  indefinite
  manner.
 
  OK, so web server replication and load balancing is easy.  My 
  problem
  is with the DB.  I can find several good-looking master-slave DB
  replicators (Slony for PG, for example), but I can't find a suitable
  load-balancing mechanism, especially one that integrates with
  SQLObject
  or SQLAlchemy.

 I'm not sure what you mean here. In what way is the ORM involved with
 the database replication? Do you mean from the standpoint of having
 some collection of web servers talk to some specifically collection
 of database servers?
   
*** As I see it, there are two problems in using a distributed
master-slave arrangement for the DB: replication (i.e. mirroring data
from the master to the slaves) and load balancing (i.e. balancing the
DB-read load across the slaves).
   
Replication is handled by tools such as Slony.  What I need from the ORM
(or whatever) is a mechanism for load balancing.  I need to be able to
say: here's my master server (for writing) and here is my list of slave
servers (for reading).  Please balance the system load appropriately,
across these servers.  Or I need a hook where I can insert code of my
own to do this.
   
I have a sneaking suspicion that it might be possible in SQLAlchemy, but
I don't think it will integrate out of the box with TG's Identity
implementation.
   
Plus, I would like to do it in SQLObject, so I can have Catwalk.
   
Any suggestions?
  
   Why don't you do load balancing at the DB layer with pgpool or something?
 
  *** pgpool is limited to one master, and one slave.  It's scalability is
  therefore quite limited.
 
  I haven't found any general-purpose tools which can provide unlimited
  (say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
  anyone know of one?
 
 Well, you only want one master... at least for any of the free
 PostgreSQL replication solutions. I always partition my usage between
 read-only and read-write connections, so it's rather easy to make that
 work.

*** I'm happy with only one master, and I also wish to partition my
usage between read-only and read-write connections.  I want to do that,
however, within a single Turbogears application.  Is this what you do?
Can you provide some hints on how to do it?  Also, do you know of a way
to pool your read-only connections to a number of slaves, thereby
distributing the load (within either SO or SA)?

SQL Relay seems capable of load-balancing across a number of read-only
DBs.  And it has a drop-in replacement API for PostgreSQL.  It doesn't
distinguish between master and slaves, however, and so can't
automatically manage the difference between reading and writing.  Also,
SQL Relay load-balances on a per-connection basis, which run contrary to
Turbo Gears' persistent-connection architecture.  Which sucks.  Have you
any experience with using SQL Relay under Turbo Gears?

Thanks,

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: Scalability

2006-10-02 Thread Bob Ippolito

On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:

 On Mon, 2006-10-02 at 10:45 -0700, Bob Ippolito wrote:
  On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
  
   On Mon, 2006-10-02 at 10:04 -0700, Bob Ippolito wrote:
On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:

 Thanks for the reply Kevin...

   I want to ask some questions, however, about scalability.  I'm
   developing a web system (the pages of which will be customised on 
   a
   per-user basis), that may grow to be quite popular.  I need to
   implement this, such that it's horizontally scalable in an 
   indefinite
   manner.
  
   OK, so web server replication and load balancing is easy.  My 
   problem
   is with the DB.  I can find several good-looking master-slave DB
   replicators (Slony for PG, for example), but I can't find a 
   suitable
   load-balancing mechanism, especially one that integrates with
   SQLObject
   or SQLAlchemy.
 
  I'm not sure what you mean here. In what way is the ORM involved 
  with
  the database replication? Do you mean from the standpoint of having
  some collection of web servers talk to some specifically collection
  of database servers?

 *** As I see it, there are two problems in using a distributed
 master-slave arrangement for the DB: replication (i.e. mirroring data
 from the master to the slaves) and load balancing (i.e. balancing the
 DB-read load across the slaves).

 Replication is handled by tools such as Slony.  What I need from the 
 ORM
 (or whatever) is a mechanism for load balancing.  I need to be able to
 say: here's my master server (for writing) and here is my list of 
 slave
 servers (for reading).  Please balance the system load appropriately,
 across these servers.  Or I need a hook where I can insert code of my
 own to do this.

 I have a sneaking suspicion that it might be possible in SQLAlchemy, 
 but
 I don't think it will integrate out of the box with TG's Identity
 implementation.

 Plus, I would like to do it in SQLObject, so I can have Catwalk.

 Any suggestions?
   
Why don't you do load balancing at the DB layer with pgpool or 
something?
  
   *** pgpool is limited to one master, and one slave.  It's scalability is
   therefore quite limited.
  
   I haven't found any general-purpose tools which can provide unlimited
   (say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
   anyone know of one?
 
  Well, you only want one master... at least for any of the free
  PostgreSQL replication solutions. I always partition my usage between
  read-only and read-write connections, so it's rather easy to make that
  work.

 *** I'm happy with only one master, and I also wish to partition my
 usage between read-only and read-write connections.  I want to do that,
 however, within a single Turbogears application.  Is this what you do?
 Can you provide some hints on how to do it?  Also, do you know of a way
 to pool your read-only connections to a number of slaves, thereby
 distributing the load (within either SO or SA)?

I'm not currently using any ORM, so using different SA engines for
different queries is trivial. I'm also not currently distributing
among several slaves, but if I had to I would use something like SQL
Relay rather than trying to shove load balancing into my model.

 SQL Relay seems capable of load-balancing across a number of read-only
 DBs.  And it has a drop-in replacement API for PostgreSQL.  It doesn't
 distinguish between master and slaves, however, and so can't
 automatically manage the difference between reading and writing.  Also,
 SQL Relay load-balances on a per-connection basis, which run contrary to
 Turbo Gears' persistent-connection architecture.  Which sucks.  Have you
 any experience with using SQL Relay under Turbo Gears?

The reason you load balance is so that you get better concurrency. For
serial requests one database is going to do just as well (if not
better due to cache effects) than a pool. The way TG and SQL Relay
would interact is fine, because you get different connections for each
thread in the TG pool. Concurrent queries will be sent to different
servers (at the discretion of SQL Relay of course), so load balancing
still does exactly what it's supposed to.

No, I'm not currently using SQL Relay with TurboGears. I might if I
had to scale like that, though I haven't done all of the research to
definitively say that it's the load balancing solution I'd choose.

-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

[TurboGears] Re: [FE-discuss] FormEncode i18n translation integration in TurboGears

2006-10-02 Thread Gregor Horvath

Hi,

I just commited the i18n changes to formencode to:

http://svn.formencode.org/FormEncode/branches/gettext-enabled/

I created a docs/i18n.txt file.
I also had to change some tests and added a tests/test_18n.py

I added a Validator.use_bultins_gettext to add the possibility to
disable the usage of the __builtins__ gettext function.

Also I added a api.set_stdtranslation function to enable easy switching
of the language for standalone usage.

Would be fine if someone could test this.
Any feedback is much appreciated.

I hope that I can do the patch for TurboGears tomorrow.

--
Greg, Vienna

--~--~-~--~~~---~--~~
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

2006-10-02 Thread Ian Bicking

Gregor Horvath wrote:
 Jorge Godoy schrieb:
 Ian Bicking [EMAIL PROTECTED] writes:


 I'm wondering how the releases should work.  An update to a translation 
 doesn't really warrant a new software release, and releases of 
 FormEncode are otherwise going to be uncommon.  Should the translations 
 be shipped as separate packages (e.g., formencode.lang.de)?  It's 
 potentially a lot of packages, but that might be fine.  They can be 
 released and updated on their own schedule then.  Does that sound feasible?

 If there aren't that many changes to messages -- i.e., FormEncode's code
 should change more than its messages --, then I don't see a reason for
 separating things.

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 
shouldn't want that either -- a nice stable and boring FormEncode means 
one less thing you have to worry about tracking.

So I feel pretty confident that translations will substantially increase 
the number of FormEncode releases.  Of course, if the code isn't 
changing then getting an updated FormEncode isn't really a problem 
either I suppose.  Only if people didn't want to upgrade FormEncode 
would this be a problem, and that shouldn't be a problem if I don't make 
backward-incompatible changes in FormEncode (and no such changes are 
planned).

 ACK.
 
 At the moment I don't see any differences to normal Formencode
 development. I am a big believer in KISS. So I'd prefer to keep it
 simple. All is in trunk and released together. If this turns out to be
 inappropriate because language development is more dynamic than normal
 development than we can always change this.

I do expect it to be, but maybe that's not a problem.  OTOH, making a 
release of a subpackage doesn't need to be hard either, just python 
setup.py svntag --version=whatever-next --next-version=whatever-next+1; 
cd ../formencode.lang.de-whatever-next; python setup.py register sdist 
bdist_egg upload.

-- 
Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.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] Dynamic parameters in building select lists?

2006-10-02 Thread Chris

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


--~--~-~--~~~---~--~~
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: Scalability

2006-10-02 Thread Stuart Clarke

On Mon, 2006-10-02 at 12:19 -0700, Bob Ippolito wrote:
 On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
 
  On Mon, 2006-10-02 at 10:45 -0700, Bob Ippolito wrote:
   On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
   
On Mon, 2006-10-02 at 10:04 -0700, Bob Ippolito wrote:
 On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
 
  Thanks for the reply Kevin...
 
I want to ask some questions, however, about scalability.  I'm
developing a web system (the pages of which will be customised 
on a
per-user basis), that may grow to be quite popular.  I need to
implement this, such that it's horizontally scalable in an 
indefinite
manner.
   
OK, so web server replication and load balancing is easy.  My 
problem
is with the DB.  I can find several good-looking master-slave DB
replicators (Slony for PG, for example), but I can't find a 
suitable
load-balancing mechanism, especially one that integrates with
SQLObject
or SQLAlchemy.
  
   I'm not sure what you mean here. In what way is the ORM involved 
   with
   the database replication? Do you mean from the standpoint of 
   having
   some collection of web servers talk to some specifically 
   collection
   of database servers?
 
  *** As I see it, there are two problems in using a distributed
  master-slave arrangement for the DB: replication (i.e. mirroring 
  data
  from the master to the slaves) and load balancing (i.e. balancing 
  the
  DB-read load across the slaves).
 
  Replication is handled by tools such as Slony.  What I need from 
  the ORM
  (or whatever) is a mechanism for load balancing.  I need to be able 
  to
  say: here's my master server (for writing) and here is my list of 
  slave
  servers (for reading).  Please balance the system load 
  appropriately,
  across these servers.  Or I need a hook where I can insert code of 
  my
  own to do this.
 
  I have a sneaking suspicion that it might be possible in 
  SQLAlchemy, but
  I don't think it will integrate out of the box with TG's Identity
  implementation.
 
  Plus, I would like to do it in SQLObject, so I can have Catwalk.
 
  Any suggestions?

 Why don't you do load balancing at the DB layer with pgpool or 
 something?
   
*** pgpool is limited to one master, and one slave.  It's scalability is
therefore quite limited.
   
I haven't found any general-purpose tools which can provide unlimited
(say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
anyone know of one?
  
   Well, you only want one master... at least for any of the free
   PostgreSQL replication solutions. I always partition my usage between
   read-only and read-write connections, so it's rather easy to make that
   work.
 
  *** I'm happy with only one master, and I also wish to partition my
  usage between read-only and read-write connections.  I want to do that,
  however, within a single Turbogears application.  Is this what you do?
  Can you provide some hints on how to do it?  Also, do you know of a way
  to pool your read-only connections to a number of slaves, thereby
  distributing the load (within either SO or SA)?
 
 I'm not currently using any ORM, so using different SA engines for
 different queries is trivial. I'm also not currently distributing
 among several slaves, but if I had to I would use something like SQL
 Relay rather than trying to shove load balancing into my model.
 
  SQL Relay seems capable of load-balancing across a number of read-only
  DBs.  And it has a drop-in replacement API for PostgreSQL.  It doesn't
  distinguish between master and slaves, however, and so can't
  automatically manage the difference between reading and writing.  Also,
  SQL Relay load-balances on a per-connection basis, which run contrary to
  Turbo Gears' persistent-connection architecture.  Which sucks.  Have you
  any experience with using SQL Relay under Turbo Gears?
 
 The reason you load balance is so that you get better concurrency. For
 serial requests one database is going to do just as well (if not
 better due to cache effects) than a pool. The way TG and SQL Relay
 would interact is fine, because you get different connections for each
 thread in the TG pool. Concurrent queries will be sent to different
 servers (at the discretion of SQL Relay of course), so load balancing
 still does exactly what it's supposed to.

I'm not so sure that TG and SQL Relay would play nice with each other.
AFAIK, SA and SO maintain (within the context of TG) connection pools to
the DB.  Now, these connections can be created on-demand, but the
problem is that they persist and never go away.  Say I have 10 servers
under SQL relay, and a max of 10 connections in my SA pool.  I start
using the system, and 

[TurboGears] Re: test

2006-10-02 Thread Jorge Vargas

ack

On 10/2/06, pythonwin [EMAIL PROTECTED] wrote:

 test


 


--~--~-~--~~~---~--~~
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: Scalability

2006-10-02 Thread Bob Ippolito

On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:

 On Mon, 2006-10-02 at 12:19 -0700, Bob Ippolito wrote:
  On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
  
   On Mon, 2006-10-02 at 10:45 -0700, Bob Ippolito wrote:
On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:

 On Mon, 2006-10-02 at 10:04 -0700, Bob Ippolito wrote:
  On 10/2/06, Stuart Clarke [EMAIL PROTECTED] wrote:
  
   Thanks for the reply Kevin...
  
 I want to ask some questions, however, about scalability.  I'm
 developing a web system (the pages of which will be 
 customised on a
 per-user basis), that may grow to be quite popular.  I need to
 implement this, such that it's horizontally scalable in an 
 indefinite
 manner.

 OK, so web server replication and load balancing is easy.  My 
 problem
 is with the DB.  I can find several good-looking master-slave 
 DB
 replicators (Slony for PG, for example), but I can't find a 
 suitable
 load-balancing mechanism, especially one that integrates with
 SQLObject
 or SQLAlchemy.
   
I'm not sure what you mean here. In what way is the ORM 
involved with
the database replication? Do you mean from the standpoint of 
having
some collection of web servers talk to some specifically 
collection
of database servers?
  
   *** As I see it, there are two problems in using a distributed
   master-slave arrangement for the DB: replication (i.e. mirroring 
   data
   from the master to the slaves) and load balancing (i.e. balancing 
   the
   DB-read load across the slaves).
  
   Replication is handled by tools such as Slony.  What I need from 
   the ORM
   (or whatever) is a mechanism for load balancing.  I need to be 
   able to
   say: here's my master server (for writing) and here is my list of 
   slave
   servers (for reading).  Please balance the system load 
   appropriately,
   across these servers.  Or I need a hook where I can insert code 
   of my
   own to do this.
  
   I have a sneaking suspicion that it might be possible in 
   SQLAlchemy, but
   I don't think it will integrate out of the box with TG's Identity
   implementation.
  
   Plus, I would like to do it in SQLObject, so I can have Catwalk.
  
   Any suggestions?
 
  Why don't you do load balancing at the DB layer with pgpool or 
  something?

 *** pgpool is limited to one master, and one slave.  It's scalability 
 is
 therefore quite limited.

 I haven't found any general-purpose tools which can provide unlimited
 (say, 20 slaves) scalability for either MySQL or PostgreSQL.  Does
 anyone know of one?
   
Well, you only want one master... at least for any of the free
PostgreSQL replication solutions. I always partition my usage between
read-only and read-write connections, so it's rather easy to make that
work.
  
   *** I'm happy with only one master, and I also wish to partition my
   usage between read-only and read-write connections.  I want to do that,
   however, within a single Turbogears application.  Is this what you do?
   Can you provide some hints on how to do it?  Also, do you know of a way
   to pool your read-only connections to a number of slaves, thereby
   distributing the load (within either SO or SA)?
 
  I'm not currently using any ORM, so using different SA engines for
  different queries is trivial. I'm also not currently distributing
  among several slaves, but if I had to I would use something like SQL
  Relay rather than trying to shove load balancing into my model.
 
   SQL Relay seems capable of load-balancing across a number of read-only
   DBs.  And it has a drop-in replacement API for PostgreSQL.  It doesn't
   distinguish between master and slaves, however, and so can't
   automatically manage the difference between reading and writing.  Also,
   SQL Relay load-balances on a per-connection basis, which run contrary to
   Turbo Gears' persistent-connection architecture.  Which sucks.  Have you
   any experience with using SQL Relay under Turbo Gears?
 
  The reason you load balance is so that you get better concurrency. For
  serial requests one database is going to do just as well (if not
  better due to cache effects) than a pool. The way TG and SQL Relay
  would interact is fine, because you get different connections for each
  thread in the TG pool. Concurrent queries will be sent to different
  servers (at the discretion of SQL Relay of course), so load balancing
  still does exactly what it's supposed to.

 I'm not so sure that TG and SQL Relay would play nice with each other.
 AFAIK, SA and SO maintain (within the context of TG) connection pools to
 the DB.  Now, these connections can be created 

[TurboGears] Re: Debugging Kid template issues

2006-10-02 Thread Kevin Dangoor

Hi Steve,

Christoph gave a good summary. It will be nice if Kid's error  
reporting becomes easier to work with short term, but I suspect that  
TurboGears will migrate to Genshi in the medium term. There are a  
couple of significant differences, but it's probably not too bad for  
most people to migrate their templates to Genshi. (Which gives you  
better error messages, more flexible inclusions, nicer match syntax,  
more convenient if/else construct and better performance...)

Kevin

On Oct 2, 2006, at 8:27 AM, [EMAIL PROTECTED] wrote:


 This is someting that appears to have been troublesome to others too,
 so I wondered whether there are definite plans to improve the  
 issues it
 raises. I just started to port an existing web app, the one from
 Chapter 18 of Python Web Programming, to help me learn TurboGears in
 a way that would explain it clearly to people who'd read the book.

 Unfortunately this initially (until I can start making proper use of
 Kid) required me to insert various generated chunks of HTML into Kid
 templates using the ${XML(...)} feature. Alas, when the HTML isn't
 properly-formed I get a huge traceback which ends with the information
 that there's a problem at line 1, column 41. But it doesn't show me  
 the
 XML source it's complaining about. As of this writing I have spent
 about an hour looking for an XML problem and I'm about ready to give
 up.

 Are there options I can set to improve the debug information I get
 back? If not, are their plans to improve the XML diagnostics? I append
 the actual traceback I am dealing with just as an example of its
 general uselessness.

 regards
  Steve

 Page handler: bound method Root.index of gs.controllers.Root object
 at 0x01573530
 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
 c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy 
 \_cphttptools.py,
 line 254, in main
 body = page_handler(*virtual_path, **self.params)
   File string, line 3, in index
   File
 c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears 
 \controllers.py,
 line 326, in expose
 output = database.run_with_transaction(
   File string, line 5, in run_with_transaction
   File
 c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears 
 \database.py,
 line 246, in so_rwt
 retval = func(*args, **kw)
   File string, line 5, in _expose
   File
 c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears 
 \controllers.py,
 line 343, in lambda
 mapping, fragment, args, kw)))
   File
 c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears 
 \controllers.py,
 line 380, in _execute_func
 return _process_output(output, template, format, content_type,
 mapping, fragment)
   File
 c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears 
 \controllers.py,
 line 74, in _process_output
 fragment=fragment)
   File
 c:\python24\lib\site-packages\TurboGears-1.0b1-py2.4.egg\turbogears 
 \view\base.py,
 line 131, in render
 return engine.render(**kw)
   File
 c:\python24\lib\site-packages\TurboKid-0.9.8-py2.4.egg\turbokid 
 \kidsupport.py,
 line 156, in render
 return t.serialize(encoding=self.defaultencoding, output=format,
 fragment=fragment)
   File
 c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\__init__.py,
 line 236, in serialize
 return serializer.serialize(self, encoding, fragment)
   File
 c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \serialization.py,
 line 51, in serialize
 text = list(self.generate(stream, encoding, fragment))
   File
 c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \serialization.py,
 line 329, in generate
 for ev, item in self.apply_filters(stream):
   File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \pull.py,
 line 210, in _coalesce
 for ev, item in stream:
   File
 c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\filter.py,  
 line
 21, in transform_filter
 for ev, item in apply_matches(stream, template, templates,
 apply_func):
   File
 c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid\filter.py,  
 line
 31, in apply_matches
 item = stream.expand()
   File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \pull.py,
 line 99, in expand
 for ev, item in self._iter:
   File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \pull.py,
 line 168, in _track
 for p in stream:
   File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \pull.py,
 line 210, in _coalesce
 for ev, item in stream:
   File C:\Steve\Projects\PyTeach\gs\templates\index.py, line 136, in
 _pull
   File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \pull.py,
 line 123, in strip
 for (ev, item) in self._iter:
   File c:\python24\lib\site-packages\kid-0.9.3-py2.4.egg\kid 
 \pull.py,
 line 168, in _track
 for p in stream:
   File 

[TurboGears] More Validatorness

2006-10-02 Thread Ian Wilson

Hello,
  I keep thinking I understand how this works but I never quite
understand.   I go to a method that requires an argument but don't
pass the argument for exampe accessing '/archive' in the browser with
the below code.  Shouldn't the validator catch this and in a friendly
fashion redirect me to the index method?

CONTROLLERS:

  @expose()
  @validate(validators=dict(id=validators.Int(not_empty=True)))
  @error_handler(index)
  def archive(self, id):

ERROR:

Page handler: function _wrapper at 0xb602779c
Traceback (most recent call last):
  File 
/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py,
line 105, in _run
self.main()
  File 
/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py,
line 254, in main
body = page_handler(*virtual_path, **self.params)
  File 
/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/identity/conditions.py,
line 275, in _wrapper
return fn( *args, **kw )
TypeError: archive() takes at least 2 arguments (1 given)

Thanks,
  -Ian

--~--~-~--~~~---~--~~
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: MySQL, SQLObject, and TG 1.01b problem

2006-10-02 Thread [EMAIL PROTECTED]


[EMAIL PROTECTED] wrote:
 I ran into some problems upgrading on my Windows box, so ended up
 reinstalling python, turbogears, docutils, pythonwin and MySQLDB.  Now,
 when I run any of my existing apps or even the wiki20 tutorial (which
 worked under 0.9a8), I get an error complaining about unicode
 (TypeError: Decoding Unicode is not supported).  I'm not specifically
 using unicode, but I see that someone else ran into that problem with
 0.9a9.

 http://www.mail-archive.com/turbogears@googlegroups.com/msg16825.html

 Any suggestions for what to do?  Are there people successfully using
 1.01 with MySQL and SQLObject?  Did I just miss something with my
 reinstall?  A configuration setting?

 Thanks!
 Dianne


Was there ever a resolution to this?

It was mentioned in the thread that doing a 'easy_install -U SQLObject'
would bring SO up to a newer version than 0.7.1 may fix this issue, but
whenever i try to run that command it tells me that 0.7.1 is already
the active 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] Re: Scalability and shark attacks

2006-10-02 Thread isaac

Hi,

Your question just happened to land on the same day I read this:

Fear, shark attacks, and Will it scale?:
http://tinyurl.com/mjbqy ...

Which was hilarious, humbling, and has a point (actually it's quoting  
another blog in this clip):


You are not going to become that popular, so don't sweat it. You can  
sweat it if you get that level of success... You have to be able to  
move fast enough to get to the position of popularity, unless you  
truly have a one-of-a-kind idea, for that sort of success. Seriously,  
this argument is built on the mental masturbation of 'what if I was  
Google?' But you aren't, so just stop. Quit sweating the problems  
that give you a mental stiffy, and work on the problems that are  
truly hard: ease-of-use, process, transparency, discoverability and  
the whole use experience.
 

Of course I don't know what your project is or how soon it will be  
ready, or if you already have several thousand users signed up and  
waiting to pounce on it... But if this catches you getting ahead of  
yourself as it did me, then I'm glad to have helped by passing this  
along.  ;)

--i


--~--~-~--~~~---~--~~
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] Action Flow project

2006-10-02 Thread Mark Ramm

I'm starting a project to write a ticket tracker called Action Flow.

The design of the project is based around ideas from Agile Project
Management, Getting Things Done, and Lean Manufacturing, and the goal
is to produce an easy to use task tracking tool for individuals and
groups.

Only the raw framework is there now, but that's by design.

I really want this project to be a place where people can come
together to learn TurboGears, and get their feet wet in Open Source
development.So, I want to grow the code out in the open, and
involve others as much as possible.

This checked in the basic SQLObject based version that covers the
functionality in the Linux Magazine article.   Then I'll do a
SQLAlchemy conversion over the next week.

Depending on the interest level in this, I'll likely spend as much
time documenting what we're doing and why as I do writing new code.
Again, the main goal is to make this a participative learning
experience.

Some of my ideas for how Action Flow should work are in the Linux
Magazine article, but there's more to come.

-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

--~--~-~--~~~---~--~~
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] Debugging with PyDev?

2006-10-02 Thread Nyenyec N

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.

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

Anyone out there who could make PyDev debugging work with TurboGears?

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] Error on 'print self' ( raise AttributeError, '%s (with attribute %r)' % (e, name) )

2006-10-02 Thread kerinin

I'm getting errors when i do anything with 'self' during an intercepted
call to one of the _set_ methods.  Here's my code:

BEGIN MODEL.PY
from sqlobject import *

from turbogears import identity
from turbogears.database import PackageHub

hub = PackageHub(organizer)
__connection__ = hub

class Event(SQLObject):
date_constraint =   
EnumCol(default='exact',
enumValues=['exact','earliest','latest'])

def _set_date_constraint(self,value):
self._SO_set_date_constraint(value)

self.validate()

def validate(self, recursionList = list()):
print self
return False
END MODEL.PY

BEGIN TEST_MODEL.PY
from turbogears import testutil, database

from organizer import model
from organizer.model import *

database.set_db_uri(sqlite:///:memory:)


class TestEvent(testutil.DBTest):
model = model

def test_creation(self):
e=Event()
END TEST_MODEL.PY

and here's the error message i get:

BEGIN ERROR
[EMAIL PROTECTED]:~/Projects/web/organizer$ nosetests
E
==
ERROR: test_creation (organizer.tests.test_model.TestEvent)
--
Traceback (most recent call last):
  File
/home/kerinin/Projects/web/organizer/organizer/tests/test_model.py,
line 23, in test_creation
e=Event()
  File
/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/declarative.py,
line 93, in _wrapper
return fn(self, *args, **kwargs)
  File
/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/main.py,
line 1197, in __init__
self._create(id, **kw)
  File
/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/main.py,
line 1221, in _create
self.set(**kw)
  File
/usr/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1860-py2.4.egg/sqlobject/main.py,
line 1099, in set
raise AttributeError, '%s (with attribute %r)' % (e, name)
AttributeError: 'Event' object has no attribute 'id' (with attribute
'date_constraint')

--
Ran 1 test in 1.029s

FAILED (errors=1)

END ERROR

this is truly baffling to me.  I've tried installing SQLite version 3,
but it doesn't fix it (although i'm not sure how to check which version
of SQLite SQLObject is using)

If anyone can duplicate this, or has any idea what might be causing it,
please let me know

Thanks, as always


--~--~-~--~~~---~--~~
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

2006-10-02 Thread Gregor Horvath

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!

Basically you have to do (untestted):

svn co http://svn.formencode.org/FormEncode/branches/gettext-enabled/
cd gettext-enabled/formencode/i18n
mkdir lang/LC_MESSAGES
cp FormEncode.pot lang/LC_MESSAGES/FormEncode.po
emacs lang/LC_MESSAGES/FormEncode.po # or whatever editor you prefer
#make the translation
msgfmt.py lang/LC_MESSAGES/FormEncode.po

TEST

send the PO and MO files to: [EMAIL PROTECTED]

DONE

see also http://docs.python.org/lib/node738.html

Optionally you can also add a test of your language to tests/test_i18n.py:

ne = formencode.validators.NotEmpty()

[...]

def _test_lang(language, notemptytext):

  formencode.api.set_stdtranslation(languages=[language])

  try:
ne.to_python()
  except formencode.api.Invalid, e:
assert str(e) == notemptytext

  formencode.api.set_stdtranslation() #set back to defaults


def test_de():
  _test_lang(de, uBitte einen Wert eingeben)


add:

def test_lang():
  _test_lang(lang, utranslation of Not Empty Text in the language
lang)


--
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] install problems mac os x power pc

2006-10-02 Thread Michael Steinfeld

please help?

I have followed the directions precisely and neither way works.

here is the error... using sudo python tgsetup.py

Installed 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg
Processing dependencies for TurboGears
Searching for RuleDispatch
Reading http://www.python.org/pypi/RuleDispatch/
Couldn't retrieve index page for 'RuleDispatch'
Scanning index of all packages (this may take a while)
Reading http://www.python.org/pypi/
Best match: RuleDispatch 0.5a0.dev-r2115
Downloading http://files.turbogears.org/eggs/RuleDispatch-0.5a0.dev-r2115.tar.gz
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

here is the error trying to use easy_install

Searching for TurboGears
Best match: TurboGears 1.0b1
Processing TurboGears-1.0b1-py2.4.egg
TurboGears 1.0b1 is already the active version in easy-install.pth
Installing tg-admin script to /usr/local/bin

Using 
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg
Processing dependencies for TurboGears
Searching for RuleDispatch
Reading http://www.python.org/pypi/RuleDispatch/
Couldn't find index page for 'RuleDispatch' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://www.python.org/pypi/
No local packages or download links found for RuleDispatch
error: Could not find suitable distribution for
Requirement.parse('RuleDispatch')

I have the TG DVD but iit has an older version and recommends to
follow the install instructions

thanks in advance

-- 
-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: Whatwhat problems on DreamHost

2006-10-02 Thread Bob T.

Jonathan LaCour wrote:
 Bob: give this a shot on DreamHost, and let me know how it goes for
 you!

Still not quite there yet... the WSGI issues are history, but I still
can't connect with a browser. It could easily be that I don't have
Apache configured correctly, since DreamHost only lets you modify the
.htaccess file rather than the Apache configuration files.

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
-~--~~~~--~~--~--~---



[TurboGears] Re: Debugging Kid template issues

2006-10-02 Thread Steve Holden

Christoph Zwerschke wrote:
 [EMAIL PROTECTED] wrote:
 
Unfortunately this initially (until I can start making proper use of
Kid) required me to insert various generated chunks of HTML into Kid
templates using the ${XML(...)} feature. Alas, when the HTML isn't
properly-formed I get a huge traceback which ends with the information
that there's a problem at line 1, column 41. But it doesn't show me the
XML source it's complaining about. As of this writing I have spent
about an hour looking for an XML problem and I'm about ready to give
up.
 
 
 This is a problem caused by Kid's way of operating by compiling XML to
 Python and then using pull streams. Two things could be done:
 
 First, in many cases, Kid should supplement the usual traceback with an
 output of the data or Python expression it was processing when the error
 occurred. This was already implemented for py:attrs expressions, for
 instance. Maybe I can do something similar for the XML() feature. Can
 you send me a small example template where you get such a meaningless
 message with XML()? I'll try to improve this and get it in Kid 0.9.4
 which I think should appear soon.
 
Unfortunately it wouldn't be that easy, as the code is, as I mentioned, 
an existing application with bits of the content generated all over the 
place. I'd be happy to send you the whole thing, but it's currently a mess.

Your awareness of the problem is sufficient - I'm currently back using 
the original HTML generation methods for the moment.

 Second, in the long run, we will also need to implement some way of
 preserving the context. Some suggestions have been made, e.g. here:
 http://www.kid-templating.org/trac/ticket/95
 This should be best discussed on the Kid mailing list:
 https://lists.sourceforge.net/lists/listinfo/kid-template-discuss
 
Right. I searched the group, but didn't look at the Trac instance.

 Also, please note that there Genshi now (http://genshi.edgewall.org)
 that may supersede Kid in the long run, because it uses a different
 approach that allows for much better error messages.
 
 Anyway, I think there is still a lot of potential for Kid to be improved
 and I would like to see Kid alive for quite a while, since it is still
 very useful and elegant.

Right. Please don't regard this as a complaint: it was just feedback 
(albeit duplicating other users' concerns). We've had similar problems 
with the system that generates www.python.org, and those are by no means 
fully solved yet. Parser error message generation is still a difficult 
problem fifty years on :-)

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: Bug: omitted 'import cherrypy' in quickstarted controllers.py

2006-10-02 Thread gasolin

dvska:

Sorry, it's my fault!
Since I'd like to eliminate some unnecessary modules that initial
import,
I neglect to consider the requirement of identity part :P

It has been fixed in [1938]
http://trac.turbogears.org/turbogears/changeset/1938

Thanks!

--
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
-~--~~~~--~~--~--~---