Matt Feifarek wrote:
> We've released an alpha of FormKit, our form processing and generation
> library for python, with extensive webkit support.
>
> Further info in the Google group:
> http://groups-beta.google.com/group/FormKit4Python
Have you guys thought about using FormEncode's validation instead of the
older API from FunFormKit? It includes things like passing around
custom state (so you can call back into the servlet from a validator),
better customization of error messages, bidirectionality of converters,
and common overrides on all validators (if_invalid, if_empty,
not_empty). It also has a bunch of extra validators.
--
Ian Bicking / ianb@... / http://blog.ianbicking.org

On Sat, 26 Feb 2005 18:28:31 -0500, lloyd wrote:
>=A0middlekit's postgresql code generation appears to presume a
>=A0separate database for each project/model. =A0is it possible to use a
>=A0table prefix to distinguish models instead of a separate database?
>
>=A0eg instead of a "fooproj" database with "item" and "item_type"
>=A0tables, i'd prefer to put all the project tables in an existing
>=A0company-wide database, and name the tables "foo_item and
>=A0foo_item_type".
There's nothing in MiddleKit for doing that. You'd have to enhance it. Here=
some hints that may help: There *is* a 'Database' setting so I believe you=
could put that in your Settings.config of each model. To get the prefix,=
you'd probably have to invent another setting and enhance Klass'=
sqlTableName() method (in SQLGenerator.py I think).
But I've always put each project in its own db and each WebKit app in its=
own process. Doing so has allowed me to manage things in a modular fashion=
and I've been very happy with that.
-Chuck

middlekit's postgresql code generation appears to presume a separate
database for each project/model. is it possible to use a table prefix
to distinguish models instead of a separate database?
eg instead of a "fooproj" database with "item" and "item_type" tables,
i'd prefer to put all the project tables in an existing company-wide
database, and name the tables "foo_item and foo_item_type".

Hancock, David (DHANCOCK) wrote:
> We have been using WebKit + Cheetah for some pages, and WebKit +
> FunFormKit for some other pages, and we're now looking for something a
> little more JSP-like, where we can encapsulate logic in a few custom
> tags and make the page templates HTML. PSP (as implemented in Webware)
> seems close, but doesn't (so far as I can tell) have the notion of a
> custom tag or an attribute for a regular tag that can "hide" the logic
> behind it.
>
> At the same time, we've been using Roundup for issue tracking, and are
> getting somewhat comfortable with its TAL syntax.
>
> Has anyone successfully used TAL in WebKit servlets? If so, feel like
> sharing a "recipe" for it?
We use ZPT for all our Webware development, since it offered us at least
one common technology while we move from Zope. I have a Kit put
together (based on Component) for this, but it's not open source at the
moment. I expect it will be... I'll give another shout out to the
management about it.
--
Ian Bicking / ianb@... / http://blog.ianbicking.org

Hmm. I sent this yesterday and received it yesterday, but got it again
this morning. Thank you, SourceForge. I'm still interested in hearing
of people's experiences with WebKit + TAL, but I won't annoy the list
with this question again. Thanks.
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=20
We have been using WebKit + Cheetah for some pages, and WebKit +
FunFormKit for some other pages, and we're now looking for something a
little more JSP-like, where we can encapsulate logic in a few custom
tags and make the page templates HTML. PSP (as implemented in Webware)
seems close, but doesn't (so far as I can tell) have the notion of a
custom tag or an attribute for a regular tag that can "hide" the logic
behind it.
At the same time, we've been using Roundup for issue tracking, and are
getting somewhat comfortable with its TAL syntax.
Has anyone successfully used TAL in WebKit servlets? If so, feel like
sharing a "recipe" for it?=20
Thanks, and=20
Cheers!=20
--=20
David Hancock | dhancock@... | 410-266-4384=20

Hi..
The kid author is going to make kid more compatible with cheetah. I
like the tal syntax but I love the cheetah way to develop (i use
inheitance approach and compilation of templates on servlets,
inheritance from a servlet, etc), the kid is going to a similar way (I
think).
seeya
On Fri, 25 Feb 2005 10:50:00 -0500, Geoffrey Talvola
<gtalvola@...> wrote:
>
> Not exactly what you asked, but Webware in CVS has a "KidKit" which
> integrates Kid templates with Webware. I haven't used it, but I have looked
> at the Kid documentation and I thought it was similar to, but cleaner than,
> TAL. It might be something you want to look into...
>
> If you really want TAL, you could probably modify KidKit to make it work
> with TAL instead.
>
> - Geoff
>
>
> -----Original Message-----
> From: Hancock, David (DHANCOCK) [mailto:DHANCOCK@...]
> Sent: Thursday, February 24, 2005 9:43 AM
> To: webware-discuss@...
> Subject: [Webware-discuss] Recipes for using TAL with WebKit
>
>
>
> We have been using WebKit + Cheetah for some pages, and WebKit + FunFormKit
> for some other pages, and we're now looking for something a little more
> JSP-like, where we can encapsulate logic in a few custom tags and make the
> page templates HTML. PSP (as implemented in Webware) seems close, but
> doesn't (so far as I can tell) have the notion of a custom tag or an
> attribute for a regular tag that can "hide" the logic behind it.
>
> At the same time, we've been using Roundup for issue tracking, and are
> getting somewhat comfortable with its TAL syntax.
>
> Has anyone successfully used TAL in WebKit servlets? If so, feel like
> sharing a "recipe" for it?
>
> Thanks, and
> Cheers!
> --
> David Hancock | dhancock@... | 410-266-4384
--
Michel Thadeu Sabchuk
Curitiba - Brasil

