John_Nowlan wrote:
> I've patched up my windows box and am trying the tutorial but run into
> the same problem as mentioned in the previous msg, i.e.
>  
> I reach this stage in the tutorial:
> http://wiki.pylonshq.com/display/toscawidgets/Using+twForms+with+Pylons.
> +Part+1#try-it-out
>  
> and I can't make validation fail, no matter what I do I get a respons
> of:
> 'You must POST to this method, dummy!'

This is strange... by looking at the rendered HTML, is the action
"/tutorial/save" and the method "POST"? Are you sure you decorated the
"save" method with validate()? Are you sure that you're importing the
validate() decorator from toscawidgets?

At the top for your controller module you should have:

"from toscawidgets.mods.pylonshf import validate" *after* from
twtutorial.lib.base import * (actually, I'm pretty sure now that this is
the problem...)

> Is it trying to tell me something? :\

I don't think so :)
>  
> Could complete files for the tutorial be posted so I can compare and see
> where I'm being a dummy?

Good idea, after all... I did write the tutorial myself before writing
it :) I've attached it at the howto in Pylons' wiki (too fast I believe
since I was planning to move the JS stuff to part2... anyway)

> Or put the complete source in the code 'windows' each time.

I'll take note of this
> 
> ================================= 
> Here are a few other misc. notes:
> - I upgraded python to 2.5 and had to copy a few 2.4 dependencies over:
> ./ruledispatch-0.5a0.dev_r2247-py2.4-win32.egg
> ./pyprotocols-1.0a0dev_r2082-py2.4-win32.egg

Hmm, these shouldn't be neded in 2.5. They're compiled eggs (the win32
at the path) for 2.4 and I don't think they would even link properly in 2.5.

> 
> I think this has been mentioned already but myghty is still a
> dependency,
> when I didn't have it installed, I got:
> Starting subprocess with file monitor
> 14:14:35,075 WARNI [toscawidgets.view] Failed to load 'pylonsmyghty'
> template engine: Myghty>=1.1
> Installing myghty removed that msg.

This is a warning, ignore it for now. I need to make some changes to
make it go away (I explain in another recent thread the reason for this)
> 
> - the line post_form = PostForm("post_form") is missing from the 2nd
> code window of widgets.py
> 
> - in FireFox the line 
> ${post_form(action=h.url_for(controller='tutorial', action='save'))}
> below
> http://wiki.pylonshq.com/display/toscawidgets/Using+twForms+with+Pylons.
> +Part+1#edit-the-template


BTW, I think we should now move this conversation to the comments in
Pylons wiki so others can benefit from it in the future.

Thanks for the feedback!

Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to