Files
2012-02-21 01:15:00 -05:00

1 line
7.4 KiB
JSON

[{"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297629935.361671, "message": "I'm trying out Pyramid after using Pylons for quite a while -- and I'm consistently having the experience of thinking to myself \"why did they do it this way? what problem does it solve to do it like this?\"", "group_id": 292, "id": 93329}, {"user_id": 4989, "stars": [], "topic_id": 5006, "date_created": 1297630062.7601111, "message": "@jesse_dhillon can you provide some examples of things which are \"broken\" you think?", "group_id": 292, "id": 93367}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297629974.6347401, "message": "Anyone else feel similarly? I'm getting through it, but it's frustrating to be constantly caught up in the transition.", "group_id": 292, "id": 93340}, {"user_id": 6543, "stars": [{"date_created": 1297631821.9435999, "user_id": 1}], "topic_id": 5006, "date_created": 1297631811.4945681, "message": "note also there's a pylons convore channel at https://convore.com/pylons/", "group_id": 292, "id": 93777}, {"user_id": 6543, "stars": [], "topic_id": 5006, "date_created": 1297630576.3965411, "message": "https://bytebucket.org/sluggo/pyramid_sqla/wiki/html/index.html is a package which tries to make the experience of creating a pyramid app more pylons-like, fwiw", "group_id": 292, "id": 93516}, {"user_id": 6070, "stars": [], "topic_id": 5006, "date_created": 1297632138.6636219, "message": "I tried pyrmaid last time and it looks really cool. The code is better managed then the one from pylons or Djanog - the composition of contex and view is really cool!", "group_id": 292, "id": 93806}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297648410.711664, "message": "I guess it's mostly access to information that's been a problem, you guys seems to have found some really good resources. I was looking for a specific \"If you know Pylons here's the equivalent...\" type of document.", "group_id": 292, "id": 95344}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297648489.9835391, "message": "I like not having controllers, a lot. And I enjoy the event system. But I feel like I've had to read through a ton of \"web frameworks 101\" to find out how to use this stuff.", "group_id": 292, "id": 95352}, {"user_id": 6543, "stars": [], "topic_id": 5006, "date_created": 1297654751.9523571, "message": "Have you seen https://bytebucket.org/sluggo/pyramid-docs/wiki/html/migration.html", "group_id": 292, "id": 95996}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297660932.4963839, "message": "I want a __call__ method on HomeController to be invoked when any URLs match 'home/*'", "group_id": 292, "id": 96377}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297661053.5109119, "message": "In Pylons there was a method called __before__ which I could put in the parent class, and I wanted to create my own similar functionality", "group_id": 292, "id": 96388}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297661085.6202669, "message": "I ended up subscribing to the BeforeRender event, and using the decorator argument to Configurator.add_view", "group_id": 292, "id": 96389}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297660865.6875091, "message": "Yeah I have.", "group_id": 292, "id": 96372}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297660878.5441339, "message": "So one thing that I've had difficulty doing is this: suppose I have a class that I want to act as a controller", "group_id": 292, "id": 96375}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297660965.1763351, "message": "Say, the difference between 'home/index' and 'home/edit'", "group_id": 292, "id": 96380}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297661176.6874349, "message": "But I was impatient and didn't want to pour through the general pupose Pyramid documentation just to do something that I thought was pretty simple. That's what I ended up doing though.", "group_id": 292, "id": 96391}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297660934.3085189, "message": "Which I can do", "group_id": 292, "id": 96378}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297660952.7441399, "message": "But I haven't figured out how, inside of __call__, I can determine what was actually requested", "group_id": 292, "id": 96379}, {"user_id": 1944, "stars": [], "topic_id": 5006, "date_created": 1297663529.9792409, "message": "Did you read http://docs.pylonsproject.org/projects/pyramid/1.0/narr/urldispatch.html ?", "group_id": 292, "id": 96624}, {"user_id": 1944, "stars": [{"date_created": 1297674235.180562, "user_id": 8013}], "topic_id": 5006, "date_created": 1297663623.6645241, "message": "If you route 'home/{action}' you can read it with request.matchdict['action']", "group_id": 292, "id": 96628}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297674367.4095621, "message": "Thanks @daq, I did read that and it's pretty similar to how routing is done in Pylons. I ended up using traversal instead, so I could see how to use it mainly. If I have a view that corresponds to a class instance, do you know how I can get the action name, or should I rely on view_name in that case?", "group_id": 292, "id": 97300}, {"user_id": 1944, "stars": [], "topic_id": 5006, "date_created": 1297674593.6786411, "message": "request.view_name yes, I would think", "group_id": 292, "id": 97328}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297674407.285779, "message": "I mean @dag", "group_id": 292, "id": 97308}, {"user_id": 6543, "stars": [], "topic_id": 5006, "date_created": 1297714021.6136379, "message": "the pyramid equivalent to pylons' __before__ is the __init__ of a view class", "group_id": 292, "id": 104141}, {"user_id": 6543, "stars": [], "topic_id": 5006, "date_created": 1297714231.455709, "message": "but really there's no reason to try to figure out \"which view name was used\". instead register each view callable for a unique set of circumstances as per the view configuration docs", "group_id": 292, "id": 104182}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297762117.2084961, "message": "I.e. if you want the index method to be called, you specify the target view as 'views.Home' (an instance of the class), and pass a named arg 'attr=\"index\"'", "group_id": 292, "id": 109940}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297762011.599865, "message": "@chrismcdonough That's not entirely true, about __init__ being the equivalent of __before__. That's only the case if the instance is not callable and/or you specify the attr argument to add_view.", "group_id": 292, "id": 109930}, {"user_id": 6543, "stars": [], "topic_id": 5006, "date_created": 1297805467.3760779, "message": "__init__ is called whether you specify attr= or not if the view is a class... but yes if it's a function or instance there's no __init__ to be called, so none is called... just make sure 'views.Home' is a class, not an instance.", "group_id": 292, "id": 115446}, {"user_id": 8013, "stars": [], "topic_id": 5006, "date_created": 1297855120.0814619, "message": "Sorry yes I mean that __call__ is called unless you specify attr, so you would need to know in __call__ which view is being requested, unless you provide attr. __init__ is called if your view target is a class, not an instance.", "group_id": 292, "id": 119041}]