[Catalyst] How to use HTML::Widget::Constraint::Date
Hi, I was wondering if someone would kindly show me an example on how to use this. I searched the list archives and could not find any references to this. Say I have two date fields from a form how do I create the constraints? I tried this: $w-constraint(Date = qw/ fecha_nacimiento fecha_muerte/) -message('Formato -MM-DD'); But it obviously does not work becaus the doc says this: HTML::Widget::Constraint::Date my $c = $widget-constraint( 'Date', 'year', 'month', 'day' ); There are no examples with dates in the tutorial nor the HTML::Widget docs, and the above left me a bit confused :-] Thanks beforehand, Alejandro Imass ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Where did the tutorials go?
perldoc Catalyst::Manual::Tutorial perldoc Catalyst::Manual::Tutorial::Intro perldoc Catalyst::Manual::Tutorial::CatalystBasics and so forth... all names are exact without spaces except for Introduction that is abreviated to Intro as shown above On 11/9/06, Kieren Diment [EMAIL PROTECTED] wrote: http://search.cpan.org/search?m=moduleq=catalyst%3A%3Amanual%3A%3Atutorial On 09/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I finally got through the problems I was having with the MyApp tutorial, but now it seems to be missing from CPAN. Anyone know what happened to them and where they are? Thanks, Conan. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] HTML::Widget and Unicode
Hi, HTML::Widget is translating my UTF-8 characters into presumably ISO LATIN-1. Can I stop HTML::Widget from doing this? I looked into enctype but I don't think is for that, and if it is could someone kindly offer an example? if so (supposing that enctyle is the answer) what happens to filenames that use Unicode characters in an upload field? Thanks, Alejandro Imass ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] How to use HTML::Widget::Constraint::Date
Hello! my $c = $widget-constraint( 'Date', 'year', 'month', 'day' ); This constraint requirtes you to have three fields: one with day, one with month, one with years. This a common thing, as in many cases there are three select boxes which allow the user to select a date. Others (including me) use a single text field maybe with some help such as JSCalendar. In this case you might be better off defining a filter which creates a DateTime and then work with that. This is also handy if you need to store the data in a database, as you can define an inflater for DateTime objects. Michele. -- Michele Beltrame http://www.varlogarthas.net/ ICQ# 76660101 Informativa privacy: http://www.italpro.net/em.html ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] HTML::Widget and Unicode
On 26/11/06, Alejandro Imass [EMAIL PROTECTED] wrote: Hi, HTML::Widget is translating my UTF-8 characters into presumably ISO LATIN-1. Can I stop HTML::Widget from doing this? I looked into enctype but I don't think is for that, and if it is could someone kindly offer an example? if so (supposing that enctyle is the answer) what happens to filenames that use Unicode characters in an upload field? Can you give an example of what's actually happening and when? If you're talking about the output of $result-as_xml, the characters are being HTML-encoded. Upgrade to the latest cpan release of HTML::Element to fix it. If that's not the problem, can you post more details to the HTML::Widget mailing list: http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget Cheers, Carl ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] RFC: file/path writing sub-class of Catalyst::Plugin::Static::Simple
I'm probably about to write a sub-class of Catalyst::Plugin::Static::Simple which writes the file to disk on the first request. The reason is I like to have all my extra static files (images, media, css, etc) in the same bundle as the application but I also want to let Apache serve them, obviously. So I can either try to keep a tree sync'd between my app path and my webserver path or do this so the authoritative versions in the app path are written to disk on first request. (Semi-)Permanent cache. Do you think this is something useful enough to also put on the CPAN? Other feedback? Name? Catalyst::Plugin::Static::DiskWrite? The idea is not to be able to check for freshness or other cache-like behavior but to write it if it's not there and leave it at that. Used with things like: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) /index.fcgi/$1 [QSA,L] Thanks! –Ashley -- ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] RFC: file/path writing sub-class of Catalyst::Plugin::Static::Simple
apv wrote: I'm probably about to write a sub-class of Catalyst::Plugin::Static::Simple which writes the file to disk on the first request. The reason is I like to have all my extra static files (images, media, css, etc) in the same bundle as the application but I also want to let Apache serve them, obviously. So I can either try to keep a tree sync'd between my app path and my webserver path or do this so the authoritative versions in the app path are written to disk on first request. (Semi-)Permanent cache. Do you think this is something useful enough to also put on the CPAN? Other feedback? Name? Catalyst::Plugin::Static::DiskWrite? The idea is not to be able to check for freshness or other cache-like behavior but to write it if it's not there and leave it at that. Used with things like: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) /index.fcgi/$1 [QSA,L] Can you not just do: Alias /static /path/to/my/app/static In your Apache (or whatever) config? ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] RFC: file/path writing sub-class of Catalyst::Plugin::Static::Simple
On Nov 26, 2006, at 2:01 PM, Ash Berlin wrote: apv wrote: I'm probably about to write a sub-class of Catalyst::Plugin::Static::Simple which writes the file to disk on the first request. The reason is I like to have all my extra static files (images, media, css, etc) in the same bundle as the application but I also want to let Apache serve them, obviously. So I can either try to keep a tree sync'd between my app path and my webserver path or do this so the authoritative versions in the app path are written to disk on first request. (Semi-)Permanent cache. Do you think this is something useful enough to also put on the CPAN? Other feedback? Name? Catalyst::Plugin::Static::DiskWrite? The idea is not to be able to check for freshness or other cache-like behavior but to write it if it's not there and leave it at that. Used with things like: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) /index.fcgi/$1 [QSA,L] Can you not just do: Alias /static /path/to/my/app/static In your Apache (or whatever) config? Hm… I could but I'm not smart/awake enough to think to try it first. Sigh! I realize now that when I was doing this idea previously (manually from and end) it was using templates so the content was dynamic but rarely changing. I'll rethink the whole thing. Thanks, man. -Ashley ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Epiphany Sunday: chained action vs namespaces
I just thought I'd share an epiphany in case any other lunkheads were under the same misconception I was. I had been avoiding chained actions for months b/c I was under the impression they were synonymous with code namespaces. Today, I realized they aren't. So, I was doing things like: /post/[id] /admin/post/[id] With plenty of duplicated code between them because I thought the admin paths had to be under Admin::auto to do blanket security stuff and I didn't want to seed security checks everywhere b/c I know I'd miss something. I realize now I can do /post/[id] /post/[id]/edit /post/[id]/private_notes # whatever And put the edit code into Admin::Post::edit and just chain it back to the public Post view. Like built-in information architecture. Thanks again to all the Cat developers. SO NICE. –Ashley -- ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] RFC: file/path writing sub-class of Catalyst::Plugin::Static::Simple
[snipped prior correspondence] I'm not sure, because systems architecture is really not my thing, but this sounds like something you might describe as Catalyst::Plugin::Cache::Static - which would render a template into a variable and serve off an appropriate path for the webserver to deal with. Kind of like PageCache, but designed to totally bypass catalyst for read-only docs. For my thinking the logic might go soemthig like this: low trafic dynamic web applicaiton at http://localhost:3000 (or anywhere else you can deploy to) which creates pages (I guess you'd have to modify the login and edit links if they existed for the staitc version with some template conditionals) and saves them off to /var/www/myapp/path_to/wherever/index.html every time there's an update. Is this the kind of thing you had in mind? ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/