Not exactly what you asked, but Webware in CVS has a "KidKit" which
integrates Kid templates with Webware. I haven't used it, but I have looked
at the Kid documentation and I thought it was similar to, but cleaner than,
TAL. It might be something you want to look into...
If you really want TAL, you could probably modify KidKit to make it work
with TAL instead.
- Geoff
-----Original Message-----
From: Hancock, David (DHANCOCK) [mailto:DHANCOCK@...]
Sent: Thursday, February 24, 2005 9:43 AM
To: webware-discuss@...
Subject: [Webware-discuss] Recipes for using TAL with WebKit
We have been using WebKit + Cheetah for some pages, and WebKit + FunFormKit
for some other pages, and we're now looking for something a little more
JSP-like, where we can encapsulate logic in a few custom tags and make the
page templates HTML. PSP (as implemented in Webware) seems close, but
doesn't (so far as I can tell) have the notion of a custom tag or an
attribute for a regular tag that can "hide" the logic behind it.
At the same time, we've been using Roundup for issue tracking, and are
getting somewhat comfortable with its TAL syntax.
Has anyone successfully used TAL in WebKit servlets? If so, feel like
sharing a "recipe" for it?
Thanks, and
Cheers!
--
David Hancock | dhancock@... | 410-266-4384

It might be worth your time to make sure you don't have an ipv6
localhost interface running, and/or also check that you don't have a
"localhost" entry for the "::1" address. I've run into localhost
problems similar to what you are describing when localhost was
pointing to a nonexistant ipv6-localhost address.
I'm not sure what the xmlrpcservlet would be doing different, but it's
a quick check to make.
-Jacob
On Thu, 24 Feb 2005 10:54:00 -0700, jose@...
<jose@...> wrote:
> Ok I've got an update, and again I really don't understand why this
> should be the case but it almost renders my last question mute.
> Apparently the time lag is only only really seen if I test on the same
> computer which is running the xmlrpc server. If I run the server on
> one computer and test on an other no significant time lag. Like I said
> I really don't understand why that should be the case, but I guess as
> long as it works.
>
> Jose
>

i've run into problems with apache/php/mysql where mysqld's
max_connections is less than the number of httpd processes are
running, because php's pconnect will create a persistent connection
per process.
my understanding of the pg library you are using is it will setup a
number of connections up front and then use them in parallel to
service the cursors your app opens. i don't think you will run into
the same problem as long as you are using a connection pool.
On Thu, 24 Feb 2005 14:10:20 -0700, jose@...
<jose@...> wrote:
> I've thought if that as well. I am pretty new to using postgres as my
> main database, most of my experience has been with mysql, and at least
> with mysql I would run into problems if I didn't explicitly close the
> connection, leaving it open would eventually crash the server. So I
> guess what I need to know, is this less of an issue with postgres?
> Jose

I can certainly put this into MultiSelectField;
What should be the default behavior?
1. Do not coerce single values into lists (pass the string)
2. Coerce single values (strings) into lists of one string
I guess that I vote for 2. Any code out there that has been written to
coerce after-the-fact should be fine; it will simply see that it's
already a list and let it go.

On Thu, 24 Feb 2005 12:02:07 -0800, Ben Parker wrote:
>=A0In order for cgi.FieldStorage to convert a single request value to
>=A0a list it would have to know what control was used to display the
>=A0field. Isn't this really a "feature" of the HTTP spec? There's
>=A0nothing in a POST or a GET to describe what type of control was
>=A0used in the form. If the multiselect has one option selected, then
>=A0one "field=3Dvalue" combination is sent by the browser, and if it has
>=A0multiple options selected, then multiple "field=3Dvalue" pairs are
>=A0sent (e.g. "mycolors=3Dgreen&mycolors=3Dblue&mycolors=3Dorange").
Yeah, I agree. This is ultimately a deficiency (among many) of HTTP=
forms/cgi.
-Chuck

