[Twisted-web] Re: Athena Forms Thing [was: lightweight forms thing for use with athena ???]

Paul Reznicek maillists at ivsn.com
Mon Dec 5 01:24:51 MST 2005


Doug Winter wrote:
> ...
> Dialtone is right to suggest using mg's form library ...
> 

Nice, and Doug convinced me to try Matt's "forms", especially because
each input block (i.e. including it's label and required message)
has it's own id and very sophisticated class combination, so it is
predestined to go alive with athena ...

When you get the current version from:
    svn://pollenation.net/forms/trunk
and can not start the
    twistd -noy examples.tac
try attached patch of forms/examples/main.py, it helped me ...

Paul

(P.S.: Sorry, Doug, I sent to wrong address before ...)

-------------- next part --------------
Index: examples/main.py 
=================================================================== 
--- examples/main.py	(Revision 140) 
+++ examples/main.py	(Arbeitskopie) 
@@ -1,4 +1,7 @@ 
-import pkg_resources 
+try: 
+    from pkg_resources import resource_filename 
+except ImportError: 
+    from nevow.util import resource_filename 
 from twisted.python import reflect 
 from nevow import appserver, loaders, rend, static, tags as T, url 
 import forms 
@@ -98,6 +101,6 @@ 
  
  
 # Add child_ attributes 
-examples_css = pkg_resources.resource_filename('forms.examples', 'examples.css') 
+examples_css = resource_filename('forms.examples', 'examples.css') 
 setattr(RootPage, 'child_examples.css', static.File(examples_css)) 
 setattr(RootPage, 'child_forms.css', forms.defaultCSS) 



More information about the Twisted-web mailing list