Wednesday, 2008-11-05

*** jvloothuis has joined #pylons00:01
matt_goodno, I'm looking around for ideas for work00:02
matt_goodI'll take another look at TW00:03
benbangertit no longer uses Peak, RuleDispatch, and all that nuttiness00:03
matt_goodah00:03
benbangertand it has some spiffy WSGI middleware you slot in that handles throwing in dependencies and such00:04
*** sector119 has joined #pylons00:04
matt_goodit's using formencode though, right?00:04
benbangertfor validation, yea00:04
matt_goodany idea if I can keep my forms separate from the schema?00:05
benbangertI think so00:05
benbangerthttp://toscawidgets.org/documentation/tw.forms/ has a few pylons tutorials00:05
benbangerthttp://toscawidgets.org/documentation/tw.forms/tutorials/pylons_one.html#using-the-form-to-validate-input00:06
benbangertthey seem to get validators attached00:06
benbangertyou could make a mixin class that lets you keep formencode schemas separately rather easily I'd imagine00:06
benbangertsince they just get added to the widgets00:06
matt_goodok, I'll poke at it a bit tomorrow00:09
graultI'm pretty interested in this stuff since my project has many areas that would be very amenable to data-driven form generation (and I'm already home-cooking some of my own).00:09
grault...but something is making me reinvent from scratch at this point, I think just for the learning process.  It will be very interesting to see if what I come up with looks like FormEncode + custom mako call tags etc.00:10
grault(maintaining benign ignorance of their source at this point)00:11
*** habes has joined #pylons00:11
matt_goodthough, I have a feeling TW might be a bit "weird" to go over with everyone else, especially since it's not really familiar territory for designers00:12
matt_goodthough I can try it out w/ my stuff to see how it goes00:13
*** sector119 has quit IRC00:13
*** sector119 has joined #pylons00:14
*** mthalmei has quit IRC00:15
*** matt_good has quit IRC00:15
*** benbangert has quit IRC00:23
*** zipito has joined #pylons00:25
*** zipito has quit IRC00:27
*** habes has quit IRC00:33
*** mvt has joined #pylons00:37
mvtso anyone here experience with wtforms, better then formencode?00:55
*** atomekk has quit IRC00:58
*** frostschutz has joined #pylons00:59
*** hipertracker has joined #pylons01:09
sector119mvt: u mean tw.forms?01:16
sector119they use formencode for validation01:17
*** iElectric has quit IRC01:17
*** masted_ has joined #pylons01:18
mvtno wtforms hehe01:18
mvthttp://wtforms.simplecodes.com/01:18
mvtnew01:18
*** rhymes has joined #pylons01:19
mvtseems like a simpler version of formencode with auto generating field widgets (which seems to offer most of the functionality of my own lib)01:19
*** masted__ has quit IRC01:20
*** milez has joined #pylons01:23
*** milez_ has quit IRC01:23
*** boozkachu has quit IRC01:23
*** boozkachu has joined #pylons01:24
*** habes has joined #pylons01:25
*** habes has joined #pylons01:26
*** atomekk has joined #pylons01:31
*** arcore has quit IRC01:44
*** zmijunkie has joined #pylons01:45
*** zmijunkie has left #pylons01:46
*** boozkachu has quit IRC01:49
*** boozkachu has joined #pylons01:49
mvtanyone here using unittest with pylons 0.9.7 ?01:54
*** zepolen has joined #pylons01:57
mvtzepolen: hi, are you using unittesting with pylons 0.9.7?01:59
mvt;p01:59
zepolenno01:59
mvtseems broken or i'm doing something really wrong01:59
*** BenO has joined #pylons02:01
*** vpol has joined #pylons02:12
*** Ergo^ has joined #pylons02:13
*** zipito has joined #pylons02:22
*** boozkachu has quit IRC02:23
*** hede has joined #pylons02:24
*** hede has quit IRC02:24
*** habes_ has joined #pylons02:26
*** habes has quit IRC02:27
*** pjenvey_ has quit IRC02:28
*** ktec has joined #pylons02:32
*** gasolin_ has quit IRC02:41
*** cdent has joined #pylons02:51
zepolenmvt: i gave up unit testing webapps02:52
ltowhat's this unittesting you're talking about?02:56
bob_fSome new hippie movement.02:56
*** arcore has joined #pylons03:00
*** hipertracker has quit IRC03:01
mvtunittesting takes some work, but at this point i'm dissapointed that i didn't do it for a project03:13
*** fairwinds has joined #pylons03:28
bob_fUnit tests are a gazillion times easier to write as you write the code.03:32
*** blaflamme has quit IRC03:41
*** blaflamme has joined #pylons03:41
zepolenunit testing is good, but not for webapps03:42
zepolenyou cant just check if a response is returned03:43
SignumI think there's a macro-style plugin for firefox that records what you do and what to expect. Seems to be less painful to test an application that way.03:45
*** AlexCONRAD has quit IRC03:46
zepolenone problem is a logged in user vs non logged in03:46
zepolenlet along query variables, post forms etc.03:47
Signumyou could try to simulate the login process.03:47
zepolenSignum: you can get around it sure, but one tiny valid change in your app, might break the testing code03:48
zepolenin the wrong way03:48
zepoleni prefer doing the tests on individual functions that have deterministic input/output03:49
zepolenand then doing a full sweep on the actions just to check if a response is returned03:49
zepoleneven then, problems arise, which is why email errors are so useful :)03:49
*** AlexCONRAD has joined #pylons03:50
*** hxizan has joined #pylons03:51
SignumHaving the users beta-test the applications saves you time and makes them feel useful. What else is there to wish for. :)03:52
*** grault has quit IRC03:54
*** matiu_ has quit IRC03:56
zepolenbeta tests are overrated04:01
*** mrrech has joined #pylons04:02
*** gasolin_ has joined #pylons04:08
*** mcdonc has quit IRC04:11
*** mcdonc has joined #pylons04:19
*** claytron has quit IRC04:19
*** claytron has joined #pylons04:19
*** rhymes has quit IRC04:20
*** rhymes has joined #pylons04:26
*** arcore has quit IRC04:27
*** arcore has joined #pylons04:28
*** sector119 has quit IRC04:36
*** NeonMonk is now known as InertMonk04:36
*** sector119 has joined #pylons04:37
*** zepolen has left #pylons04:38
*** zepolen has joined #pylons04:42
*** hipertracker has joined #pylons04:44
*** habes_ has quit IRC04:58
*** claytron has quit IRC04:58
*** habes_ has joined #pylons05:00
*** CIA-19 has quit IRC05:10
*** jinks has quit IRC05:17
*** jinks has joined #pylons05:18
*** CIA-19 has joined #pylons05:23
*** claytron has joined #pylons05:38
*** mrrech has quit IRC05:39
*** s4msung__ has quit IRC05:39
*** InertMonk has quit IRC05:39
*** mars has quit IRC05:39
*** kaiiak has quit IRC05:39
*** brian has quit IRC05:39
*** Six` has quit IRC05:39
*** will___ has quit IRC05:39
*** pacopablo has quit IRC05:39
*** Chairos has quit IRC05:39
*** justin has quit IRC05:39
*** nym has quit IRC05:39
*** kzfm has quit IRC05:39
*** claytron has joined #pylons05:39
*** THC4k has joined #pylons05:40
*** mrrech has joined #pylons05:40
*** s4msung__ has joined #pylons05:40
*** InertMonk has joined #pylons05:40
*** mars has joined #pylons05:40
*** kaiiak has joined #pylons05:40
*** brian has joined #pylons05:40
*** kzfm has joined #pylons05:40
*** Six` has joined #pylons05:40
*** will___ has joined #pylons05:40
*** nym has joined #pylons05:40
*** justin has joined #pylons05:40
*** pacopablo has joined #pylons05:40
*** Chairos has joined #pylons05:40
*** gldnspud has joined #pylons05:57
*** gasolin_ has quit IRC06:02
*** ktec has quit IRC06:06
*** ktec has joined #pylons06:08
*** arcore has quit IRC06:17
*** boozkachu has joined #pylons06:22
*** mthalmei has joined #pylons06:30
*** mw2pfpubk has joined #pylons06:41
*** zzzeek_ has joined #pylons06:43
*** vpol has quit IRC06:46
*** techno_freak has joined #pylons06:56
*** ktec has quit IRC07:07
*** ktec has joined #pylons07:09
*** ktec has quit IRC07:13
*** ltbarcly has joined #pylons07:14
*** techno_freak has quit IRC07:15
*** techno_freak has joined #pylons07:15
*** ktec has joined #pylons07:17
*** deone_ has joined #pylons07:23
*** THC4k has quit IRC07:23
*** brentodd has joined #pylons07:24
deone_anyone with ideas on how to access a json variable in a template07:24
*** cdent has quit IRC07:25
*** batok has joined #pylons07:25
*** CIA-19 has quit IRC07:26
ltbarclya json variable?07:27
*** jvloothuis has quit IRC07:28
brentoddFormencode 1.1: I have a couple of radio buttons on a form, validating with OneOf(['Y','N'],not_empty=True), and if the user does not select on of the options, Formencode blows up with this: http://beta.pylonshq.com/tracebacks/314fac46-2a11-4669-9322-915b3bb97c2407:28
ltbarclythat's htmlfill07:29
ltbarclysince it's not one of Y or N, it is passing None07:29
ltbarclyhtmlfill can't handle a non-string07:29
ltbarclyeasiest solution is to just make Y or N the default07:30
brentoddpretty sure the same thing was working with the previous version though07:31
brentoddand really, a better behavior (in my opinion) would be to raise invalid because None is not in ['Y','N']07:31
brentoddAnd we don't want to default the user to one option or the other - we want them to answer the question. Can't default an option on a ballot, for example, you have to actively choose one07:34
*** AlexCONRAD has quit IRC07:35
ltbarclymaybe it's a bug07:36
desmajthe problem isn't happening on validation. it's happening when you redraw the form.07:36
desmajyeah, that doesn't seem right.07:36
ltbarclyright, it's trying to show an error, like "you have to pick Y or N"07:36
brentoddright07:37
desmajI don't think you want "not_empty=True" there07:38
ltbarclydo radio buttons submit anything if they aren't checked?07:38
desmajyou want more of a not_missing.07:38
ltbarclycheck boxes just don't submit anything07:38
ltbarclyso what you are saying is don't accept ''07:39
ltbarclybut it's getting *nothing*07:39
ltbarclynot even empty string, that name just isn't in the post at all07:39
desmajhave you tried without not_empty?07:39
ltbarclyright, not_missing is more like it07:39
brentoddis not_missing a real thing?07:39
ltbarclynot_empty means take 'this' but not ''07:39
desmajbut not_missing doesn't exist explicitly. it's the default behavior07:39
ltbarclyyou are saying, for the key xxx, don't take empty strings07:40
ltbarclythey are submitting {}07:40
ltbarclyso yea, the key xxx doesn't have an empty string07:40
ltbarclysince the key isn't in there07:40
brentoddit has the same issue if I do not use the not_empty07:40
ltbarclyI'm not sure how you are supposed to handle checkboxes and stuff with formencode07:41
desmajbrentodd: really? exactly the same?07:41
brentoddit kind of works if I say both if_missing='U', if_empty='U' ('U' being some random value that is not in the options)07:41
brentoddyes - exactly the same so far as I can tell07:42
desmajbrentodd: get out of the browser and write some tests around this thing.07:43
desmajare you using the validate decorator?07:44
brentoddyes07:44
desmajthat's weird - if validation fails (and it should), then the validate decorator should be using htmlfill.render to redraw the for using the posted form values.07:47
desmajyour radio field should be empty, not None.07:47
*** CIA-19 has joined #pylons07:47
brentoddI just verified that going back to FormEncode 1.0.1 does in fact work with the same code07:49
brentoddit renders the error message 'Missing Value'07:49
desmajyeah. i wonder if htmlfill.render does different things now.07:49
brentoddmust be... I'll just keep using 1.0.1 then, and post this to the formencode mailing list?07:50
desmajsure.07:51
*** CIA-19 has quit IRC08:09
*** habes_ has quit IRC08:10
*** hxizan has quit IRC08:16
*** zipito has quit IRC08:19
*** CIA-19 has joined #pylons08:20
*** iElectric has joined #pylons08:32
*** anilm has joined #pylons08:33
*** deone_ has quit IRC08:37
*** deone_ has joined #pylons08:39
*** ktec has quit IRC08:44
*** elventear has joined #pylons08:46
*** rhymes has quit IRC08:46
*** danielsdesk has joined #pylons08:48
*** ktec has joined #pylons08:49
*** BenO has quit IRC08:53
*** mvt has quit IRC08:54
*** mrrech has quit IRC09:01
*** THC4k has joined #pylons09:11
*** CIA-19 has quit IRC09:12
*** bob_f has quit IRC09:17
*** bob_f has joined #pylons09:27
*** CIA-21 has joined #pylons09:28
*** apoirier_away is now known as apoirier09:29
*** benbangert has joined #pylons09:31
*** techno_freak has quit IRC09:34
*** eichin has joined #pylons09:34
*** Craecki has joined #pylons09:36
*** Craecki has quit IRC09:37
*** mw2pfpubk has joined #pylons09:42
*** mw2pfpubk has quit IRC09:42
*** cdent has joined #pylons09:47
*** pjenvey_ has joined #pylons09:53
*** brentodd has left #pylons09:56
ltbarclyzepolen: do you run reindexdb?09:57
*** hipertracker has quit IRC09:59
*** vpol has joined #pylons10:02
*** _paneb has joined #pylons10:03
_panebwhen a POST is successful, and a resource was created, i should return 201 with a Location header. that is fine, but if the client is a browser (eg. firefox, ie), then it would be more user-friendly to redirect to the location itself. what do i use to decide whether i should redirect or not? the request's UserAgent ?10:04
Chairosyou sure the browser won't respect 201?10:04
Chairosalso, rails uses the media type10:04
Chairosxml/json get a 201, html gets a redirect10:04
_panebChairos, firefox shows me a blank page10:04
*** milez_ has joined #pylons10:07
*** ktec has quit IRC10:07
*** milez has quit IRC10:07
*** SpankyFromBRC has joined #pylons10:08
*** me_too has quit IRC10:08
_paneboh the location should be stored in the response body as well?10:09
*** too_short has joined #pylons10:09
*** milez_ has quit IRC10:10
*** deone_ has quit IRC10:12
*** habes has joined #pylons10:21
*** vengfulsquirrel has joined #pylons10:21
*** apoirier has left #pylons10:30
*** atomekk has quit IRC10:33
*** |vpol| has joined #pylons10:39
*** devinus has joined #pylons10:44
devinushow do i make pylons stop complaining about my old projects when i access a member not on 'c' ?10:44
benbangertyou don't want an exception thrown?10:45
benbangertjust make the change to your enviornment.py described in the upgrading docs10:45
benbangertdevinus: http://wiki.pylonshq.com/display/pylonsdocs/Upgrading10:45
benbangertnote in the minimal steps, the 2 config options for 'c'10:45
devinusbenbangert: thanks10:52
*** jseutter_ has joined #pylons10:55
*** jseutter has quit IRC10:55
*** thecrypto has quit IRC10:57
*** vpol has quit IRC11:02
*** bacon000 has joined #pylons11:04
*** kaiiak has quit IRC11:07
*** k-shi has joined #pylons11:14
*** dialtone has quit IRC11:18
*** dialtone has joined #pylons11:19
*** thecrypto has joined #pylons11:19
*** zipito has joined #pylons11:33
*** inktri has joined #pylons11:33
*** inktri has left #pylons11:33
*** vpol has joined #pylons11:34
malexWhy can't I write "${h.link_to(${ilist.id}... i.e. use a variable for label in link_to? All I get in pylons traceback is "wrong syntax"11:35
_paneb${h.link_to(ilist.id....11:35
*** boozkachu has quit IRC11:36
Chairos${} requires that everything inside it be valid python syntax11:36
Chairoshowever, ${} is not itself valid python syntax11:36
Chairosso, leave it out inside11:36
malexaahh bummer. Got it. Thanks!11:36
*** |vpol| has quit IRC11:52
*** sluggo206 has joined #pylons11:52
*** habes has quit IRC11:55
*** kaiiak has joined #pylons11:55
*** anilm has quit IRC11:57
*** cdent has quit IRC12:01
*** anilm has joined #pylons12:11
*** mrrech has joined #pylons12:20
Zenomanyone know if there is a way to update multiple rows with sqlalchemy without doing like update(my_table, my_table.c.value==Blah)12:30
Zenomie., is there a way to do like db.query(MyTable).update(blah=bleh)12:30
*** danielsdesk has quit IRC12:32
*** br0kn has joined #pylons12:44
*** atomekk has joined #pylons12:49
*** danielsdesk has joined #pylons12:52
sluggo206zenom: I don't think so.12:57
sluggo206With the ORM you pretty much have to fetch each object before modifying it.12:58
*** matiu_ has joined #pylons12:59
*** anilm_ has joined #pylons13:01
*** anilm_ has quit IRC13:01
*** anilm has quit IRC13:01
*** anilm has joined #pylons13:02
*** kynes has joined #pylons13:12
*** |vpol| has joined #pylons13:13
*** thecrypto has quit IRC13:17
SignumZenom: you can do that: http://www.sqlalchemy.org/docs/04/sqlexpression.html#sql_update13:17
SignumZenom: It's not an ORM operation though. It operates on the underlying table.13:18
*** matiu__ has joined #pylons13:19
*** kaiiak has quit IRC13:23
*** habes has joined #pylons13:23
*** thecrypto has joined #pylons13:27
*** br0kn has quit IRC13:34
*** vpol has quit IRC13:35
*** matiu_ has quit IRC13:38
*** mrrech has quit IRC13:39
*** atomekk has quit IRC13:43
*** anilm has quit IRC13:43
*** elfguy516 has joined #pylons13:48
elfguy516is there a way to change the user/group beaker runs as when creating session and template directories?13:49
*** eichin has quit IRC13:49
*** habes has quit IRC13:49
*** gldnspud_ has joined #pylons13:50
*** erlehmann has joined #pylons13:51
*** _paneb has quit IRC13:57
*** elventear has quit IRC14:00
*** k-shi has quit IRC14:04
*** gldnspud has quit IRC14:09
*** anilm has joined #pylons14:23
*** erlehmann has quit IRC14:24
*** cdent has joined #pylons14:24
*** elfguy516 has left #pylons14:25
*** kynes has quit IRC14:27
*** matiu_ has joined #pylons14:35
*** zzzeek_ has quit IRC14:51
*** matiu__ has quit IRC14:55
*** brentodd has joined #pylons15:03
brianI'm using Pylons and SQLAlchemy15:04
brianI want to add a WHERE condition to certain SQLAlchemy queries based on the current user logged in15:05
*** claytron_ has joined #pylons15:08
*** claytron has quit IRC15:09
*** brentodd has quit IRC15:14
*** claytron_ has quit IRC15:14
*** devinus has quit IRC15:16
*** THC4k has quit IRC15:19
*** k-shi has joined #pylons15:22
*** danielsdesk has quit IRC15:23
*** danielsdesk has joined #pylons15:24
*** danielsdesk has quit IRC15:25
*** gldnspud_ has quit IRC15:31
*** gldnspud has joined #pylons15:31
benbangertand out goes RC315:32
*** bacon000 has quit IRC15:33
*** vengfulsquirrel has left #pylons15:34
*** claytron has joined #pylons15:35
*** |vpol| has quit IRC15:37
*** k-shi has quit IRC15:47
*** cdent has quit IRC15:54
benbangertwooo, and now there's a Pylons release with full Python 2.6 compatibility!15:54
benbangerthttp://beta.pylonshq.com/buildbot/index15:54
*** arcore has joined #pylons15:54
brianhi!!!15:55
malexanyone knows how to pass .default data to a TextField tw widget in a template? Does the data have to be a dictionary or something else?16:12
*** sluggo206 has quit IRC16:15
*** gldnspud has quit IRC16:18
*** gldnspud_ has joined #pylons16:18
*** ltbarcly has quit IRC16:38
*** danielsdesk has joined #pylons16:46
*** gldnspud_ has quit IRC16:47
*** gldnspud has joined #pylons16:47
*** Ergo^ has quit IRC16:52
*** blaflamme has quit IRC16:57
*** frostschutz has quit IRC17:03
*** blaflamme has joined #pylons17:34
*** NeonMonk has joined #pylons17:34
*** blaflamme has quit IRC17:36
*** blaflamme has joined #pylons17:38
*** InertMonk has quit IRC17:39
*** pedepy has joined #pylons17:48
*** zzzeek_ has joined #pylons17:54
*** batok has quit IRC17:54
*** blaflamme is now known as blaflamme|away17:55
*** blaflamme|away has quit IRC18:01
*** blaflamme has joined #pylons18:06
*** SpankyFromBRC has quit IRC18:06
*** pumpkin_ has joined #pylons18:13
*** pumpkin_ has left #pylons18:13
*** s4msung__ has quit IRC18:15
*** s4msung__ has joined #pylons18:16
*** blaflamme is now known as blaflamme|away18:23
*** matiu_ has quit IRC18:24
*** zzzeek_ has quit IRC18:26
*** blaflamme|away is now known as blaflamme18:26
*** ZionHaze has joined #pylons18:30
*** blaflamme has quit IRC18:31
*** pedepy has quit IRC18:43
*** pedepy has joined #pylons18:47
*** dialtone has quit IRC18:49
*** pedepy has quit IRC18:56
*** vengfulsquirrel has joined #pylons19:43
keitheisthe beta site of pylons looks pretty cool. I like it, and its src19:50
*** k-shi has joined #pylons19:51
*** vengfulsquirrel has quit IRC19:58
benbangertit should be launching in a few weeks ;)19:59
* keitheis expecting20:03
*** arcore has quit IRC20:10
*** arcore has joined #pylons20:12
*** NeonMonk is now known as InertMonk20:18
*** gldnspud has quit IRC20:38
*** gldnspud_ has joined #pylons20:38
*** arcore has quit IRC20:39
*** arcore has joined #pylons20:40
*** gldnspud_ has quit IRC20:40
*** gldnspud has joined #pylons20:40
*** InertMonk has quit IRC20:41
*** jseutter_ has quit IRC20:42
*** |crypt has quit IRC20:42
*** |crypt has joined #pylons20:43
*** gldnspud has quit IRC20:45
*** gldnspud_ has joined #pylons20:45
*** gldnspud_ has quit IRC20:56
*** gldnspud has joined #pylons20:56
*** jseutter_ has joined #pylons21:01
*** gldnspud_ has joined #pylons21:01
*** elpargo has joined #pylons21:02
*** gldnspud has quit IRC21:06
*** blaflamme has joined #pylons21:26
*** gldnspud_ has quit IRC21:27
*** blaflamme has quit IRC21:28
*** matiu has joined #pylons21:28
*** fairwinds has quit IRC21:33
*** Solvik has quit IRC21:51
*** blaflamme has joined #pylons21:55
*** Solvik has joined #pylons22:01
*** zipito has quit IRC22:04
*** dialtone has joined #pylons22:12
*** blaflamme has quit IRC22:29
*** arcore has quit IRC23:07
*** dialtone has quit IRC23:13
*** dialtone has joined #pylons23:14
*** ZionHaze has quit IRC23:23
*** JohnBat26 has joined #pylons23:24
*** dialtone has quit IRC23:39

Generated by irclog2html.py 2.4 by Marius Gedminas - find it at mg.pov.lt!