> -----Original Message-----
> From: webware-discuss-admin@...
> [mailto:webware-discuss-admin@...]On Behalf Of Chuck
> Esterbrook
>
> On Thu, 24 Feb 2005 13:11:12 -0500, Matt Feifarek wrote:
> > Hi Steve.
> >
> > We remembered why we did this: it's Webkit's fault. Or perhaps it
> > is the fault of cgi.FieldStorage.
> >
> > Even if you take FormKit out of the equation, a multiple-select
> > <input> tag works this way. We can certainly "fix" this via
> > FormKit, but we thought it bad to change the behavior of the way
> > webkit handles submitted posts.
> >
> > But we agree with you; it SHOULD be consistent. It should ALWAYS be
> > a list
> >
> > Thoughts, anyone? Should we fix this 'bug' or keep it consistent
> > with WK?
>
> I'm not familiar with your FormKit, but couldn't you provide a
> setting to control the behavior? You'd have to pick a default
> behavior, but people could have it either way via the setting.
>
> And btw this does ultimately come from cgi.FieldStorage. I always
> thought it was weird, but I also thought that making a list out
> of everything was weird, too.
>
> -Chuck
>
In order for cgi.FieldStorage to convert a single request value to a list it
would have to know what control was used to display the field. Isn't this
really a "feature" of the HTTP spec? There's nothing in a POST or a GET to
describe what type of control was used in the form. If the multiselect has
one option selected, then one "field=value" combination is sent by the
browser, and if it has multiple options selected, then multiple
"field=value" pairs are sent (e.g.
"mycolors=green&mycolors=blue&mycolors=orange").
The cgi module would need to communicate with the app, while parsing the
request, to obtain the knowledge about the control used in the form, or else
the HTTP spec could be enhanced to support more information (like a naming
convention for fields ugh, but the first example I could think of).
Otherwise the cgi module can't know that "mycolors" came from a multiselect
(or series of checkboxes, etc) and should be a list even if only one value
is provided in the request for that field.
Sounds like the type-unification function is a job for FormKit - sadly, I
don't use FormKit so I can't speak about it's architecture :( -, or the app
itself can handle it with a simple utility function to coerce a single
request value into a list if it's expected to be a list.
Peace - Ben

On Thu, 24 Feb 2005 13:11:12 -0500, Matt Feifarek wrote:
>=A0Hi Steve.
>
>=A0We remembered why we did this: it's Webkit's fault. Or perhaps it
>=A0is the fault of cgi.FieldStorage.
>
>=A0Even if you take FormKit out of the equation, a multiple-select
>=A0<input>=A0tag works this way. We can certainly "fix" this via
>=A0FormKit, but we thought it bad to change the behavior of the way
>=A0webkit handles submitted posts.
>
>=A0But we agree with you; it SHOULD be consistent. It should ALWAYS be
>=A0a list
>
>=A0Thoughts, anyone? Should we fix this 'bug' or keep it consistent
>=A0with WK?
I'm not familiar with your FormKit, but couldn't you provide a setting to=
control the behavior? You'd have to pick a default behavior, but people=
could have it either way via the setting.
And btw this does ultimately come from cgi.FieldStorage. I always thought it=
was weird, but I also thought that making a list out of everything was=
weird, too.
-Chuck

Hi Steve.
We remembered why we did this: it's Webkit's fault. Or perhaps it is
the fault of cgi.FieldStorage.
Even if you take FormKit out of the equation, a multiple-select
<input> tag works this way. We can certainly "fix" this via FormKit,
but we thought it bad to change the behavior of the way webkit handles
submitted posts.
But we agree with you; it SHOULD be consistent. It should ALWAYS be a list
Thoughts, anyone? Should we fix this 'bug' or keep it consistent with WK?
> > On Wed, 23 Feb 2005 14:13:58 -0500, Steve M <sjmaster@...> wrote:
> > > But if one option was selected, f.value() is type string and is equal to
> > > whatever was selected, whereas if more than one option was selected,
> > > f.value() is type list, with members being strings for the options
> > > selected.

We have been using WebKit + Cheetah for some pages, and WebKit +
FunFormKit for some other pages, and we're now looking for something a
little more JSP-like, where we can encapsulate logic in a few custom
tags and make the page templates HTML. PSP (as implemented in Webware)
seems close, but doesn't (so far as I can tell) have the notion of a
custom tag or an attribute for a regular tag that can "hide" the logic
behind it.
At the same time, we've been using Roundup for issue tracking, and are
getting somewhat comfortable with its TAL syntax.
Has anyone successfully used TAL in WebKit servlets? If so, feel like
sharing a "recipe" for it?
Thanks, and
Cheers!
--
David Hancock | dhancock@... | 410-266-4384=20

I moved the WSGIKit repository to
http://svn.webwareforpython.org/trunk/WSGIKit -- and since it looks
like the main Webware trunk will also be moving to this repository,
this should keep everything consolidated nicely.
If anyone is interested in access, email webware-devel@...
BTW, the access file is in /etc/apache2/dav_svn.passwd -- it's an
Apache htpasswd file.
The svn://w4py.org access method continues to work and points to the
same repository, but has a separate user file. It would be best if
people use the http://svn.w4py.org interface to the repository in the
future.
--
Ian Bicking | ianb@... | http://blog.ianbicking.org