[offtopic] Pycon roomsharing ?
Hello guys, I'm looking for someone that will be willing to do roomsharing for pycon. And I'll be very interested in finding someone that is involved in the wsgi world. My current plans are to stay in for the conference days + 1 or two of the tutorials. That is arrive on march 10 leaving on march 14 or 15. Any takers ? Sorry for the offtopic. -- 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 pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: [offtopic] Pycon roomsharing ?
Sorry I mean. conferences + two days of sprints. Not two days of tutorials. On Wed, Jan 26, 2011 at 9:32 AM, Jorge Vargas jorge.var...@gmail.comwrote: Hello guys, I'm looking for someone that will be willing to do roomsharing for pycon. And I'll be very interested in finding someone that is involved in the wsgi world. My current plans are to stay in for the conference days + 1 or two of the tutorials. That is arrive on march 10 leaving on march 14 or 15. Any takers ? Sorry for the offtopic. -- 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 pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
Re: Sharing Templates [mako] Across Pylons Apps
On Mon, Aug 24, 2009 at 5:43 PM, Jonathan Vanascojonat...@findmeon.com wrote: i have a different approach... i keep all the shared templates in its own repository, which is put into each project as an svn:external the projects then use a standard config file to either use the shared template or an override in their own directory structure i could have used a file exists check, but i felt a config option would be more extensible A Third approach which is a little more insane is to steal the dotted notation file from TG2 [1]. This will allow you to use imports like in genshi that use packages instead of paths. So all your templates are in one package and you can import them from anywhere. We are currently using this in one project with similar characteristics. A main application and several subapplications for the different clients of the main application. [1] http://hg.turbogears.org/tg-21/src/tip/tg/dottednamesupport.py --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Adding Pylons 0.9.7 breaks 0.9.6 projects
On Mon, Aug 17, 2009 at 11:21 PM, Mike Orrsluggos...@gmail.com wrote: On Mon, Aug 17, 2009 at 4:56 PM, kochharkochhar...@gmail.com wrote: Jorge Vargas wrote: On Fri, Aug 14, 2009 at 7:50 PM, kochharkochhar...@gmail.com wrote: I have a package repository which contains packages for pylons 0.9.6.1 After adding pylons 0.9.7 and it's dependent packages, my 0.9.6.1 projects stopped working. It seems bad practice for pylons to specify it's dependencies in the FooPackage=x.y.z format; it's too easy to break something. Is there a way around this so I don't need to create separate package repositories for 0.9.6.1 and 0.9.7 I don't see this as bad format as a newer version is (in general a better less buggy version) Except when the new versions are not backwards compatible and break existing applications. Most libraries don't preserve backwards compatability indefinitely. It's fine practice to follow the latest and greatest in development but release version specify explicit dependencies to be stable in the face of changes. Then you end up with the opposite problem: people can't install a newer version of a library that may have bugfixes or new features they want or need. It's reasonable to restrict an old version of something (Pylon 0.9.6) when an incompatibility is known. But setting closed requirements for everything just makes it harder to use a later version if it is compatible. And compatibility may be different in different cases. Something may be compatible for new applications but not for existing applications. In that case it's not right to prevent everybody from using it just because it's incompatible for some people. People can adjust their application's setup.py if they want to stick to a particular version or avoid a known-bad series. It's easy to make your setup.py more restrictive than Pylons'. It's impossible to make yours less restrictive without modifying Pylons' setup.py, which means it can't be easy_installed without manual intervention. correct me if I'm wrong but didn't the OP said that python 0.9.6 doesn't works with the newer version of X and Y as in it's API incompatible? if that is the case then what you say doesn't really applies as it is broken for everyone. Just to clarify I was suggesting putting a cap on 0.9.6.* not on 0.9.7 -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: xml in textarea
On Tue, Aug 18, 2009 at 4:29 PM, Etiennepub...@emarache.net wrote: Hi, in my application copied from SimpleSite of Pylonsbook, I wish use MathML code in the contens of pages. To do so, I added response.content_type='application/xhtml+xml' to the __before__ methode of the class PageController in the controller page.py. How can I proceed to prevent the new page from being created when the contents of the textarea has a xml invalid tag? the basic procedure will be def process(self,xml) if is_valid_xml(xml): create obj and save else: flash('an error has occured') redirect('/same page') of course it gets a little more complicated if you want to keep the content to display back to the user, I suggest you take a look at the validators, as they will allow you to simular the state when an application error in the posted data has happen. Thanks for your help, Etienne --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Adding Pylons 0.9.7 breaks 0.9.6 projects
On Fri, Aug 14, 2009 at 7:50 PM, kochharkochhar...@gmail.com wrote: Hi all, Hi, I have a package repository which contains packages for pylons 0.9.6.1 After adding pylons 0.9.7 and it's dependent packages, my 0.9.6.1 projects stopped working. From looking at the requires.txt in pylons 0.9.6 egg it appears that pylons is specifying it's dependencies in the FooPackage = x.y.z format. Consequently, when I re-create my project environments, they get newer versions of their dependencies which are not compatible with 0.9.6.1 (Notably Routes and WebHelpers) It seems bad practice for pylons to specify it's dependencies in the FooPackage=x.y.z format; it's too easy to break something. Is there a way around this so I don't need to create separate package repositories for 0.9.6.1 and 0.9.7 I don't see this as bad format as a newer version is (in general a better less buggy version) that said they are two ways of fixing this. 1- releasing 0.9.6.2 with a setup.py that excludes the new incompatible versions 2- using something like pip and it's requirements.txt file to fix such issue. Of course #1 is best so I suggest you confirm which versions are broken and propose a patch. Thanks, - kochhar --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Third party Service webhelpers?
On Sat, May 23, 2009 at 10:45 PM, Mike Orr sluggos...@gmail.com wrote: On Sat, May 23, 2009 at 6:54 PM, Ben Bangert b...@groovie.org wrote: On May 23, 2009, at 4:26 PM, Jorge Vargas wrote: The net today is full with services we pull and mix and match between our sites. - Google ads - google analitics - youtube, vimeo, embed tags - other site specific tags - post to reddit,digg,etc buttons - RSS buttons - etc. So why not pack all those little snippets into a library? This ideas occurred to me and I want to know if people are already doing it, and if it's worth adding it to webhelpers or even releasing it as an addon package. what do you guys think? It makes sense to me. I don't think they'd be very large, so I'm inclined to think this would be part of WebHelpers? Or I suppose it could be a new little package called 'social helpers' or something, to indicate its for all the various common social tidbits people throw on websites. They might fit into WebHelpers if we define more precisely what they would be. Functions that produce HTML and Javascript? Would they be framework neutral or specific to Pylons? I think they should be framework neutral. I'm planning on using them on TG so they better be :p I also think they should produce very little html and JS. In fact the average helper will probably be no bigger than 5 tags. We could make a module or package for cloud services. My first thought would be to put each provider in a separate module, although that might lead to lots of tiny modules. But at this point each provider is pretty much unique. I would veer toward those that make an attempt at interoperability (via OpenSocial, GData, etc), but those may not be what users need (e.g., some users need to tie specifically to YouTube because it's the biggest). My take on this is that we shouldn't provide a helper that no one will use. For example service X should be really cool but if no one uses it but you then it shouldn't be on the system. Based on that principle I think things will be the other way around, We'l start with the big sites and things will grow from there. Another question is whether WebHelpers could keep up with the changing providers. Would we end up in the situation we were in earlier with Javascript libraries, where we pick one and then another one eclipses it? I don't think this will happen. As this type of thing normally has a very backwards compatible api, using youtube as an example I'm almost certain their embed tag has been the same for quite some time. On another note, I'm putting together a WebHelpers 1.0 beta, and thinking this is a good time to delete webhelpers.rails and the other deprecated packages. Would that seriously ruin anybody's day? it will do to me, I'm still using a couple of those helpers. For example I recently used the phone number stuff for a US only site. You can stick with the 0.6 series if you need them, and I don't think the Pylons dependency needs to change since easy_install should automatically pick the latest version, but you would still be able to downgrade without running afoul of the dependencies. This is a good thing. -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Third party Service webhelpers?
On Sun, May 24, 2009 at 1:45 PM, Mike Orr sluggos...@gmail.com wrote: On Sun, May 24, 2009 at 1:22 AM, Domen Kožar ielect...@gmail.com wrote: Few weeks ago I was thinking about a similar feature for WebHelpers. Maybe a way to go is to create a ext namespace that would work like third party services and everyone could release this utilities. I'm sure everyone has some snippets in helpers that could solves somebody else's problem. Just a thought. Additional helpers can be added by topic, hopefully to the existing namespaces, or to a new one if they cover very different ground. You can post proposals through the ticket system I don't think the namespace is a good idea. Webhelpers are too vague as a standalone package and without some supervision that your webhelpers actually work outside of your projects/world view, people could start releasing a bunch of useless stuff. To some point I think each webhelper that goes into the package needs to be discussed for community acceptance (http://bitbucket.org/bbangert/webhelpers/issues/). The main criteria is whether it looks like it would be used by a wide variety of users. (We can't have too many little-used helpers or it'll turn into bloat.) Any HTML should be generated by the HTML builder (webhelpers.html) to ensure well-formedness and proper quoting. exactly, we need that check. Jorge's cloud stuff is big enough that it will need a package name and a maintainer. Maybe webhelpers.cloud? Do you want to organize the sub-namespaces and maintain it, Jorge? I'm not that far yet, I'm still in the is this a good idea phase I'm not certain it's worth the troubles of a separate release cycle. But I can contribute some code I have been working on (will be working on) to generate a couple of these. I think we could start with a fork at BB, and see how much this grows. If it demands it's own package then we'll see how that ends up. I think it should go outside webhelpers.html because it may get big, and because some of the helpers may be more than just HTML generation. +1 I also think that the ones needing JS should stick with pure-old JS, because the moment you demand a library you end up with the old JS problem in webhelpers. -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Alternative Storage choice?
Hello, I know this may be a little offtopic but I know a lot of people here, have experience in this sort of thing, which is why I'll like to ask. The very short summary of what I need for this project is. A document with a metadata object (Bunch) and a unique id (possible cross domain) per document. If you don't know what a Bunch object is. It's simply a dict with attribute access Then these documents could be interlinked in a tree-like data structure (think threaded comments in a blog post) Each one of these documents is some form of content that will eventually be html, so they can get big but not huge. Therefore the storage will grow in number of 'documents' rather than the size of each one. As for search I need only 2 forms search by metadata and full-text-search. From my research into this they are a ton of options. zodb, mongodb, couchdb, cassandra, tokyo tyrant / cabinet And to be honest I'll prefer to spend more time on getting the UI part of this project than trying out all the storage options. For now I just need a solid prototype. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Third party Service webhelpers?
Hi, The net today is full with services we pull and mix and match between our sites. - Google ads - google analitics - youtube, vimeo, embed tags - other site specific tags - post to reddit,digg,etc buttons - RSS buttons - etc. So why not pack all those little snippets into a library? This ideas occurred to me and I want to know if people are already doing it, and if it's worth adding it to webhelpers or even releasing it as an addon package. what do you guys think? --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Subtle bug or anti-feature?
Hello, I'm testing my new json rendering code for TurboGears and found an interesting bug. I got a controller like @expose('{{package}}.templates.info') @expose('json') def environ(self): return dict(environment=request.environ) for those not familiar it's simply setting two routes one for environ.json and another for environ.html that users the template name info. Now the bug is that request.environ is of type pylons.util.AttribSafeContextObj which overwrites __getattr__ to return '' on a not found. My json code has this check if hasattr(obj, '__json__'): return obj.__json__() which is giving me the following error TypeError: 'str' object is not callable So the question is what's wrong? a) should AttribSafeContextObj not return the empty string? b) should I make my code more demanding of the type and add a callable() check? --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Web based email sql admin for Pylons
Hi, you are welcome to present this project as a TurboGears GSOC proposal. I also agree this is too wide for something like pylons but it could fit in interesting ways on top of TG. On Tue, Mar 24, 2009 at 4:43 PM, Kevin Ar18 kevina...@hotmail.com wrote: In fact, if there is something like this for any Python web framework, please let me know. :) If you want the details, read this paragraph: I would like to have some kind of app that allows me to manage a list of contact in a database like fashion (where I can add new table columns and add new data to people). Yet, at the same time, I would like to integrate this with other things over time. For example, I would like to integrate the database with a web based email system. Instead of having one inbox, I'd have one inbox per contact in my database. In that way I can look at the contact and see only emails related to that contact or read several emails together as an ongoing conversation. Or setup a notification if someone never responds to the email, so I can try again. And, of course, over time, I may want to add more features So, I figured I could use a Python web framework. Then take a pre-built sql admin app and a pre-built web based email system and build from there. Are there any such app already made using Python or am I going to have to build a sql admin and a browser based email all from scratch :( ? Is there some other way that I can build what I need (with the option to exptend it in Python as I need)? like a CMS? Would it help if I explained the concept in more detail or if I asked this in a different Python mailing list? Internet Explorer 8 – Now Available. Faster, safer, easier. Download FREE now! --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: pylonshq issue tracker disappeared
On Mon, Mar 9, 2009 at 4:08 PM, Wichert Akkerman wich...@wiggy.net wrote: I'm not sure if anyone already noticed, but at the risk of repeating the message: the issue tracker on pylonshq.com no longer works. All relevant URLs return a 404. works for me http://pylonshq.com/project/pylonshq/report Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Pre-pycon09 Sprint Planning
Hello Everyone, Sorry for the inter-list post but this is an inter-list project. Since we share so much in common these days we decided to do a joint sprint, which basically means we'll all be in the same room and we'll probably subdivide ourselfs into small groups inside the room and people will move around the tables depending on what they are interested in. But we need to get things started in organizing our sprint, for that we should use the sprint wiki page http://us.pycon.org/2009/sprints/projects/wsgi/ (please add your self there now, for us to get a big room!) As for ideas it will be best to discuss on the mailing lists first and after some consensus is reach put it in, we don't want to overwhelm ourselfs with work. I'll be baby sitting that page for the next couple of days so, discuss :) Looking forward to meeting you all at pycon! PS: please if your answers are relevant to all 3 ML remember to use `reply all` --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: looking for freelance work (pylons/python)
piggybacking on this, we'll start working on a project for this type of thing soon. It will list sites/people/jobs, it's currently semi-private but we are probably going to start working on it post-pycon. Proper announcement will be made. We could investigate on forking kai for this but I think kai provides way too many features. Ideally I'll like to have some sort of cross posting more details when the project materializes. On Wed, Feb 25, 2009 at 1:59 AM, Dalius Dobravolskas dalius.dobravols...@gmail.com wrote: Hello, Sorry, Max, I don't have job offer for you. Just an idea - PylonsHQ (http://pylonshq.com/) could have Pylons job board where people looking for Pylons developers could post their job offers. -- Dalius http://blog.sandbox.lt --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Clickpass?
On Wed, Feb 25, 2009 at 2:26 PM, Tom Longson (nym) toml...@gmail.com wrote: Has anyone had experience getting openid or clickpass to work with pylons? pylonshq/kai knows this, what better way to learn that from the master himself :) http://bitbucket.org/bbangert/kai/ Just curious. The idea of making user registration easier (or eliminate it entirely) totally appeals to me. On the other side of the fence I'm hoping to try out django-clickpass with pinax. Thanks for the link I didn't knew clickpass, maybe at last OpenID will work. I honestly think that thing is even complex for developers Cheers, nym --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: looking for freelance work (pylons/python)
On Fri, Feb 27, 2009 at 3:48 AM, Mike Orr sluggos...@gmail.com wrote: On Thu, Feb 26, 2009 at 11:41 PM, Noah Gift noah.g...@gmail.com wrote: On Fri, Feb 27, 2009 at 8:40 PM, Mike Orr sluggos...@gmail.com wrote: What's this Kai thing you guys are talking about? I looked in PyPI and googled kai python but didn't see anything that looked like a software package. http://bitbucket.org/bbangert/kai/ So I'm supposed to download this and run it to see what it is? The READMEs don't say. This is the PylonsHQ site? yes --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: looking for freelance work (pylons/python)
On Fri, Feb 27, 2009 at 3:35 AM, Ben Bangert b...@groovie.org wrote: On Feb 26, 2009, at 11:27 PM, Jorge Vargas wrote: piggybacking on this, we'll start working on a project for this type of thing soon. It will list sites/people/jobs, it's currently semi-private but we are probably going to start working on it post-pycon. Proper announcement will be made. We could investigate on forking kai for this but I think kai provides way too many features. Ideally I'll like to have some sort of cross posting more details when the project materializes. I should note that having it in Kai was so that people wouldn't be going to a half dozen sites or more for each little Pylons thing. Having a job board and some pages that show people interested in work is hardly a major feature worth an entire site of its own I think. :) You are going to make me reveal non-public plans Some clarifications without going into much details of work that hasn't started. Our project is going to be aimed at TurboGears and we'll of course have cross posting (I'm willing to work on replicating posts to kai and back of pylons related stuff), we are also interested in the marketing side of things, again it's still in flux together with the new tg.org (whoopps another secret out in the public) Same reason I'm also working to add a blog aggregator and a 'pylons people' bit to the site, to help the community without requiring even more logins, to more sites all over the place. Totally agreed with that in other communities this is a mess. I'm just not entirely sure the project site and the community around the project should use the same site. (for example trac/trac-hacks) I had no clue you where working on any of those features, I need to follow kai closer. I really didn't think Kai had that many features, its a tiny code-base, a fraction of the size of the apps I usually build, thats really 'too many features'? ;) I was referring to components we won't use (trac,buildbot, snips, tracebacks) I have read/run kai's source and I find it really nice. I guess my only problem will be that you need a real server to get couchdb running but that's just me not taking the time to setup a VPS. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Sprint at PyCon?
maybe a little late but I know at least 3 people from TG are going to be there all 4 days, so I hope to see ya there. On Tue, Feb 17, 2009 at 7:35 PM, Matt Feifarek matt.feifa...@gmail.com wrote: On Tue, Feb 17, 2009 at 6:28 PM, Mike Orr sluggos...@gmail.com wrote: Will there be any sprint(s) for pylons and pylons-related projects (routes, webhelpers, paste) at PyCon next month? Yes, but what exactly we'll be working on has not been decided. Cool! I plan to attend PyCon, and may be able to contribute, so if it could get into the schedule asap, I can plan my hotel and plane tickets. Or am I being dense; is any would-be sprint all 4 days? --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons vs Tomcat+GWT
On Sat, Jan 31, 2009 at 11:00 PM, Tycon adie...@gmail.com wrote: because it's not ready so it's just a toy at this point, just like pyjamas, while GWT is used by real production websites (ever heard of gmail) Actually all I have heard is the opposite. In fact one of GWT's biggest but is that none of serious google products use it. In fact I'm almost certain gmail doesn't simply because gmail is older than the gwt project. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Is Django more popular than Pylons?
On Wed, Jan 28, 2009 at 8:45 PM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 28, 4:06 pm, Mike Orr sluggos...@gmail.com wrote: On Wed, Jan 28, 2009 at 3:37 PM, Akira Kitada akit...@gmail.com wrote: [snip] In production, I've gone to always using virtualenvs. That way if I install a new website with different library versions, I don't have to worry about potentially breaking existing sites. I use OS packages only for things that are particularly difficult to install (MySQLdb, LDAP, PIL). Fortunately these are pretty version-independent, so all applications can use them. I've adopted this same strategy in the last 6 months or so. Works great. same here works great for dev and prod across any OS. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: State of Auth with Pylons
On Tue, Jan 27, 2009 at 7:29 AM, Chris Miles miles.ch...@gmail.com wrote: I haven't dealt with this problem either. I had a quick look at TurboGears 2 to see if they had a solution for it in a quickstarted app (they use repoze.who/repoze.what) but they don't display an error message for failed logins either. actually it does, you probably tried an older version of the package. keep in mind repoze.what is the newest of all auth layers and it's code is still in flux. There was a big revamp of the whole thing about a month ago and it had it's 0.1 final less than a week ago. A session based flash message (as suggested by TJ Ninneman) is probably the way to go, but any recommendations from repoze.who experts would be handy. This was also discuss in the TG list recently and even though this is a great thing it's hard for when you need to do caching of the pages. The current solution turbogears uses is a system with two optional interchangeable components. You have a cookie based flash (this is a package created for that purpose) and a session flash (old traditional TG style flash). Cheers, Chris Miles On 27/01/2009, at 5:42 AM, Tom Longson (nym) wrote: Have you managed to deal with the problem of login handlers and error messages, that is what happens if a user tries to log in and for whatever reason, fails? I'm currently using repoze.who, and haven't managed to overcome this major point, even though I've discussed it at length with Chris McDonough. Cheers, Tom On Fri, Jan 23, 2009 at 5:51 PM, Chris Miles miles.ch...@gmail.com wrote: For my first stab at authentication in Pylons I used repoze.who and was very satisfied with it. It is complete (enough for me) but also very customisable. For authorization I just rolled my own, as the requirements were extremely simple. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: State of Auth with Pylons
On Tue, Jan 27, 2009 at 10:16 AM, TJ Ninneman t...@twopeasinabucket.com wrote: This was also discuss in the TG list recently and even though this is a great thing it's hard for when you need to do caching of the pages. The current solution turbogears uses is a system with two optional interchangeable components. You have a cookie based flash (this is a package created for that purpose) and a session flash (old traditional TG style flash). Does the cookie get set within a custom Challenger plugin or within the Authenticator plugin? neither, the webflash package is very new, and very small go check it out, it's on pypi --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: python -3 switch
On Thu, Jan 22, 2009 at 5:59 AM, przemek.ch przemek...@gmail.com wrote: Hi, python 2.6 has a switch -3 which will show warnings about code that is not compatible with python 3 is ther a way to use tis switch with pylons? pylons don't use python directly and there's no such switch for paster many of pylons dependencies do not yet work on py3k therefore pylons itself still doesn't works there. that said we do run on 2.6. the simplest way I see of doing that is to change the shebang line of the paster command, which should be in $ENV/bin/paster, where ENV depends on your system and/or if you are using virtualenv. $ which paster will tell you. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: On disk data files
On Wed, Jan 21, 2009 at 2:55 PM, Ross Vandegrift r...@kallisti.us wrote: Hey everyone, Is there a good place in a pylons project to put data files that need to be used by the app at various places? They don't need to be web accessible - strictly internal stuff. In this case I have some XSLT sheets that I need to load on demand. Easy enough to add one if I need to, just don't know if I need to. I normally stick them in data or a config variable with the path. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Is Django more popular than Pylons?
On Sun, Jan 18, 2009 at 6:05 PM, walterbyrd walterb...@iname.com wrote: And if so, why? yes, so does php, your point? --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Django or Pylons - comparison details
On Mon, Jan 19, 2009 at 3:15 PM, Lawrence Oluyede l.oluy...@gmail.com wrote: On Mon, Jan 19, 2009 at 6:20 PM, Colin Flanagan quadvill...@yahoo.com wrote: I'm curious if Django's CMS reputation comes from the fact that it's used by a lot of newspapers and content providers, or if there really is something that makes it advantageous over other frameworks. Django's admin is very handy for content based sites. We're developing the Italian PyCon website with Django. While we develop the webiste some people can upload and review documents, rollback and stuff like that. Very nice. Nothing you can't code in Pylons or CGI with C, but it's nice to have it for free. you should try out Catwalk2, tgext.admin and/or Rum. They are currently the competitors in TurboGears2 regarding this playing field. Catwalk2 and tgext.admin are build on top of Turbogears so you will need that dependency (totally worth it) or if you don't want that then Rum is a wsgi app http://pypi.python.org/pypi/Catwalk http://pypi.python.org/pypi/tgext.admin/ http://docs.python-rum.org/user/install.html Note: the author is catwalk and tgext.admin is the same guy, he is currently considering of folding one of the projects into the other as at this moment their only difference is that Catwalk2 is equivalent to django's autodiscovery while tgext.admin is the customizable by code type of thing Note2: I haven't used any of the 3 outside a turbogears project, but they will work in parallel --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Django or Pylons - comparison details
On Mon, Jan 19, 2009 at 4:03 PM, Mike Orr sluggos...@gmail.com wrote: On Mon, Jan 19, 2009 at 1:29 PM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 19, 9:20 am, Colin Flanagan quadvill...@yahoo.com wrote: The SQLAlchemy argument is a very compelling one. I have an application that, while being a CMS, has heavily relational data. I was urged by different people to do it either in Django or Plone, but went with Pylons. My domain objects are far easier to work with, though I did suffer from the authentication layer and a few other things I had to build from scratch. Django can use SQLAlchemy, but by doing so you pretty much nullify a lot of the things that are unique to that framework like their automatic admin interfaces. Django's object generation came nowhere near understanding my moderately-complicated data model and would have been much more difficult to develop with, as compared to Pylons with SQLAlchemy. On another note: I find it interesting that a lot of people recommend Django for CMS-type applications. I would think that Plone might be more far more suitable given that: 1. your data fits well with the hierarchical structure of the ZODB 2. your content is comparable to the content types already established in Plone 3. you don't have any legacy data or need to integrate with other systems 4. you don't need to do lots of custom UI/presentation layer work I'm no Plone expert, but I don't think #4 is a problem for Plone. I think there are actually quite a few Plone sites with custom UIs (my company's new Intranet being one of them). Plone is certainly very complete. Its main problem is its Zope 2 legacy, which many people see as baggage. But if you ignore that, it's got many many things a content-based site needs. Pylons is clearly better for a calculation-based site with a lot of little pieces of data, although of course you can build any site in either. Django is in between, with some CMS-handy features built in, yet also capable of running a calculation-based site, but is perhaps not as attuned to it as Pylons is. PS If anyone needs an SA type def for PostGIS geometry columns, give me a shout. I have one version based on PCL and another on Shapely. I don't know this, but there are open-source GIS groups who probably do. http://groups.google.com/group/cugos sorry for more TG propaganda, but one of our gsoc projects from last year was exactly this. I know the author and even though I haven't used the code for anything real, it looks very nice. His gsoc was really nice as it was mainly to try to get as much gis stuff working with tg as possible overview docs http://turbogears.org/2.0/docs/main/Extensions/Geo/ here is a demo app http://geo.turbogears.org/ and the project page http://code.google.com/p/tgtools/ Now keep in mind this was one of the goals for TG2, let pylons concentrate on the details of the framework while TG explored the extensions. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: What's my application version?
On Mon, Jan 19, 2009 at 6:36 PM, will welch welch.quietple...@gmail.com wrote: What's the blessed way for my application to get its version string (eg, the 0.1.0dev_r159 portion of the egg name application-0.1.0dev_r159-py2.4.egg) I'm not 100% of the question but you are looking for setup.py and setup.cfg egg_info section --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Django or Pylons - comparison details
On Mon, Jan 19, 2009 at 4:54 PM, Colin Flanagan quadvill...@yahoo.com wrote: - Original Message From: Jorge Vargas jorge.var...@gmail.com To: pylons-discuss@googlegroups.com Sent: Monday, January 19, 2009 4:45:35 PM Subject: Re: Django or Pylons - comparison details On Mon, Jan 19, 2009 at 3:15 PM, Lawrence Oluyede l.oluy...@gmail.com wrote: On Mon, Jan 19, 2009 at 6:20 PM, Colin Flanagan quadvill...@yahoo.com wrote: I'm curious if Django's CMS reputation comes from the fact that it's used by a lot of newspapers and content providers, or if there really is something that makes it advantageous over other frameworks. Django's admin is very handy for content based sites. We're developing the Italian PyCon website with Django. While we develop the webiste some people can upload and review documents, rollback and stuff like that. Very nice. Nothing you can't code in Pylons or CGI with C, but it's nice to have it for free. you should try out Catwalk2, tgext.admin and/or Rum. They are currently the competitors in TurboGears2 regarding this playing field. Catwalk2 and tgext.admin are build on top of Turbogears so you will need that dependency (totally worth it) or if you don't want that then Rum is a wsgi app http://pypi.python.org/pypi/Catwalk http://pypi.python.org/pypi/tgext.admin/ http://docs.python-rum.org/user/install.html Note: the author is catwalk and tgext.admin is the same guy, he is currently considering of folding one of the projects into the other as at this moment their only difference is that Catwalk2 is equivalent to django's autodiscovery while tgext.admin is the customizable by code type of thing Note2: I haven't used any of the 3 outside a turbogears project, but they will work in parallel These are really interesting. I'm especially curious to hear anyone's experience using Rum with Pylons. I'm getting ready to build something really similar but am now thinking otherwise. as I said rum is a wsgi app, so it runs standalone, rumAlchemy your dburi is enough. to try it out. As for the integration (running in the same process, theme sharing, etc.) that's another story, you could base yourself on the tg2 sample app. My impression of Django's admin was that, once you've replaced the native ORM, you no longer get it for free. That still holds true, no? yes, django admin is tied into django ORM. On the contrary rum has interfaces to use other ORMs, but so far it only has a SQLAlchemy backend. The same hold s true for catwalk2. Just to be clear, all 3 of these tools provide some how the same feature set of django admin. they are NOT django they are 100% TG/pylons code. Both use as base ToscaWidgets which ones was TruboGears widgets, catwalk2 and tgext.admin build on top of a second framework call sprox (which is somehow like formalchemy), The difference between the three is really set in internal components and some design issue, but to the end use they all should be quite alike. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons and SQLAlchemy 5.0.
On Wed, Jan 14, 2009 at 1:13 AM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 13, 10:45 pm, Jorge Vargas jorge.var...@gmail.com wrote: On Wed, Jan 14, 2009 at 12:36 AM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 13, 7:07 pm, Jorge Vargas jorge.var...@gmail.com wrote: On Tue, Jan 13, 2009 at 3:32 PM, grassoalvaro grassoalv...@yahoo.com wrote: Hi, Can someone tell me how to declare models using sqlalchemy 5.0? When i'm trying something like that: class Worker(object): __tablename__ = 'workers' id = Column(Integer, primary_key=True) and next i'm importing it in model.__init__, command paster setup-app dosn't create declared table. please review the SA documentation it excels at well everything. You are probably trying to use SA declarative which means you classes need to extend declarative base rather than object. As explained herehttp://www.sqlalchemy.org/docs/05/ormtutorial.html#creating-table-cla... Also, you need to call the method for creating tables (metadata.create_all or something like that); paster doesn't do that for you. Some people do that in websetup.py. well this is the default in 0.9.7. Also you should do that in websetup, because calling create_all is safe but it makes no sense to call it on each startup if it's never going to recreate the tables. while websetup is going to run ones for each deployment. Thanks for the correction on those defaults in websetup, although it's possible someone deleted those lines without realizing it. Personally, I don't use websetup for creating database tables, because that isn't part of _web_ setup in my mind. My model lives in a package separate from my Pylons package/app, which I consider as just a UI. agreed, I got a similar setup for one of my projects. I normally use websetup for development (pre-release) after that I let sqlalchemy-migrate take over. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Recommended production deployment
You are simply FUD. You are cherrypicking on which posts to reply to, why didn't you reply to Graham's point regarding lazy loading? it almost seems like you want to make mod_wsgi bad... Using apache has always been about optimizations, I'm certain your apache process is loading a ton of stuff, if I recall correctly ubuntu's package will enable all modules installed by everyone so if you have say wordpress on that machine, even if it's a testing site you ones added. That means your apache is loading mod_php as part of your benchmark. Bottom line is, you keep comparing a sub-optimal mod_wsgi installation with a perfect CP deploy, and say it's faster. Maybe faster for the unlearned to deploy but not faster to the CPU to run it. Oh and before you say it I'm no where near close to an apache expert, so I'm probably going to come up with very suboptimal apache installs, that said I'm aware it is my fault rather than the package. So I'm going to stop reading your posts regarding this, be happy with your CP + reverse_proxy, I have used that some times. it really depends on your taste and all 3 solutions are good enough. Your bottleneck is going to be the DB anyway, it always is. Because of one simple fact, disk I/O operations are the most expensive thing (in time of course) in Computers Today. On Wed, Jan 14, 2009 at 7:36 AM, Tycon adie...@gmail.com wrote: I specifically meant modwsgi's daemon mode is a hack, which is like I explained a proprietary unreliable and non scalable communication protocol. As for embedded mode, it's not a hack but as it turns out its performance isn't all that great given that it under-performs a pure python HTTP server like the one in CherryPy. On Jan 13, 10:13 pm, Colin Flanagan quadvill...@yahoo.com wrote: Performance considerations aside, why is mod_wsgi a hack? Because it doesn't perform as wel as other solutions? Can you address your concerns about the implementation vs the performance benchmarks? - Original Message From: Tycon adie...@gmail.com To: pylons-discuss pylons-discuss@googlegroups.com Sent: Wednesday, January 14, 2009 12:51:27 AM Subject: Re: Recommended production deployment Im using Ubunto 8.04 LTS and running the test using ab -n 1 -c 10 to localhost, in order to focus on the request handling code in the server stack and remove or reduce the weight of all other application logic such as db access and page rendering. This is not supposed to be a realistic timing of a real world request, but a highlight of the differences in efficiency of different request handling stacks including network layer, HTTP and routing code. All software package veriosns I'm using are the versions supplied in the OFFICIAL repositores for the distribution. Pylons and cherrypy were installed using (non)easy-install so their version is the latest rather than a version tied to any official repository. I'm running in a full VM (single core) so I'm pretty sure my results are correct: CherryPy (started using paster serve prodduction.ini) is twice as fast (1300 req/sec for hello world) as Apache+modwsgi (650 req/sec). The only difference you may have is using worker MPM instead of pre-fork MPM, and newer versions of apche and modwsgi. In addition, apache is also logging the requests which is an additional overhead that pylons doesn't do in my configuration. But even so I doubt if Apache could match standalone pylons using CherryPy. On Jan 13, 8:36 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: On Jan 14, 3:10 pm, Tycon adie...@gmail.com wrote: Actually I have apache+modwsgi running flawlessly, and everything I said is based on meticulous performance benchmarking and theoretical profiling of deployment architectures. All benchmarks were performed on pylons full stack production mode, with debugging and logging turned off. The test was a simple hello world page with no template rendering, database access or other external links or references. Apache is prefork MPM v2.2.8 with modwsgi 1.3 using python 2.5.2. Old version of mod_wsgi. If using daemon mode of mod_wsgi then 2.X is somewhat faster. Using embedded mode, prefork especially can stuff up benchmarking because the burst in traffic will cause Apache to create lots of additional child worker processes to handle load. Every one of those then has to load application and that can kill machine performance while occurring, interfering with benchmark results. As such, for applications with high load cost, actually better to use daemon mode with fixed number of processes and with worker MPM for Apache. Stripping Apache of unused modules that take a lot of memory, especially PHP, is also advisable. The benchmarks CLEARLY show that using a stand-alone app server is MUCH faster then using apache+modwsgi to serve a page (returned from the aforementioned hello world controller action). When using CherryPy as the HTTP server
Re: Pylons and SQLAlchemy 5.0.
On Tue, Jan 13, 2009 at 3:32 PM, grassoalvaro grassoalv...@yahoo.com wrote: Hi, Can someone tell me how to declare models using sqlalchemy 5.0? When i'm trying something like that: class Worker(object): __tablename__ = 'workers' id = Column(Integer, primary_key=True) and next i'm importing it in model.__init__, command paster setup-app dosn't create declared table. please review the SA documentation it excels at well everything. You are probably trying to use SA declarative which means you classes need to extend declarative base rather than object. As explained here http://www.sqlalchemy.org/docs/05/ormtutorial.html#creating-table-class-and-mapper-all-at-once-declaratively --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Helpers!!!
On Tue, Jan 13, 2009 at 1:26 PM, mk mrk...@gmail.com wrote: Ben Bangert wrote: But output of my own helper is still being escaped. Can you include the helper you're referring to? Your helper might be using a function/class which causes it to escape content. It's really basic: def format_env(env): items = env.items() items.sort() vl = [ %s: %r % (el[0], el[1]) for el in items ] return br\n.join(vl) I use it in a template like this: ${h.format_env(request.environ)} Regards, mk take a look at webhelpers.html, you could make that helper better with it and skip the literal thing. (it does that internally) also I totally agree with Ben. auto escaping will confuse the newbies and they will learn about cross-site scripting. that is great! --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Is Pylons a meta-package ?
On Sun, Jan 11, 2009 at 3:41 PM, Ian Bicking i...@colorstudy.com wrote: On Sun, Jan 11, 2009 at 3:19 PM, Tycon adie...@gmail.com wrote: I guess that means routes can be taken out if I remove the routes middleware and use my own url_for (which I was just about ready to do). So in your assessment a simple hello world on pylons using cherrypy instead of paster (that is my current config) is going to be as fast as just as an equivalent cherrypy (or pretty close, but not twice as slow) ? There's a category error here. There are a few Paste-Deploy-compatible web servers. paste.httpserver and CherryPy's servers are two examples (the two most popular for Pylons users). There's also the flup servers (which aren't http), Spawning, and... some other ones I can't remember now. Whether you choose paste.httpserver or CherryPy's server is up to you, it doesn't affect any other choice. They act almost identically (CherryPy is somewhat faster, paste.httpserver has some debugging tools... maybe there's some HTTP/1.1 features that one supports that the other doesn't, but I haven't kept track). Paste Deploy is a configuration setup to glue together middleware and other components into a single http-serving-wsgi-application. It also lets you select a web server. paster serve takes the Paste Deploy configuration and actually runs it. It's kind of like an app server, but a very small app server. There's not really any runtime over head to Paste Deploy and paster serve -- they just glue things together, but by the time you are actually serving HTTP they are finished with their jobs. hi Ian, is this explanation somewhere in pythonpaste? or somewhere else? I see this being asked a lot in several places (irc, other mailing lists,etc) I'll like to have a link to point to. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Is Pylons a meta-package ?
On Sun, Jan 11, 2009 at 4:40 PM, Tycon adie...@gmail.com wrote: Does WSGI support remote processes (e.g. on other machines) ? If not then it's a dead end for scalability. I don't see any reason to use proprietary protocol when more standard ones exist. I'm only talking about the spec for daemon mode, not the rest of WSGI call spec. wsgi != mod_wsgi. WSGI is a python protocol for app-app communication and contrary to proprietary it is today probably the most used standard in python's web development. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Recommended production deployment (was: Re: Is Pylons a meta-package ?)
On Mon, Jan 12, 2009 at 2:22 PM, Tycon adie...@gmail.com wrote: No, mod_wsgi is a hack. Embedded mode is bad, no serious website is running app server embedded in web server. Daemon mode is even more stupid, an unstable (and non scalable) way of using web server to manage the app server, and invent a new communication protocol between them, when standard ones that support distributed architecture already exist. you are right no self respecting site will use that piece of junk! although I saw this email some time ago http://groups.google.com/group/modwsgi/browse_thread/thread/88de3e07ea574ddb/95612a8e94613bf7 so you may reconsider that statement given this line. Apache/2.2.9 (Debian) mod_python/3.3.1 Python/2.5.2 mod_wsgi/2.3 Server at pypi.python.org Port 80 --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Paster controller command not recognized
On Thu, Jan 8, 2009 at 1:30 PM, Bryan bryanv...@gmail.com wrote: When I run paster controller controller name, i get an error: Command controller not known I have a .egg-info directory, and a paster_plugins.txt file in it with Pylons, WebHelpers, PasteScript inside on separate lines. I own all the files and directories, and am running the paster command inside of the distribution folder. Why can't paster find my paster_plugins.txt settings? paster controller is a package command, which means it won't work unless you are inside a pylons project, I don't remember right now what exactly determines that but it's a functionality of PasteScript --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons and SQLAlchemy 5.0.
On Wed, Jan 14, 2009 at 12:36 AM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Jan 13, 7:07 pm, Jorge Vargas jorge.var...@gmail.com wrote: On Tue, Jan 13, 2009 at 3:32 PM, grassoalvaro grassoalv...@yahoo.com wrote: Hi, Can someone tell me how to declare models using sqlalchemy 5.0? When i'm trying something like that: class Worker(object): __tablename__ = 'workers' id = Column(Integer, primary_key=True) and next i'm importing it in model.__init__, command paster setup-app dosn't create declared table. please review the SA documentation it excels at well everything. You are probably trying to use SA declarative which means you classes need to extend declarative base rather than object. As explained herehttp://www.sqlalchemy.org/docs/05/ormtutorial.html#creating-table-cla... Also, you need to call the method for creating tables (metadata.create_all or something like that); paster doesn't do that for you. Some people do that in websetup.py. well this is the default in 0.9.7. Also you should do that in websetup, because calling create_all is safe but it makes no sense to call it on each startup if it's never going to recreate the tables. while websetup is going to run ones for each deployment. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Recommended production deployment
On Wed, Jan 14, 2009 at 12:54 AM, Jorge Vargas jorge.var...@gmail.com wrote: On Tue, Jan 13, 2009 at 11:51 PM, Tycon adie...@gmail.com wrote: Im using Ubunto 8.04 LTS and running the test using ab -n 1 -c 10 to localhost, in order to focus on the request handling code in the server stack and remove or reduce the weight of all other application logic such as db access and page rendering. This is not supposed to be a realistic timing of a real world request, but a highlight of the differences in efficiency of different request handling stacks including network layer, HTTP and routing code. All software package veriosns I'm using are the versions supplied in the OFFICIAL repositores for the distribution. Pylons and cherrypy were installed using (non)easy-install so their version is the latest rather than a version tied to any official repository. http://code.google.com/p/modwsgi/downloads/list doesn't even lists 1.x anymore as a note official debian package is 2.x http://packages.debian.org/changelogs/pool/main/m/mod-wsgi/mod-wsgi_2.3-1/changelog now it seems ubuntu doesn't has a 2.0 package http://packages.ubuntu.com/hardy/libapache2-mod-wsgi sorry I was looking at the wrong ubuntu version it does have a 2.3 package as shown here http://packages.ubuntu.com/intrepid/libapache2-mod-wsgi but you are still running 1.3 as you posted above, so everything else still stands so your definitive results are totally coerced by the fact that your operating system is running outdated code for modwsgi, in other words you are running the very last version of a software with something that is almost 2 years old. And you expect us to believe it's not bias? lets run firefox 1.0 vs ie 7 today and see who is better, ummm wait bad example. But we are talking about competent projects here. I'm running in a full VM (single core) so I'm pretty sure my results are correct: CherryPy (started using paster serve prodduction.ini) is twice as fast (1300 req/sec for hello world) as Apache+modwsgi (650 req/sec). The only difference you may have is using worker MPM instead of pre-fork MPM, and newer versions of apche and modwsgi. In addition, apache is also logging the requests which is an additional overhead that pylons doesn't do in my configuration. But even so I doubt if Apache could match standalone pylons using CherryPy. On Jan 13, 8:36 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: On Jan 14, 3:10 pm, Tycon adie...@gmail.com wrote: Actually I have apache+modwsgi running flawlessly, and everything I said is based on meticulous performance benchmarking and theoretical profiling of deployment architectures. All benchmarks were performed on pylons full stack production mode, with debugging and logging turned off. The test was a simple hello world page with no template rendering, database access or other external links or references. Apache is prefork MPM v2.2.8 with modwsgi 1.3 using python 2.5.2. Old version of mod_wsgi. If using daemon mode of mod_wsgi then 2.X is somewhat faster. Using embedded mode, prefork especially can stuff up benchmarking because the burst in traffic will cause Apache to create lots of additional child worker processes to handle load. Every one of those then has to load application and that can kill machine performance while occurring, interfering with benchmark results. As such, for applications with high load cost, actually better to use daemon mode with fixed number of processes and with worker MPM for Apache. Stripping Apache of unused modules that take a lot of memory, especially PHP, is also advisable. The benchmarks CLEARLY show that using a stand-alone app server is MUCH faster then using apache+modwsgi to serve a page (returned from the aforementioned hello world controller action). When using CherryPy as the HTTP server for pylons, the req/sec is almost twice as fast as apache+modwsgi. PasteHTTP is 15% slower than CherryPy but still much faster then Apache+modwsgi. Generally contrary results on MacOSX, with both CherryPy and Paste server running quite badly in comparison. On Ubuntu CherryPy runs about the same and Paste server slower. What operating system are you using? Did your tests take into consideration that Apache/mod_wsgi lazy loads application object on first request where as the others preload. This in part plays into why benchmarking results can look bad with Apache/ mod_wsgi, people are actually counting startup costs when they shouldn't. Graham But of course using a stand-alone app-server as the web-server has a few drawbacks: 1. Static files are also served by pylons, which is slow. 2. Cannot use multiple processes, which is required to make optimal use of system resources and allow for scalability across multiple CPUs and multiple machines. So in most cases you will want to have a reverse proxy front-end that acts as a load balancer as well as serve
Re: Best unit testing module for pylons REST api calls
On Wed, Jan 7, 2009 at 2:51 PM, csismondo csismo...@roadrunner.com wrote: I have a controller that I want to build unit test for, the controller is a web-based REST api, and I would like to know what you guys would recommend for a module. http://pypi.python.org/pypi/WebTest/1.1 --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: global h variable
On Wed, Jan 7, 2009 at 1:05 PM, mk mrk...@gmail.com wrote: Hello everyone, I'm really new to Pylons, so could someone please help me clear some of the confusion with the following stuff? I'm trying to access global h variable in Pylons 0.9.7, mainly for sake of getting at url_for function. But h var seems to be available only in Mako templates and not the controller code (at least in 0.9.7). http://wiki.pylonshq.com/display/pylonscookbook/Routes+for+people+in+a+hurry contains example of using h variable without quoting the context, but it may look like controller code (or routing.py). So my question is, what is h variable mainly for? Should I use it in (mainly or only in) templates or are there uses for it in controller code? If so, how to access it there? h stands for helpers, and it's a couple of functions provided by pylons, webhelpers and your own /lib/helpers.py file. as for using them (helpers, not h) on the controller what I do is simply import it, either from webhelpers or your lib/helpers.py As for url_for I think you are breaking MVC a little here, why will you want the URL for another part of your site in the controller? --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: setting the filename for download
On Mon, Jan 5, 2009 at 3:11 PM, m h sesqu...@gmail.com wrote: On Mon, Jan 5, 2009 at 10:20 AM, mk mrk...@gmail.com wrote: Hello everyone, I'm a beginner with Pylons and am trying to set the filename of a file to download in an action (that is, controller method): def environ3(self): msg = list(request.environ.items()) msg = [ str(el[0]) + + str(el[1]) for el in msg ] msg.sort() msg = br\n.join(msg) fname = r'C:\Documents and Settings\Administrator\HelloWorld\helloworld\controllers\re.txt' fapp = fileapp.FileApp(fname, content_type=text/plain, Content_Disposition=attachment; filename=re.txt) fapp.set_content(msg) retval = fapp(request.environ, self.start_response) return retval A few questions: 1. why doesn't fapp.set_content method work? It silently quits, but the actual file downloaded has contents of the file on the disk, not the string I pass to the set_content method. Is there a way to pass the string to have it sent to the browser as file? If I set response.content_type to e.g. application/zip and return the string in the controller, the file with that content gets sent, except it has wrong name. Is there a way to set it? 2. Is there a simpler way to send the desired file with desired name and MIME type? To be frank, the above is a bit of rigmarole. thanks in advance, Marcin Here's what I'm using: response.headers[content-type] = application/vnd.ms-excel response.headers[Content-Disposition] = attachment; filename=%s % xls_filename cheers, yes, in the future please read mailing list archives, this has been asked at least twice in the past month. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: how many people actually use authkit, formbuild or tosca-widgets ?
On Sat, Dec 27, 2008 at 2:19 AM, Tycon adie...@gmail.com wrote: to me it seems like a waste of time to deal with some poorly written, poorly documented, poorly supported library that someone wrote with not much effort. Funny thing people spend way more time trying to figure out and use these libraries then either the time it took to write them or the time they can write their own (or use something better). Tosca especially is silly since there are many more serious widget libraries such as YUI. I can see your frustration, and yes some of them are hard to get when you start, but calling them a waste of effort isn't right. For example. Your ToscaWidgets assertion is totally wrong, YUI is a client-side library, while TW is server-side. So learn before you criticize. So I suggest you either keep the discussion to how can they be improved or asking smart questions or simply stop posting because this is trollish behavior. As you bring nothing productive. Last but not least this is pylons, over here everything is optional. No one told you to use any of them. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: how can I ask routes for all possible urls?
On Thu, Dec 18, 2008 at 11:12 PM, Mike Orr sluggos...@gmail.com wrote: On Thu, Dec 18, 2008 at 8:49 PM, Jorge Vargas jorge.var...@gmail.com wrote: On Thu, Dec 18, 2008 at 4:14 PM, Ben Bangert b...@groovie.org wrote: On Dec 18, 2008, at 7:55 AM, Jorge Vargas wrote: Hi, I'm writing unit tests and I was wondering if there is a way to ask routes for all possible urls it can handle. if this is not, there how hard will it be to implement? Ideally I want to mix this with webtest so I can have a generic test that will tell me if all urls I'm calling are ok, by ok I mean no 400 or 500 errors, I know this is going to be harder for the POSTs but for all the GETs it should be a nice addition to the testsuite. Sort of. You can get all the routes out, and the paths that you setup, that's about it. You'd have to crawl all your controllers, and find all methods that could be gotten to publicly to find every execution path though not exactly ideal. yea I think that is what I'll ultimately do if there isn't a better solution. I honestly don't know routes well enough to know if this is even possible. One alternative solution will be to find all calls to url_for and try to execute them, the other will be to track the @expose, that should give you at least a set where to start that could be manually edited to add proper fields. for example /foo/:bar will be catch by the analyzer, then you could replace that for a set of valid urls that match your test environment, like if :bar is a field in the db, then you could replace that with /foo/validTestData1, /foo/validTestData2, /foo/IDontExist, /foo/validTestData1/, /foo/validTestData2/,, and then pass that list to something like what Mike suggested. There are two issues here. One is whether the routes work; the other is whether all your actions work. I still think you're best off making a separate list of intended URLs. You don't have to test every possible ID, which is obviously impossible, but you can test a few representative IDs, including some with non-word characters. As I said, Routes' internal structure is undocumented, and last time I looked inside it to figure out a resource route issue, it didn't look very straightforward. That's one of my goals with Routes 2 is to make a more reflectable structure. But now that most of Routes 2's features have been backported to Routes 1, and I have plenty of other work the next couple months, I'm not sure how much it's worth pursuing. This is good to heard, I was wondering what happen there. Thanks for the Update. Whenever I start a new project, the first thing I do is draw out the URL structure, and show the sequence of URLs a user would visit to perform typical operations (Go to dictionary, look up word, read definition; Add object, later delete it.) Then I make the routing and then the controllers. What you're talking about is a manifestation of part 1, which can serve both as documentation and as test data. Perhaps Routes should support this, but it currently doesn't. Nevertheless I think it would be helpful to put this as close to the route definitions as possible. Yes in this particular project we started that way, but some changes by some particular developer forced us to change our original structure therefore now we are stuck with a franken-rest-url-structure, so I was thinking that in order to fix our tests I could ask routes to do part 1 from me based on the code so we could back-track from there, to get unittests back in place where they should be. Another idea would be to just put the URLs in a text file, one per line, and then a test tool could just read the file and verify them all. If it ignores blank lines and lines starting with #, the file could also double as documentation. Yes this is what I was referring to when I said scan I was thinking visually not code wise. Thanks for your feedback. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: easy_install pylons
On Thu, Dec 18, 2008 at 8:48 PM, Mike Orr sluggos...@gmail.com wrote: On Thu, Dec 18, 2008 at 5:38 PM, Philip Jenvey pjen...@underboss.org wrote: I haven't tried 3.0 yet, and we're very close to 0.9.7 so I'm not going to require it just yet. Instead we'll require 2.3.2 (which is quite old now, and as you mentioned, is also on pypi) as a minimum. I don't understand why requirements sometimes install a newer viersion than the minimum and sometimes don't. Why do requirements sometimes mean Install this version minimum but take a newer one if it's available, and sometimes Install this version even if there's a newer one? So, Pylons has 'WebHelpers=0.6.3' . I'd hope that would install 0.6.4 if it were available, but last week at work it didn't. I'd prefer the latest version to be installed, but I don't want to make it difficult if people do want to use an older version. But for people who *do* need the newest version (like me), I don't want them to have to upgrade because easy_install chose to install an older version. Yet today when I installed Pylons at home, it installed decorator 3.0.0, in contradiction to Tibor's experience. I believe this is an anti-feature of the package index, since it's supposed to provide a well known set and it's queried before pypi, it gets the best match from the index, and if that's ok then it installs. While it should be get the latest of the latests of any of the URLs. I'm not sure where the bug is, I think it's inside pypi as it's current state doesn't really supports fetching from several URLs, and the 'package index' is simply a workaround to insert more non-pypi packages. -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
how can I ask routes for all possible urls?
Hi, I'm writing unit tests and I was wondering if there is a way to ask routes for all possible urls it can handle. if this is not, there how hard will it be to implement? Ideally I want to mix this with webtest so I can have a generic test that will tell me if all urls I'm calling are ok, by ok I mean no 400 or 500 errors, I know this is going to be harder for the POSTs but for all the GETs it should be a nice addition to the testsuite. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: how can I ask routes for all possible urls?
On Thu, Dec 18, 2008 at 10:32 AM, Mike Orr sluggos...@gmail.com wrote: On Thu, Dec 18, 2008 at 7:55 AM, Jorge Vargas jorge.var...@gmail.com wrote: Hi, I'm writing unit tests and I was wondering if there is a way to ask routes for all possible urls it can handle. if this is not, there how hard will it be to implement? Ideally I want to mix this with webtest so I can have a generic test that will tell me if all urls I'm calling are ok, by ok I mean no 400 or 500 errors, I know this is going to be harder for the POSTs but for all the GETs it should be a nice addition to the testsuite. Routes can't do this. You can create some other iterator that know about all valid URL. Part of the problem is that the internal route format isn't documented. The bigger problem is that if a route path contains a variable, a string of any length could be substituted, so the number of potential URLs is at least 36**N, where N is the maximum URL length whatever that is. And if you have a /{controller}/{action} route (as the default Pylons configuration does), then any two-component URL is valid. I was afraid that will be the answer. My current set of routes is a very simple, it's crud + some methods. so I guess I'm not hitting the wall on the second, which now that you point it out makes the 100% automatic approach invalid. I guess I'll have to build the list a little bit more manually by scanning for references to url_for and redirect in the code base, or maybe build something web spider like. -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons widgets...?
On Thu, Dec 18, 2008 at 1:58 PM, Kevin Baker kba...@missionvi.com wrote: We are starting to build out our templates for a new project. I would like to leverage all the ninja widget functionality in Pylons. Should I be using the toscaWidget stuff? If so I assume I should use some of the tutorials off the Pylons documentation site..? last time I heard TW only had templates for mako and genshi, so you will have to stick to those engines, and yes it is a decent solution for html widgets, for documentation on that you should use www.toscawidgets.org You could also take a look at dbsprockets, which just recently adquired a nice declarative syntax http://code.google.com/p/dbsprockets/ and is getting some nice momentum. then there is formalchemy, which I haven't tried myself but looks really nice http://code.google.com/p/formalchemy/ and last but not least you could throw all that away and enbrace the power of webhelpers. I think those are all the options, if I miss one I'm sorry to the author(s) But yea it all depends on your taste and more importantly your team. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons widgets...?
On Thu, Dec 18, 2008 at 4:12 PM, Julio Napurí Carlos juli...@gmail.com wrote: Uhmm what about rum [1] and RumAlchemy ? Some cool things you might overlook http://rumdemo.toscawidgets.org/ [1]http://toscawidgets.org/documentation/rum/ As Iain pointed out Rum is a, admin tool build on top of TW, it's a reinvention of Catwalk which was TG's original admin-like application, on that front Chris Perkins (who is the author of dbsprockets) has two initiatives of the same type: one is called DBMechanic, which is a table centered admin. And he has been working (in the last 2 weeks I believe) on Catwalk2 which is also a reinvention of Catwalk but works on top of dbsprockets and is a model centric admin. As for history this is how things evolved, and their stability Catwalk is unusable outside of TG1, code is unmaintained and the original author is long gone. So stay away from that. DBsprockets is a toolkit to build forms out of your tables, the basic sprocket could be described as go look for table X exclude fields a,b,c and give me a insert form, it's stable and works nice DBMechanic then is do everything DBSprockets does but for all tables , it's less stable and may get confused with complex models Rum is a SOC project from this year by the author of TW, which is designed to build a totally pluggable admin, in theory you could make a Rumjango, and get it running on django's ORM. although noone has written it, or you could strip out the tw rendering and plug your own. it's still in development and UI isn't customizable, at least not in a simple documented way. DBsprockets declaratives, is a new module of dbsprockets that lets you work directly with classes (it is an analogy to SA declarative syntax, although as declarative you can use it with plain SA), it's very new less than 2 weeks Catwalk2 is DBMechanic for SA classes. It is also very new, but it's a nice POC. and Chris hopes to get it out by tg2.0 final which should be in the first days of Jan. As for the difference between Rum and DBsprockets, it's architectural and you will have to understand at least one to know what is going on different on the other, but they serve the same task. If you want to look at it as a blackbox, it's like templating X and templating Y, they both solve the problem but each has it's advantages and disadvantages. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons widgets...?
On Thu, Dec 18, 2008 at 7:25 PM, Iain Duncan iaindun...@telus.net wrote: On Thu, 2008-12-18 at 17:12 -0500, Julio Napurí Carlos wrote: Uhmm what about rum [1] and RumAlchemy ? Some cool things you might overlook http://rumdemo.toscawidgets.org/ [1]http://toscawidgets.org/documentation/rum/ Rum doesn't replace toscawidgets, it provides an admin app framework to use them in. I think it depends on your priorities, ToscaWidgets are great if: - you want a lot of encapsulated functionality in one abstract object - you value lots of features and control over simplicity of code ( they aren't as simple to understand as some other form building solutions ) - you don't mind unpolished docs and having to ask some questions on mailing lists If you don't have the time to spend getting up on how they work, you'll probably get frustrated. If you do, they're really handy and well supported across various frameworks, and make the process of form creation, validation, and integration with your admin layer very quick. totally agreed. --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: how can I ask routes for all possible urls?
On Thu, Dec 18, 2008 at 4:14 PM, Ben Bangert b...@groovie.org wrote: On Dec 18, 2008, at 7:55 AM, Jorge Vargas wrote: Hi, I'm writing unit tests and I was wondering if there is a way to ask routes for all possible urls it can handle. if this is not, there how hard will it be to implement? Ideally I want to mix this with webtest so I can have a generic test that will tell me if all urls I'm calling are ok, by ok I mean no 400 or 500 errors, I know this is going to be harder for the POSTs but for all the GETs it should be a nice addition to the testsuite. Sort of. You can get all the routes out, and the paths that you setup, that's about it. You'd have to crawl all your controllers, and find all methods that could be gotten to publicly to find every execution path though not exactly ideal. yea I think that is what I'll ultimately do if there isn't a better solution. I honestly don't know routes well enough to know if this is even possible. One alternative solution will be to find all calls to url_for and try to execute them, the other will be to track the @expose, that should give you at least a set where to start that could be manually edited to add proper fields. for example /foo/:bar will be catch by the analyzer, then you could replace that for a set of valid urls that match your test environment, like if :bar is a field in the db, then you could replace that with /foo/validTestData1, /foo/validTestData2, /foo/IDontExist, /foo/validTestData1/, /foo/validTestData2/,, and then pass that list to something like what Mike suggested. Cheers, Ben --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Testing a controller with upload_files ?
On Wed, Dec 17, 2008 at 3:54 AM, Kurt kurt.haeus...@gmail.com wrote: Hi, I have a controller, that takes a normal param, as well as a couple of files as input. It works fine when called from a client, but I am having trouble getting a unit test to work. response = self.app.post(url_for(controller='ff', action='upload'), params={'packxml': packxml}), \ upload_files = [(tempimageid + '.image', tempimagefilename, 'IMAGECONTENTS'), \ (tempimageid + '.icon', tempiconfilename, 'ICONCONTENTS')]) If i only pass in the params, but no upload_files then the packxml param is correctly passed to the controller in request.params. However when I try either the upload_files by itself, or both the params and upload_files, then request.params is empty. My controller would like to access the files as request.params ['id'].value Whats going on here? Are file params passed into the controller in some other structure than request.params? If files are passed in, are normal params also passed in differently? Can both types of params be passed in in the same request using self.app.post? Any tips would be appreciated. are you using webtest?I got equivalent code and it works fine. does it works with only one file? --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Testing a controller with upload_files ?
On Wed, Dec 17, 2008 at 6:22 AM, Kurt Häusler kurt.haeus...@gmail.com wrote: I am using nosetests. If I only pass one file in it does not work. The only combination that works is params only without the upload_files. nose it's a test runner finder not a testing engine in itself, the feature you want to use is either part of webtest or paste.fixture I also tried wrapping the file contents in a StringIO but only a string or unicode is accepted. I also tried writing a real file to disk first and only providing the tag and filename but that didn't help either. On Wed, Dec 17, 2008 at 12:52 PM, Jorge Vargas jorge.var...@gmail.com wrote: On Wed, Dec 17, 2008 at 3:54 AM, Kurt kurt.haeus...@gmail.com wrote: Hi, I have a controller, that takes a normal param, as well as a couple of files as input. It works fine when called from a client, but I am having trouble getting a unit test to work. response = self.app.post(url_for(controller='ff', action='upload'), params={'packxml': packxml}), \ upload_files = [(tempimageid + '.image', tempimagefilename, 'IMAGECONTENTS'), \ (tempimageid + '.icon', tempiconfilename, 'ICONCONTENTS')]) If i only pass in the params, but no upload_files then the packxml param is correctly passed to the controller in request.params. However when I try either the upload_files by itself, or both the params and upload_files, then request.params is empty. My controller would like to access the files as request.params ['id'].value Whats going on here? Are file params passed into the controller in some other structure than request.params? If files are passed in, are normal params also passed in differently? Can both types of params be passed in in the same request using self.app.post? Any tips would be appreciated. are you using webtest?I got equivalent code and it works fine. does it works with only one file? --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: mycompany.myapp instead of myapp as base package ?
On Mon, Dec 15, 2008 at 6:45 PM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Dec 15, 4:27 pm, Jorge Vargas jorge.var...@gmail.com wrote: On Mon, Dec 15, 2008 at 6:07 PM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Dec 12, 7:29 am, Guillaume guillaume.tagl...@gmail.com wrote: Hi, I'm currently developing a set of applications, and I have one problem. They should all reside in the same package. The package structure should look like something like this: mycompany/ +- models | +-base.py | +-metadata.py | +-app1.py | \-app2.py +- app1/ | +- controllers/... | +- helpers.py | +- routing.py | \- wsgiapp.py +- app2/ | +- controllers/... | +- helpers.py | +- routing.py | \- wsgiapp.py \- ... Is something like this achievable with pylons ? Or am I restricted to have one b ase package per application ? Here's the setup/layout I'm using to keep my Core separate from my apps, where the Core contains the model, services, utilities, and anything else that's reusable and/or not specific to a particular application. Note that I use `pkg_resources`, so the `easy_install`/ `setuptools` haters may not like this. Core/ mycompany/ core/ model/ __init__.py ...entity definitions... services/ __init__.py ...service modules... __init__.py __init__.py setup.py SomeApp/ ini/ development.ini mycompany/ someapp/ __init__.py ...other packages and files that import mycompany.core-- e.g., a Pylons app... __init__.py setup.py At the top level, Core and SomeApp are project directories. They contain project metadata, like the setup file, maybe docs, or utility scripts that don't need to be installed with the package. mycompany/__init__.py, in both projects, contains a single line: __import__('pkg_resources').declare_namespace(__name__) When these projects are `easy_install`ed, they end up in separate directories, but there's some magic that makes both of them available from the same namespace, `mycompany`. Of course, the OP's directory layout accomplishes (more or less) the same thing as far as installation is concerned. What I like about this structure is the complete separation of the Core and the various projects that depend on it. In the uber-project I'm working on, I have a (RESTful) Web Service with no GUI built from a stripped down Pylons app and a separate user facing Web App built on a more complete Pylons app. Both depend on the Core. This structure is very useful in helping to keep things straight and enforces a separation of concerns. I'm using the Web Service app as a sort of app server--a remote interface to the Core model and services. The Web App focuses on the user experience, and whenever I start building some core functionality there, I refactor it into the Core package and expose it through the WS. I haven't been using `paster shell` with this project, but I just ran it in my SomeApp directory and it seems to work as expected. This is what's call a namespaced package, and yes I totally agree it's very handy all BIG projects out there use it there is even a tool to create it, BUT it breaks paster shell as it can't find the model due to the fact that development.ini isn't in the same package, I know the problem we just haven't had time to fix it as this is nice to have but not a priority. Here is a nice writeup on how to use the tool + another good explanation on why this is a good thing,http://www.percious.com/blog/archives/13 Does it break `paster shell`? When I run `paster shell` with this setup, it loads everything correctly, as far as I can tell. If you import your model into your Pylons app's lib/base.py, `paster shell` will load it. Otherwise, you can just do a `from mycompany.core import model` in paster shell. I don't see what's broken about that--it seems like `paster shell` is just doing some imports for you as a convenience (amongst other things). Also, I don't see why it matters where your INI file is located. In fact, when you create a new Pylons project, the INI files aren't technically in a package--they're in the project directory. Are there other aspects of `paster shell` that are broken when using namespaced packages? I'll take another look at this on the project I'm referring to I wasn't the one that namespaced it nor have I look deeply into the project. I took it for granted I'll take a look to see if our setup is different than yours and report back. --~--~-~--~~~---~--~~ 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
Re: mycompany.myapp instead of myapp as base package ?
On Mon, Dec 15, 2008 at 6:07 PM, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: On Dec 12, 7:29 am, Guillaume guillaume.tagl...@gmail.com wrote: Hi, I'm currently developing a set of applications, and I have one problem. They should all reside in the same package. The package structure should look like something like this: mycompany/ +- models | +-base.py | +-metadata.py | +-app1.py | \-app2.py +- app1/ | +- controllers/... | +- helpers.py | +- routing.py | \- wsgiapp.py +- app2/ | +- controllers/... | +- helpers.py | +- routing.py | \- wsgiapp.py \- ... Is something like this achievable with pylons ? Or am I restricted to have one b ase package per application ? Here's the setup/layout I'm using to keep my Core separate from my apps, where the Core contains the model, services, utilities, and anything else that's reusable and/or not specific to a particular application. Note that I use `pkg_resources`, so the `easy_install`/ `setuptools` haters may not like this. Core/ mycompany/ core/ model/ __init__.py ...entity definitions... services/ __init__.py ...service modules... __init__.py __init__.py setup.py SomeApp/ ini/ development.ini mycompany/ someapp/ __init__.py ...other packages and files that import mycompany.core-- e.g., a Pylons app... __init__.py setup.py At the top level, Core and SomeApp are project directories. They contain project metadata, like the setup file, maybe docs, or utility scripts that don't need to be installed with the package. mycompany/__init__.py, in both projects, contains a single line: __import__('pkg_resources').declare_namespace(__name__) When these projects are `easy_install`ed, they end up in separate directories, but there's some magic that makes both of them available from the same namespace, `mycompany`. Of course, the OP's directory layout accomplishes (more or less) the same thing as far as installation is concerned. What I like about this structure is the complete separation of the Core and the various projects that depend on it. In the uber-project I'm working on, I have a (RESTful) Web Service with no GUI built from a stripped down Pylons app and a separate user facing Web App built on a more complete Pylons app. Both depend on the Core. This structure is very useful in helping to keep things straight and enforces a separation of concerns. I'm using the Web Service app as a sort of app server--a remote interface to the Core model and services. The Web App focuses on the user experience, and whenever I start building some core functionality there, I refactor it into the Core package and expose it through the WS. I haven't been using `paster shell` with this project, but I just ran it in my SomeApp directory and it seems to work as expected. This is what's call a namespaced package, and yes I totally agree it's very handy all BIG projects out there use it there is even a tool to create it, BUT it breaks paster shell as it can't find the model due to the fact that development.ini isn't in the same package, I know the problem we just haven't had time to fix it as this is nice to have but not a priority. Here is a nice writeup on how to use the tool + another good explanation on why this is a good thing, http://www.percious.com/blog/archives/13 --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: mycompany.myapp instead of myapp as base package ?
On Fri, Dec 12, 2008 at 5:49 PM, Mike Orr sluggos...@gmail.com wrote: On Fri, Dec 12, 2008 at 3:22 PM, aaron tacob...@gmail.com wrote: I have a setup like this, which seems to work ok, except for one major issue: paster shell doesn't work. So, our entry points in setup.py: entry_points={ paste.app_factory: [main = mycompany.myapp.config.middleware:make_app], paste.app_install: [main = pylons.util:PylonsInstaller] } When I run paster shell, I get the error: ImportError: Could not import base module. Are you sure this is a Pylons app? I can fix this by manually editing top_level.txt and adding mycompany.myapp... but this is a pain to do this after each run of setup.py. Is there a fix for this? or is it a bug? The whole way Setuptools works is a bug, and the fact that package management isn't built into Python is another bug. Entry points have a way of sometimes working and sometimes not, and when pkg_resources.require() fails it tells you what it was looking for but not who was asking for it, so it can be hard to track down where the dependency is. So one should just be happy it works at all. In this case it says Pylons in the error message so there's a little more to go on. $ grep -r 'is a Pylons app' ~/hg/Pylons/pylons | egrep -v 'Binary|\.pyc' /home/mso/hg/Pylons/pylons/commands.py: this is a Pylons app?) Here's the source: === # Import all objects from the base module base_module = pkg_name + '.lib.base' found_base = can_import(base_module) if not found_base: # Minimal template base_module = pkg_name + '.controllers' found_base = can_import(base_module) if not found_base: raise ImportError(Could not import base module. Are you sure this is a Pylons app?) === So you may not be able to do your applications-under-a-namespace idea without hacking Pylons. If your goal is to share a model, it would make more sense to put the model in a separate package and make both applications depend on it. I just wanted to say I have this exact same problem. With a project we decided to namespace, our current solution is to not use paster shell, due to the setuptools problems Mike outlined --~--~-~--~~~---~--~~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Django or Pylons - comparison details
On Mon, Dec 8, 2008 at 3:54 AM, Krishgy [EMAIL PROTECTED] wrote: If your questions needs to be answered quickly, Django may be right choice. I think, you could have known why not to use PHP when you ask question on Django vs Pylons :-) . I NEVER worked on Python at jobs. I wanted to create a website. I have chosen Pylons over Django due to its customization feature luxuries. I have gathered small small frustration while working due to lack of documentation community support. I am very thankful for people who helped me in some cases. I spend more time on Pylons. Now I don't have time interest to learn another framework. I have to go with Pylons. All I would ask seniors/library developers of pylons to respond to the questions asked by newbies like me. Let the newcomers to feel good about using Pylons by heart. I REALLY don't understand what do you people mean by marketing Pylons. I tried to use authkit in my project, which is evil in my project life. I asked many questions here but got no reply. I do not expect such a thing from a matured community. that is because a) the author or authkit is never around b) authkit is way over complicated c) autukit sucks in other ways d) all of the above. that said, I do think that a default auth should be added to pylons, as it's a pretty common feeture but that's another discussion. if you hate your tool then change it. Now don't come back complaining that django wants you to do things in X,Y and Z way, and even if that's bad/dumb/not-the-best you will expend way way more time trying to get around it. Things are changing but very slowly. Sorry about my English. On Dec 7, 5:30 am, Mike Orr [EMAIL PROTECTED] wrote: On Sat, Dec 6, 2008 at 10:39 AM, Ben Bangert [EMAIL PROTECTED] wrote: On Dec 6, 2008, at 9:31 AM, zunzun wrote: Comparison before starting a project, used to decide which framework to use. Django: according tohttp://groups.google.com/group/django-users/about Members 12,016 Group Activity is High Pylons: according tohttp://groups.google.com/group/pylons-discuss/about Members: 1,748 Group Activity is Low Really? That's how you decide? Then I believe you *must* choose PHP. It completely dwarfs Django and Python altogether, its the only choice really if you want to determine framework based on user-base (popularity). :) Excellent answer. Pylons 0.9.7 is almost released, the main issue being finishing the documentation. In the meantime, the Pylons Book is pretty complete and covers the RC version. It's an axiom of open-source programming that the last 10% of a release takes N months longer than anticipated. N = 5 and counting for Pylons, and it has been 12 for both Django and Cheetah in the past. Django's popularity is mainly due to superior marketing and documentation. They have a corporate backer and thus more people with those skills. Pylons' developers are mainly hackers/web programmers, who would rather build software than do marketing. So many people have not heard about Pylons or its voice gets drowned out. But Pylons has particular favor among those who like extremely modular tools, and those people have been coming to us. An interesting question is, why did [any framework's] users choose it? Django: - technical capability: same as Pylons/TurboGears. Not a reason to choose one over another. - design philosophy: build our own tools so it's well integrated. Some number of people like this. - completeness of toolset: if you need CMS tools, there may be some that are only available in Django and Plone currently. - tutorials: I read Django's docs and they were easy to understand. A lot of people cite this. - marketing: It seems everybody's using Django. or I didn't know there were any other viable Python frameworks.: A lot of people say this. Pylons: - technical capability: the same. - design philosophy: use 3rd-party tools when feasable, WSGI to the core: many Pylons' enthusiasts come from this mindset. - completeness of toolset: the basic stuff is all there and then some. - tutorials: it takes a bit of work to find the relevant documentation. For 0.9.7, the Pylons Book is your best bet right now. For 0.9.6, the official docs are good. - marketing: there will be a stronger marketing push after 0.9.7 is released and the new website is finished. Guido van Rossum has blessed Django here: http://www.djangoproject.com/weblog/2006/aug/07/guidointerview/ That was written two years ago. At the time Guido also hoped Django and Pylons would merge. I don't think he understood the situation very well at that point, because Django and Pylons can't merge without one of them giving up its fundamental philosophy. And the ascent of WSGI makes a merger less necessary: what's needed is interoperability. Django has had a weakness on that point, but it's gradually getting better as it moves closer to WSGI. In any case, Guido now
Re: Pyjamas : Python - JS
On Sat, Dec 6, 2008 at 3:39 AM, Wichert Akkerman [EMAIL PROTECTED] wrote: Previously Eric Ongerth wrote: I have heard that the more you try to make Javascript behave like Python, the more you end up hating Javascript -- but that says nothing about Javascript itself. Javascript is really a different language, with different strengths. Perhaps the best plan is to use Javascript for its strongest points (for example instant-turnkey use of JSON, totally anonymous objects, function mutability, etc.) and do your more Pythonic tasks in Python. Pylons makes it quite easy to leave as much of your logic as you wish in your controllers and keep your client- side view code very very thin. Especially if you use a lightweight, concise JS framework like jQuery to help keep things readable and organized. That still leaves the case of the programmer who says, I want to keep as much logic as possible on the client side to ease my server load, but I hate Javascript. In that case I don't have any good advice. Choose a new carreer :) indeed The claim that Javascript become[s] quickly unreadable for even medium-sized applications really reflects only on the individual programmer/developer and not on the language, honestly. Javascript does not deserve to be compared to (e.g.) php, an unruly beast that literally encourages a mess. Javascript is, at worst, neutral with respect to organization; at best it embodies the heights of abstraction, encapsulation, and readability. It's all up to you. A problem with javascript is that most people using it never get beyond writing tiny bits of code to perform a single effect on a page. With new frameworks making that even simpler that is even more true now than it was a few years ago. But once you get beyond that you will indeed see that javascript is a very nice and fun language. I actually disagree there, javascript (IE the spec and all non-browser interpreters) is a very nice language, just as nice as python and sometimes a bit better with some of it's tricks. But the problem is when it comes to implementations all those libraries are there because it's totally horrible to get all the tiny details fixed. The other big problem with JS is that it's bound to the browser therefore the dom therefore you have to have wrappers around everything to make it work. So basically most people are afraid of it, rather than amused. That said I really think a JS wrapper in JS is better than a JS wrapper in python or whatever language for that matter. Any DSL which is pretty much what all the libraries have become is way better than having a half baked parser/compiler/runtime to generate code from language A into language B --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Pyjamas : Python - JS
On Fri, Dec 5, 2008 at 5:15 AM, Kless [EMAIL PROTECTED] wrote: I've looking for any bridge between python and JS to building easily the user interfaces (client side). --I dislike JS, and it's heavy to have to know and deal with HTML, CSS JS and the API of any JS framework-- Ago time I had seen Pyjamas [1], a stand-alone python to javascript compiler, an AJAX framework / library and a Widget set API. It already has been released a stable version (0.4) Even though I agree with you on principle, JS sucks (runtimes not the language) and having to sync your code across 4-5 files sucks. I don't think this is the right solution, code generation is at best ugly, at worst totally useless. That said it's a valid alternative and some applications may benefit from it. I found a great article [2] about it and in general about programming on client side. What do think about pyjamas? I think that would be fantastic developing all web application into a same language, in addition it could speed up enought the time on developing. I would to know if Pyjamas could be easily integrated on Pylons. [1] http://pyjamas.sourceforge.net/ [2] http://advogato.org/article/993.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Authentication methods for a mercurial controller
On Thu, Dec 4, 2008 at 10:59 AM, Thomas Johnson [EMAIL PROTECTED] wrote: I am working on implementing a mercurial controller in my application. So far I am able to clone and pull from it without any troubles. I only push via ssh so I am not sure if it is supported. Here is a simplified version of what I am using - http://pylonshq.com/pasties/1022. Anyways, I would now like to implement authentication for clones/pulls and was wondering if you guys have any suggestions as to a good method e.g. basic auth, digest, etc. hello, auth for mercurial is done independently of the system so the answer is that your auth works for everything else. I have been playing around with the code from twsite (tosca widgets site) and had a bug with paste.auth (which it uses) + mod_wsgi you can google for those mails at the mod_wsgi list, but it works really well for mod_proxy + paster setup I currently have plans to migrate it's auth to repoze.who/what but that's after I'm done with some intensive work i'm stuck into now. here is the clone for the site, it's a pylons app so all you have to do is understand it's controller. it even has methods for creating repo's over the web, very handy :) I got some non-public changes on my local mercurial repo which upgrade it in small ways, nothing fancy yet but if you are interested I could push it somewhere. Alberto already said I should do it at the tw site but I haven't yet. anyway here is the link http://toscawidgets.org/hg/twWebSite/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Running mulitple versions of Pylons apps with shared hosting.
On Mon, Dec 1, 2008 at 7:52 AM, Dalius Dobravolskas [EMAIL PROTECTED] wrote: Any help would be appreciated. virtualenv should help you. I have not used myself virtualenv for hosting yet but I think that's one purposes it is created for. yes totally, I don't deploy anymore without venv. Hey they even have docs on it http://wiki.dreamhost.com/Python --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: HTTPS connection support in soaplib/client.py
On Mon, Nov 17, 2008 at 4:50 PM, miaw [EMAIL PROTECTED] wrote: Hi, I found that although HTTPSConnection is implemented in httplib.py; in soaplib/client.py, when make_service_client is called, we are not able to pass a scheme argument to specify which type of connection we want to build and it always go to HTTPConnection in SimpleSoapClient by default(see line 132 in client.py). I think we need to have make_service_client take another argument scheme, which can be default to http, to create the connection we want. Any comment or idea? Thanks. this question should go to the ZSI mailing list. Miaw --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Pylons and Python 2.6 (Was: Re: go-pylons.py broken on Python 2.6 in Windows?)
On Tue, Nov 18, 2008 at 2:22 AM, Lawrence Oluyede [EMAIL PROTECTED] wrote: On Tue, Nov 18, 2008 at 8:35 AM, Eric Ongerth [EMAIL PROTECTED] wrote: Correction: the point at which easy_installing Pylons errored out was during the installation of simpleJSON. So it never reached the point of installing paste, pastescript, pastedeploy etc. Hey, I thought Python 2.6 includes the former simpleJSON as the new json module. No? It does: http://docs.python.org/library/json.html but simpleJSON is compatible with older versions of python, so it should be prefered for compatibility issues. Also I remember reading that the py2.6 version didn't had the c speedups module therefore until py2.6.1 it is still recommended to use the thirdparty package. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Paster Shell Debug
On Mon, Nov 17, 2008 at 6:02 PM, nym [EMAIL PROTECTED] wrote: I'm having no luck in trying to get paster shell to log messages. If I have a model that logs a message, where does that message go? Do I need to enable logging somehow? I have no problem logging with regular requests. This is my handler_console currently: [handler_console] class = StreamHandler args = (sys.stderr,) level = NOTSET formatter = generic I have never tried it but I believe logging config is not loaded with shell. Thank you, nym --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: End URLS in slash?
On Wed, Nov 19, 2008 at 2:43 PM, Randy Syring [EMAIL PROTECTED] wrote: On Nov 19, 2:20 pm, Raoul Snyman [EMAIL PROTECTED] wrote: On Wed, Nov 19, 2008 at 7:05 PM, Mike Orr [EMAIL PROTECTED] wrote: Looking at your modules, I didn't know Routes had an .append_slash option but that could be throwing it off. There's no reason to put slashes at the end of URLs except to make it look like a directory to the user, but even then it's not necessary (/messages and /messages/1234 work fine). I prefer ending urls with / :-D This is somewhat off topic, but I used to prefer the above too. Then I had a page referenced by that type of URL that needed query string arguments. I ended up with a URL like this: example.com/this/page/?foo=bar Having the whole /? thing just killed this idea for me. Now all my routes specifically do not end in a slash. Anyone else have thoughts on this? I don't remember where I read it but URLs ending with / are supposed to be directories so the above behavior is wrong for webapps. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Zipping Pylons components on App Engine
On Fri, Oct 24, 2008 at 3:19 AM, Mike Orr [EMAIL PROTECTED] wrote: I tried zipping some eggs for Pylons under Appengine-Monkey today., For some reason the App Engine environment seems to honor directories listed in a .pth file but not zips listed in a .pth file, so I had to put the zips individually into sys.path. So that was one step. A comparision by disk space comes in pretty much the same order. I couldn't believe Pylons had some many files so I looked at them. The largest chunk are images for the error pages, application templates, and tests. This happen in Turbogears too back when we first find out about the 1000 files limit, and started working towards getting this working on appengine (of course that won't happen until pylons can) but some of TG is already going this way. It was decided to split the package into two, that is why you currently install tg.devtools and turbogears2. The idea is that anything related to paster (templates and commands currently) is only useful in development environments (like the GAE sdk), but it's just cruft on the deployment (real GAE), this made the tg package less than 20 files + tests, which can be stripped of a deployment egg if needed. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Start action at the specific time.
On Sat, Oct 25, 2008 at 6:06 AM, gra2n [EMAIL PROTECTED] wrote: Is there posibility to start some action at specific time in Pylons without user action ?? For example I have in my database a group of things to do and time when to start doing them. My problem is to implement function which check from time to time if there is planned operation and start this operation. I think that something like that should be possbile to do but I don't know how. This is outside of the scope of pylons, ideally you should have it done totally outside of the webserver. Either with a cron job, the python's scheduler module [1] or another sort of standalone script, Turbogears1 has this [2] and it could be used standalone, in fact it's some imported code with minor modifications. so in the end you will have to use a combination of the alternatives. You should start by looking at the using the model outside pylons page [3], then i'lll recommend writing a python script (without sched or tg1 scheduler) and then using cron to do the job, or write it in full python that's your call. [1] http://www.python.org/doc/2.5.2/lib/module-sched.html [2] http://docs.turbogears.org/1.0/Scheduler [3] http://wiki.pylonshq.com/display/pylonscookbook/Accessing+your+model+outside+of+Pylons --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Displaying Data in a grid
On Fri, Oct 17, 2008 at 8:10 AM, Matt Feifarek [EMAIL PROTECTED] wrote: On Fri, Oct 17, 2008 at 5:12 AM, Toby Catlin [EMAIL PROTECTED] wrote: I am sure this has been done before but i am having trouble finding any references to existing code. As i don't want to reinvent the wheel i was hoping someone could point me to the right place. I have been building a reporting tool and i need to display lists of objects in some form of grid. The objects are very similar to those that would be returned from a database query eg: testId testName elapsedTime etc.. I simply need to display these values, preferably with paging. I guess that this would be very similar code to CRUD code. You won't find anything in the docs; Pylons isn't that high-level. Perhaps TurboGears might have that sort of code in it. With Pylons, I've been working quite lately with the Yahoo UI libraries: http://developer.yahoo.com/yui/datatable/ So far, it looks pretty promising. It's roll-your-own, but it's pretty easy to hook the pieces together. The Yahoo engineers seem to have thought of just about everything, so it becomes just a matter of providing the data from your model via a controller to the AJAX call. yea they are plenty of solutions out there. - all JS toolkits have one, just google for name + grid in pure python you have - toscawidgets (tw.grid) - formalchemy (not exactly a simple grid) - build your own it isn't really complex if you just want to show data. Just pass in a list of dicts to the template and a headers and build it out with something like this table for row in rows: tr for field in row tdfield/td /tr /table Good luck. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Pylons: pros and cons
On Wed, Oct 15, 2008 at 2:11 PM, Mike Orr [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 10:25 AM, Jorge Vargas [EMAIL PROTECTED] wrote: On Mon, Oct 13, 2008 at 10:11 PM, Mike Orr [EMAIL PROTECTED] wrote: On Mon, Oct 13, 2008 at 9:14 AM, Tomasz Nazar [EMAIL PROTECTED] wrote: Is reason other than problems with pure Python imports (which don't work well for recursive dependencies)? Circular imports work but you have to put the lines in a certain order. If module A imports module B, and module B imports module A *and* in its top level code accesses something in module A, that something has to be created in module A *above* the import B statement. Otherwise, at the moment module B needs it, it doesn't exist yet. If you do all your attribute access inside functions, this doesn't matter because both modules are fully initialized by the time the function is called (as long as it isn't called at the top level of the module). Rather than having to carefully order their lines of code, most people prefer to just avoid circular imports. So they make small base modules like 'meta' and 'errors' that everybody can import, but which themselves import only the Python standard library. the underlaying problem is that if you want to make your models available as model.Obj instead of model.obj.Obj you need to provide this magic with the meta.py and __init__.py if you will reference everything in a java-like form, then you can get rid of the imports in model and everything works fine, but then you don't have the flexibility of reorganizing stuff inside the model package without breaking your client code. Bottom line it's a very handy feature that require a little obscure code, and by obscure I mean it's not logical at first glance not that is complex code. Forgot to address the issue of how Python imports differ from Java. In Java the import is just a syntax shortcut to avoid having to type the module prefix. If the module (class) is used anywhere, the compiler automatically loads it, with or without import. In Python, the module is not accessible unless you import it in every module that depends on it. import is also an executable statement (as opposed to a compiler directive like global), which means that it matters where you put it: the item is not accessible before you execute the import but it is accessible afterward. Technically, the first time a module is imported, it's loaded and assigned a key in sys.modules. If you import it multiple times, the memory copy is used directly rather than reloading the code. But even if the module is loaded, it's not *accessible* unless you import it . (Or sneak into it with 'module = sys.modules['the_module]'.) ok I think you are mixing two things here. #1 crud - as in code generation #2 admin interface - as in a real way to update models I was really talking about an admin interface, or something that could be plugged into a program, not code generation. BTW, a complete Admin interface should also stop and restart the server, view logs, manage users and permissions, etc. Managing users is only feasable if the application uses a standardized user model, but the other features are generic to any Pylons application. Zope has this kind of admin interface, and ideally it should be available for Pylons too. That's what I thought TurboGears was interested in building. That's a very nice long term plan. And I think rum is a good candidate for it. the user permissions is what I find the hardest as a standardized model is something that isn't possible in most applications. At most I'll say provide something that will inspect your model classes and work from there, which is what rum does but currently doesn't handles it any different from any other table. Stopping/restarting the server would have to be done in Paste, so it would need a method in Paste that Pylons could call. that could be interesting, although it means the admin will have to run standalone in it's own port, again something rum is able to do. I think most of the parts you suggest are already in place it's just a matter of sitting down and add the glue, although I do think that ones it happens people will complain that it isn't flexible enough. According to Adrian's talk at PyCon this year, Django's CRUD interface should theoretically run on Pylons. Somebody just needs to test it and write a HOWTO. Ben and I thought it would be coming soon, but it got lost among all the other work finishing up 0.9.7. django-admin? how will it know about all the model configuration stuff? is there any links anywhere that suggest how it should be done? last time I heard django's sqlalchemy compatibility was in an abandoned branch. Also I assume you still need to install the whole tarball to get it running. I don't know how since I've never used Django. But Ben thought it would be possible with some work. Me neither I have just play
Re: Pylons Authentication Options
On Wed, Oct 15, 2008 at 4:30 PM, Mike Orr [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 3:29 PM, Mike Orr [EMAIL PROTECTED] wrote: On Wed, Oct 15, 2008 at 3:22 PM, MilesTogoe [EMAIL PROTECTED] wrote: Mike Orr wrote: On Wed, Oct 15, 2008 at 11:03 AM, Steven [EMAIL PROTECTED] wrote: I'm a newbie trying to get a grasp on what options I have for Authentication and Authorization. From reading the docs and the pylonsbook.com I've found 2 options so far: repoze.who (ported from Zope) AuthKit (work in progress? ) Are there others? paste.auth, but that's almost a build your own framework. Building your own is popular. I have a login form and a two-mode authentication that uses LDAP or a database depending on the username's syntax. I have several classes called Permsets (permission sets) with boolean attributes to describe what permissions a type of user has. Then I have a require_perm() function that takes the expected permission name and arguments, and aborts 403 if forbidden. My base controller has a .__before__ that does authentication, and controllers can have a class attribtute describing the most lenient permission common to all the actions. Then individual actions can do more restrictive tests; e.g., can the user view or edit a particular database record? A companion function has_perm() tells whether something is alllowed, which tells me whether to generate links to restricted pages. If you want to use Basic Authentication rather than a login form, you have to look up the proper HTML statuses and headers to trigger it. That's where repoze.who and AuthKit come in especially handy tcause they do all that for you. wondering how this is read between pages - it seems like wsgi middleware has a lot to offer here but aside from packages such as beaker, haven't seen much write up on it. If you haven't already, this would make a good pylons cookbook recipe since it's one of those core functions that most have to do. I haven't used either system so somebody else would have to do this. Oh, you mean my system? Yeah, I can do this, but I've got a deadline this week so it won't be till later. That will be great. I haven't used authkit, but from the comments in this list it seems complex to work with, to put it simple. As for repoze.who it's great I like it a lot but something it fells like overkill. -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Pylons: pros and cons
On Mon, Oct 13, 2008 at 10:11 PM, Mike Orr [EMAIL PROTECTED] wrote: On Mon, Oct 13, 2008 at 9:14 AM, Tomasz Nazar [EMAIL PROTECTED] wrote: Hi there! I've been a Pylons user for more than a year already. Few other people in the neighbourhood ask me for Pylons advantages often, so I also talk about Pylons disadvantages also. Here I'd like to point out some of them and ask you for your opinion/answer.. (basically I'm a happy Pylons user :) ) It may also be hard to define things below as related to Pylons only, as Pylons is often just a glue to other frameworks (aka SQLA..). Nevertheless full Pylons books contains several chapters treat about these, so let me also point them out. Most of the feature you suggest aren't part of pylons because they depend on a style of programming that may not fit everyone. But most of the things you need are actually build into TG2, except the SA catching, which as Mike suggested isn't really needed in the SA/web world. Here goes: 1) all model classes are defined in 1 file together with database mapping That is 2nd most frustrating on my daily work. Even in Pylons tutorial you've advised to mix all the code together in models/__init__.py. Business logic in my small app contains more than 3K of code and is in a single file! I already moved out DB SQLA mappings into separate file, but that's just a tip of the iceberg. So I ask: why is that? Each model class should be in a separate file (aka Rails, java frameworks, etc) It was not the developers' intention to force everything into one module. The default configuration was chosen to address a wide variety of needs both large and small, and to be a starting point for making your own customizations. The 'meta' module was created to make it easier to keep your classes in separate files, so that they could all import 'meta' and avoid importing 'model' circularly. SQLAlchemy models are intrinsically difficult to organize because there are three different parts (tables, classes, mappings) -- and Session configuration is a fourth part. Which module structure is best? People have different ideas and we couldn't come to a decision, so we just made the simplest configuration that would work. The next version of the SQLAlchemy configuration will default to SQLAlchemy 0.5's Declarative structure. This will bring the three parts together again, and perhaps make it easier to organize your classes per module without having to import as much. TG2 default model templates work like this, it does a little magic in order to prevent the circular imports issue but the code is really simple. And can be ported almost directly to pylons http://svn.turbogears.org/projects/tg.devtools/trunk/devtools/templates/turbogears/+package+/model/ Is reason other than problems with pure Python imports (which don't work well for recursive dependencies)? Circular imports work but you have to put the lines in a certain order. If module A imports module B, and module B imports module A *and* in its top level code accesses something in module A, that something has to be created in module A *above* the import B statement. Otherwise, at the moment module B needs it, it doesn't exist yet. If you do all your attribute access inside functions, this doesn't matter because both modules are fully initialized by the time the function is called (as long as it isn't called at the top level of the module). Rather than having to carefully order their lines of code, most people prefer to just avoid circular imports. So they make small base modules like 'meta' and 'errors' that everybody can import, but which themselves import only the Python standard library. the underlaying problem is that if you want to make your models available as model.Obj instead of model.obj.Obj you need to provide this magic with the meta.py and __init__.py if you will reference everything in a java-like form, then you can get rid of the imports in model and everything works fine, but then you don't have the flexibility of reorganizing stuff inside the model package without breaking your client code. Bottom line it's a very handy feature that require a little obscure code, and by obscure I mean it's not logical at first glance not that is complex code. Why: __init__.py -- there are lot's better names. Also, when one uses IDE and tries to find (by incremental file search) __init* there are many of them. Name it domain.py or model.py And finally: any Python ways to split _my_ big file? __init__.py is a Python language feature, and there's nothing the Pylons developers can do about it. (Except switch to Ruby :). hehehe rulons 3) flash messages : data persisted somewhere between http session and http request, which lives through one session of http redirects, but then is purged. I often need that, as I place some common controller logic in some controllers. Say: home.py:home which redirects to home.mako, and loads complete
Re: Where is secure_button_to in new WebHelpers 0.6.1
On Sun, Oct 12, 2008 at 6:45 AM, Jan Koprowski [EMAIL PROTECTED] wrote: Hi ! I am unsurprised to CSRF security generators. I can't find anywhere secure_do_button. Last implementation is in rails module which is deprecated. Any idea ? isn't that in html/secure_form.py ? Greetings from Polan ! Jan Koprowski --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
non rails number_to_human_size ?
Is this not implemented or I miss it somewhere? if it isn't implemented I think that the rails version is good enough to be ported to number.py --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: non rails number_to_human_size ?
On Tue, Oct 7, 2008 at 4:26 PM, Mike Orr [EMAIL PROTECTED] wrote: On Tue, Oct 7, 2008 at 7:58 AM, Jorge Vargas [EMAIL PROTECTED] wrote: Is this not implemented or I miss it somewhere? if it isn't implemented I think that the rails version is good enough to be ported to number.py It was left out for a few reasons: - There were multiple slightly different implementations (the other is in WebHelpers*.egg/unfinished/helpers.py written by James), and I wasn't sure which API was best. oh my grep didn't catch that one as I have a released webhelpers in this project. - I wasn't sure if the function was universal enough and non-trivial enough to warrant being in WebHelpers. true, but the same could be said of the other number_to_* functions, for example number_to_phone is useless in my country but that doesn't means it is useless everywhere. - human size is not an accurate function name. The terms are generally applied to computer hardware, and are perceived as precise scientific terms rather than colloquial (human) terms. correct. I like how James's helper supports both binary units (base 1024, GiB) and decimal units (base 1000, GB), but I don't like how you have to pass a list of units to every call, or how the units can get out of sync of the 'binary' flag. The rails helper does not support decimal units at all. The rails helper has a ``precision`` argument that's inadequately documented (what exactly does it do?). James's helper has a ``digits`` argument, meaning the total number of digits on either side of the decimal point. I'm not sure if that's the right approach either. Should it be the number of digits after the decimal point? yea I didn't understood that. although I just need a simple representation so the default was ok I would tend to support a function something like this: def format_size(n, binary, precision?) ``n`` -- the number ``binary`` -- true to use base 1024 and the Gi series. ``precision`` -- not sure about this But then there's the question of bits (b) vs bytes (B), and people wanting the whole word spelled out, etc. So what do y'all suggest? -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: non rails number_to_human_size ?
On Tue, Oct 7, 2008 at 4:43 PM, Mike Orr [EMAIL PROTECTED] wrote: On Tue, Oct 7, 2008 at 3:26 PM, Mike Orr [EMAIL PROTECTED] wrote: def format_size(n, binary, precision?) ``n`` -- the number ``binary`` -- true to use base 1024 and the Gi series. ``precision`` -- not sure about this But then there's the question of bits (b) vs bytes (B), and people wanting the whole word spelled out, etc. Perhaps this: def format_size(n, binary, suffix=B, fullname=False, precision?): format_size(5000, False) 5 MB format_size(5120, True, bytes) 5 Mibytes format_size(5000, False, bytes, True) 5 megabytes What should ``binary`` default to, or should it have a default? That sounds really good it goes from the most simple case to the most complex. I'll set a default to binary so. As people are more familiar with Bytes than bits def format_size(n, binary=False, suffix=B, fullname=False, precision?): format_size(5000) 5 MB format_size(5120, True,bytes) 5 Mibytes format_size(5000, suffix=bytes, fullname=True) 5 megabytes I'm still puzzled by the name, why not format_computer_size? or format_data_size, format_size may as well be sizes of clothing. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: newbie Oct 2008 - v0.9.6.x or 0.9.7 ?
On Sun, Oct 5, 2008 at 8:49 PM, Emmett [EMAIL PROTECTED] wrote: Pylons newbie here. Followed the docs.pylonshq instructions and therefore installed 0.9.7, learning rapidly in the past couple of days. I like it. Especially the WSGI concept. I like Python a lot, and now this framework (some of the code) has really opened my eyes to how expressive and powerful Python can be. Today noticed that the tutorials dont work (Flickr and Quickwiki) which need the javascript stuff in webhelpers v0.6. To keep learning I'll setup a python virtual env running 0.9.6.2 for the tutorials. yes they where removed due to being outdated, so all that js related code will have to be ported back to plain old javascript. Just wondering, should I be learning with 0.9.7 or 0.9.6? I notice that most wiki site docs and examples are still 0.9.6 based, but I'd like to work with 0.9.7 since it's the future and I like the idea of changes to make the framework simpler and cleaner. Yes indeed, 0.9.7 isn't still final and most of the docs are a bit outdated, now the biggest change is that webhelpers 0.6 was a big overhaul of the whole package. IMO it's better to learn 0.9.7 as it is not outdated, plus any fixs of the documentation will be appreciated :) FYI: My goal is to create a PyAMF data server with a SA model. Running under apache alongside a PHP website. I'll need to implement a HTML login page, serve a Flash (Flex) app using SWFObject.js, then respond to AMF/RTMP/HTTPS requests while maintaining state (session or cached data - I'm not sure) in memory for active clients. Thanks for any tips. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: newbie Oct 2008 - v0.9.6.x or 0.9.7 ?
CC; the list as it seems you forgot that. On Mon, Oct 6, 2008 at 6:15 AM, Emmett [EMAIL PROTECTED] wrote: Thanks Jorge, I actually gave up on 0.9.6.2 and the tutorials because easy_install downloaded WebHelpers-0.6.2-py2.5.egg in any case. So I got a similar error to what I had under 0.9.7. you can force that to an older webhelpers by doing easy_install =U WebHelpers==0.5 or whichever you need, but as Mike posted better go on to 0.9.7 So I've moved on the docs and learning. I've no idea how to quickly handcraft the javascript, and I need to eventually learn other stuff like getting pyAMF working after authentication and over https. well the JS bits in those tutorials shouldn't stop you, as that is totally independent of core pylons. If I believe I find an error or room for improvement in the 0.9.7 docs, then would you like me to post a message to the discussion list, or to convey it via some other method? if they are the official docs, then yes as you will need an account on the wiki for it, what I normally do is post a comment on the page and if it's important enough post to the mailing list, with a link and explanation. Emmett On Oct 6, 11:05 pm, Jorge Vargas [EMAIL PROTECTED] wrote: On Sun, Oct 5, 2008 at 8:49 PM, Emmett [EMAIL PROTECTED] wrote: Pylons newbie here. Followed the docs.pylonshq instructions and therefore installed 0.9.7, learning rapidly in the past couple of days. I like it. Especially the WSGI concept. I like Python a lot, and now this framework (some of the code) has really opened my eyes to how expressive and powerful Python can be. Today noticed that the tutorials dont work (Flickr and Quickwiki) which need the javascript stuff in webhelpers v0.6. To keep learning I'll setup a python virtual env running 0.9.6.2 for the tutorials. yes they where removed due to being outdated, so all that js related code will have to be ported back to plain old javascript. Just wondering, should I be learning with 0.9.7 or 0.9.6? I notice that most wiki site docs and examples are still 0.9.6 based, but I'd like to work with 0.9.7 since it's the future and I like the idea of changes to make the framework simpler and cleaner. Yes indeed, 0.9.7 isn't still final and most of the docs are a bit outdated, now the biggest change is that webhelpers 0.6 was a big overhaul of the whole package. IMO it's better to learn 0.9.7 as it is not outdated, plus any fixs of the documentation will be appreciated :) FYI: My goal is to create a PyAMF data server with a SA model. Running under apache alongside a PHP website. I'll need to implement a HTML login page, serve a Flash (Flex) app using SWFObject.js, then respond to AMF/RTMP/HTTPS requests while maintaining state (session or cached data - I'm not sure) in memory for active clients. Thanks for any tips. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Handling subdomains
On Fri, Sep 19, 2008 at 6:45 AM, Rob [EMAIL PROTECTED] wrote: Hi, I would like to have the administration side of my application done though a subdomain (admin.example.com). How would I set this up with pylons? Please look in the archives, this exact same question was ask about a week ago. it was call how to figure out subdomains or something similar. It got several answers with several ways to achieve this. Thanks Rob --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: When using GAE locally, which site.py is supposed to be loaded?
On Wed, Sep 17, 2008 at 5:06 PM, Josh Heitzman [EMAIL PROTECTED] wrote: Your general one or the one in your project directly? will you be more specific, I'm not aware of any site.py that needs to be loaded. are you talking about appengine monkey? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Is AuthKit still acrively being developed?
On Fri, Sep 12, 2008 at 11:24 AM, Jonathan Vanasco [EMAIL PROTECTED] wrote: On Sep 12, 8:38 am, Bartosz R [EMAIL PROTECTED] wrote: Some claim (http://beta.stackoverflow.com/questions/47801) that it is not. And so it seems that the last commit was 2 months ago... Can anyone clarify? trac histories are really confusing now... why? I have no problem with http://pylonshq.com/project/pylonshq/timeline do you? now if you want a lot of projects have moved to git for active development and just do an occasional svn commit for a public tagging I assume you mean mercurial? As for svn as far as I know no one commits there anymore, in fact links are giving 404. if you want to follow all commits the best place will be the RSS from http://knowledgetap.com/hg/ i don't know that status of authkit itself, but i wouldn't judge a project by svn activitity anymore authkit was never hosted on pylons site This link shows the 2 months inactivity http://authkit.org/trac/browser I'm also interested on the status, as far as I know authkit is complete but the lack of documentation makes it a big issue as it's such a complex package. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Is AuthKit still acrively being developed?
On Fri, Sep 12, 2008 at 3:45 PM, Mike Orr [EMAIL PROTECTED] wrote: On Fri, Sep 12, 2008 at 1:50 PM, Jonathan Vanasco [EMAIL PROTECTED] wrote: i was just talking about open source projects in general... a lot of people seem to be leaving subversion for git, or mercurial, or other more distributed apps, and only syncing to the main svn repo on a major release my bad, I though it was a remark regarding pylons. Pylons has moved to Mercurial for Pylons, Routes, WebHelpers, and Ben's other projects. Several other Python packages have also moved to Mercurial because it's really convenient to commit to your local repository, share a tentative patch with somebody for testing, and then push it to the main repository if it's good. The ability to clone repositories during development is also useful; e.g., to test a feature/refactoring which may turn out to be a dead end. Also fast, there is a very nice discussion about this on the turbogears-trunk mailing list, as TG is also moving. If you care to read all the good reasons. I have stayed away from git because Mercurial is Python, its command syntax is modeled after Subversion, while git is written in C and has a reputation for being uebergeek/hard to use. I don't know of any Python projects using git. plus it has (had) a bad integration into Windows, which some people still use :) In the Pylons repositories, people do check in minor changes just like they do in Subversion. When enough changes accumulate or the BDFL considers one of them is critical, a release is cut. But note that some packages have multiple repositories: https://www.knowledgetap.com/hg/ - pylons-0.9.6 : stable bugfix branch - pylons-1.0 : experimental 1.0 branch without deprecated/Python 2.3 support - pylons-dev : development branch (future 0.9.7, now at 0.9.7rc1) - routes : Routes 1.x stable and incremental development branch - routes2-dev : Routes 2 development branch (not yet usable) -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
WSGI callable and pylons __before__
Hi, I got the following situation: I'm running a couple of other apps as wsgi callables, they follow the object dispatcher protocol of wsgi, that is a class that extends BaseController which as a __call__ method that in turns call the wsgi app with the environ and start_reponse. it's all running well. Now I want to wrap everything under pylons auth, to have one user/pass combo for everything. So I created a SecureController which has the following: class SecureController(BaseController): def __before__(self): if not c.current_user: abort(401) And I got a middleware to catch that 401, which is working great for all non-wsgi calls (ie: normal pylons controllers) therefore I see that the problem is that when I'm returning the app from my custom __call__ method it's not calling WSGIController.__call__(self, environ, start_response) as BaseController does which is not executing the __before__ call. of course if I change the return value of my __call__ method to the WSGIController callable auth works, so this is definitely the problem. So my question is how can I return my own wsgi app from the call method and yet call pylons to execute the authentication? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Which is the best way to make a variable available to all templates?
I want to be able to customize some layout variables from the config files. For example I want to have a company_name variable that will be displayed as title ${company_name} - Downloads /title I think the best way to accomplish this will be to prepopulate the variable in lib/base but I'm not sure how to accomplish this. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Plesae do not remove pylons releases
On Sat, Aug 23, 2008 at 10:41 AM, Noah Gift [EMAIL PROTECTED] wrote: More and more I like the idea of there being an extension to easy_install and virtualenv that is like an rpm or deb package. You have an all inclusive package that contains all the actual eggs needed to deploy a particular package. Then the package can be named a specific revision number and it actually means something, and it never changes state. how about http://pypi.python.org/pypi/EggFreezer/ also http://pypi.python.org/pypi/bbfreeze/ Currently because of the way dependencies work with the Python Package Index, a specific version of a web framework can mean different things at different times, and also work properly sometimes and then not others. I think pulling in dependencies from the Python Package Index seems to be a failure largely, as it is just too complex to manage. Even though I agree with you on principle, I don't think it's that bad. if used wisely it's a good feature which can produce small breaks that get fixed very easy (most of the time pin down to an eairler version, until a patch is worked out) On Sat, Aug 23, 2008 at 4:31 AM, Wichert Akkerman [EMAIL PROTECTED] wrote: I noticed that 0.9.7beta5 was deleted from http://pylonshq.com/download/0.9.7 and as a result several of my deployments are now broken since they were pinned to that revision and can no longer be installed now. So please: never delete a release after uploading it. I notice 0.9.7rc1 appeared both there and on pypi but I can not find an announcement or changelog for it. Can someone provide those? Wichert. -- Wichert Akkerman [EMAIL PROTECTED]It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. -- Noah Gift http://noahgift.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: beaker trac
On Fri, Aug 22, 2008 at 7:58 PM, Walter Cruz [EMAIL PROTECTED] wrote: How can I submit a bug to beaker? The trac requests a password :) here is how http://wiki.pylonshq.com/display/pylonscommunity/Home PS: I just notice that page still has references to SVN, that should be updated, and I don't have edit access :( []'s - Walter --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: response status when form validation fails
On Tue, Aug 19, 2008 at 1:08 AM, Lawrence Oluyede [EMAIL PROTECTED] wrote: On Tue, Aug 19, 2008 at 8:20 AM, Sok Ann Yap [EMAIL PROTECTED] wrote: Returning 400 for form validation error is recommended by Leonard Richardson and Sam Ruby in the book RESTful Web Services. Here's an excerpt from one of the examples in the book Also if they didn't say it... it's just that 200 OK is plain wrong to signal an error condition. That's what 4xx and 5xx codes are for. Even though I agree in principle, there is no 4xx code to signal an error in the value of the parameters, please remember that http is a transport protocol, and from that perspective it was a successful transfer. I believe that trying to return http status codes for application logic is violating the TCP layer division that has held us in place for so long. Building up on the json example, it should be read as, the request was successful and everything when ok (http:200) now it seems you fail with supplying the correct values (statusCode:xxx) as for the webservices reference, I don't think that applies to web-browsers, they could even interpret the 400 as something totally different. That said if enough people find this useful I'll say add a config option where you can switch it and leave it as 200 for default. -- Lawrence, stacktrace.it - oluyede.org - neropercaso.it It is difficult to get a man to understand something when his salary depends on not understanding it - Upton Sinclair --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: WebHelpers 0.6 released
On Tue, Jul 8, 2008 at 6:18 PM, Mike Orr [EMAIL PROTECTED] wrote: WebHelpers 0.6 final has been released. Just do: $ easy_install -U WebHelpers For now you'll have to read the docstrings in the source code for documentation. I'm hoping these will be included online in the Pylons 0.9.7 documentation as soon as that project is finished. Here's what's available online for now: http://docs.pylonshq.com/helpers.html There's a detailed howto for webhelpers.paginage, and a brief description of the rest of the package. Pylons 0.9.6 users using the stable version of WebHelpers should be able to upgrade as-is, although there's no particular benefit unless you want to start using the new (non-rails) helpers. You may have to add the following to helpers.py: from webhelpers.rails import * from routes import url_for from pylons.controllers.util import redirect_to We're trying to eliminate WebHelper's dependencies on Routes; that's the reason for the second two imports. Pylons 0.9.7-dev users who are using the rails helpers should add this to helpers.py: from webhelpers.rails.wrapped import * (And remove any other rails import, and add the url_for and redirect_to import above.) The ``wrapped`` module contains specially wrapped versions of all the rails helpers which will not be escaped by Pylons 0.9.7's default Mako filter. Otherwise you'll find escaped to lt; on your web pages. Users ready to upgrade from the rails helpers (which are all deprecated now) should see What's New in Pylons 0.9.7? for a list of suggested imports that are most similar to the rails helpers. The functions are similar but not always identical, so check the argument signature and function docstring. The biggest change is that the option order in webhelpers.html.tags.select() is the opposite of the old options_for_select(): value before label instead of label before value. There are tradeoffs both ways on this, but doing .items() on a dict whose keys are SELECT values seems more common than dicts whose keys are SELECT labels. All Javascript in WebHelpers has been deprecated, including Prototype, Scriptaculous, and link_to_remote(). We can't keep up with the rapid evolution of Javascript libraries, and the best one changes every six months. Several users have come up with short manual replacements to link_to_remote(), which you can ask about here or on IRC. Those wanting a comprehensive Javascript library can look at YUI, JQuery, ExtJS, ForkJavascript, etc. The rails helpers and Javascript stuff will be deleted in a future version of WebHelpers, so now is a good time to start migrating from them. Awesome I'm using tip for a while. and that was because of the decoupled routes, great more there. Today I sat down and wrote a patch to port simple_format to the new HTMLBuilder, I have created a ticket for it. feedback is welcome, and I hope it can be included in 0.6.1 or something. http://pylonshq.com/project/pylonshq/ticket/487 A simple question. - is there a way to prettify the HTML rendered by HTMLBuilder? like adding whitespace and indentation, for proper template placement? -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: distribute Pylons app with bytecode files only?
On Mon, Jul 7, 2008 at 5:48 PM, Cliff Wells [EMAIL PROTECTED] wrote: Sometimes this type of security is required (by law or PHB's), but most people who ask this sort of question are simply following a cargo-cult mentality of believing that source code must be kept secret, without much thought as to why and what the risks/benefits really are. If your code is so unique as to be worth protecting this way then it's probably worth patenting whatever amazing algorithm it contains. If it's not worth the few thousand dollars you'll spend applying for a patent, then it's probably not worth the few thousand dollars of development time you'll spend trying (almost certainly unsuccessfully) to protect your code by technological means. I think this is the most important statement around. After all it's all binary which can be turned into opcodes which can be turned into ASM which can be turned into C,etc. There is no way you can't hide something that is supposed to run on the client machine from the client. So if you want to do it for being cool, go ahead if not use the correct way. Someone ones said, any security scheme can be broken with enough time in your hands. Cliff --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
get_lang/set_lang why the different signature?
Hi, I'm a bit confused as to why this is implemented like it is. set_lang is a string which inside pylons (_get_translator in translation.py) is converted to a list to make python's gettext happy. but then it's stored as a list in translator.pylons_lang which is retrieved by get_lang. not only this is misleading but it's wrong as with the current code it's not possible to have more than one lang anyway, unless you monkey patch translation.py or am I missing something? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: mako marco? webhelpers plugin?
On Tue, May 13, 2008 at 6:07 PM, lasizoillo [EMAIL PROTECTED] wrote: Hi 2008/5/11 [EMAIL PROTECTED]: i am new to pylons and found the webhelpers are quite handy. i need to program on other javascript lib(dhtml calendar) which is not include in webhelpers. if i want to make something reusable other than hardcode the js everytime, i can think of marco of the template system or extend the webhelpers myself. can anyone please show me some lights? any example or sample available? The problem is enterely in presentation layer. Why not resolve it in this layer. I believe this is true, although for this matter I'll prefer the webhelpers approach as it's template agnostic. That said the only advantage either of them is to centralize JS calls because as Christoph said you just can't make JQuery calls smaller. http://www.makotemplates.org/docs/defs.html#defs_remotedefs You can write your custom mako library for write your things (form elements whith tooltips, microformats, ...). But maybe a better option make your own jquery plugin. It's a great thing to reuse js code ;-) agreed there too. Excuse my poor english Reggards Javi --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Running Pylons with PHP
On Mon, May 12, 2008 at 4:43 PM, Syp [EMAIL PROTECTED] wrote: Hello -- Does anyone know if it's possible to run Pylons and PHP together on the same port? huh? unless you configure your apache to serve both py and php and mess around with everyrequest to see who is handling what no. I'll suggest you just run on different subdomains. for example I got www.example.com with my pylons app and stats.example.com with my analitics tool. I'm trying to use a web analytics tool (Piwik) which requires PHP. Any suggestions? I'm using something older but works. it's call aw_stats, and it works based on apache logs and it parses the logfiles every X hours. Thanks in advance! Syp --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Running Pylons with PHP
On Mon, May 12, 2008 at 6:06 PM, Mike Orr [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 1:43 PM, Syp [EMAIL PROTECTED] wrote: Otherwise you can use a different named virtual host (Jorge's subdomain idea) or a different IP. But named virtual hosts won't work if you're using HTTPS. again it all depends on your apache installation. the way my webhosting has this setup makes each subdomain a totally different application apache-wise, so you can basically mount one app in a.example.com another in b.example.com just like you will do with normal www.example.com/a and www.example.com/b --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
about formencode and i18n
Hi, I'm having a little trouble getting this to work. I want to re utilize the FE validator messages in a i18n context. Which isn't exactly i18n it's just that my application is currently in a non-english language, and given it's scope it's probably going to stay there. First of all I'm not sure if I did the right thing setting the lang. Acording to #1 I had to set lang = es in my development.ini under app:main, this gave no effect to the FE messages. I keep digging [2] and I found out that a call in __before__ or __call__ to set_lang should fix this and I try that too but didn't succeed. Them I found that ticket #296 had a way to make it work but I applied the patch (it cleanly applied to 0.9.6.1, except the test.) but I'm still getting the english message. I should note that I'm using toscawidgets @validate but I have double check that it's doing the right thing because it just passes the state over to FE so it shouldn't be an issue. Last but not least I do agree with Alberto that neither of the solutions (duplication of the FE message or #296) is the best one. Maybe there should be some cascating of catalogs instead of translators. but right now what I really want is to find out why this isn't working. [1] http://wiki.pylonshq.com/display/pylonsdocs/Internationalization+and+Localization [2] http://groups.google.com/group/toscawidgets-discuss/browse_thread/thread/dca25cbeae704652 [3] http://pylonshq.com/project/pylonshq/ticket/296 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: tg_flash equivalent in pylons?
On Sat, May 3, 2008 at 3:36 PM, noflashlight [EMAIL PROTECTED] wrote: On May 3, 2:12 pm, noflashlight [EMAIL PROTECTED] wrote: On May 3, 1:34 pm, noflashlight [EMAIL PROTECTED] wrote: On May 3, 12:19 am, Jonathan Vanasco [EMAIL PROTECTED] wrote: as for the improvement I have to disagree TG1 gives you more than pylons in fact pylons is like a barebone TG. To many of us, that IS the huge improvement ;) My thoughts exactly. well from the need of flash it seems you will be missing many more components. It's webhelpers.containers.Flash, previously webhelpers.tools.Flash. Thank you Mike. I will check that out. My version of webhelpers (0.3.2) doesn't have a 'containers' package. because you read it the other way around. in 0.3 it's in tools. Anyone know where I can obtain a newer version? Easy Install turned up nothing. Thanks. because it isn't released yet. Incase anyone else is wondering I found the 0.6dev version of webhelpers here https://www.knowledgetap.com/hg/webhelpers yea I wouldn't recommend upgrading to a dev version because of a namespace change. webhelpers.containers.Flash works great. Very well documented and easy to implement. Great stuff. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: notmm-0.2.10p8 released
On Sat, May 3, 2008 at 9:56 AM, Etienne Robillard [EMAIL PROTECTED] wrote: So, if bigger projects like Pylons or Django don't even let smaller embryonic projects evolves, I can understand very well why theses projects are so popular, and lesser known projects gets very little visibility. I don't see that as a problem everyone started small. it's just as Ben said from the outside your project doesn't seems like pylons releated. Sorry about the wiki page. I'll try to write something on Pylons shortly. that will be great. by the way, the main python discussion list is a good place to advertise new projects. Thanks, Etienne --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Paginate module
On Thu, May 1, 2008 at 3:18 PM, Christoph Haas [EMAIL PROTECTED] wrote: Hi, Jorge... On Donnerstag, 1. Mai 2008, Jorge Vargas wrote: hi I was going to ask about this but I saw this recent thread regarding the pagination and it seems better to follow up on this than to start a new thread. Please note this is my first time working on paginated data with pylons. From what I understand currently pylons has 3 different pagination modules. 1- current released webhelpers package (0.3.x) http://pypi.python.org/pypi/WebHelpers/ 2- current trunk webhelpers package (0.6.x) - side question what happen to .4 and .5? 3- the paginate module http://paginate.workaround.org/?page_nr=1 and http://pypi.python.org/pypi/paginate/0.3.2 There has been much confusion indeed. For a long time there has been the webhelpers.pagination module that Ben ported from Ruby-on-Rails (1). I was very unhappy with it because the documentation was not clear for non Ruby-on-Rails users and it took some source-code reading to figure out how to use it. And even then it was not very comfortable. So I started working on an alternative pagination module. A working version is what you can find on PyPi and on paginate.workaround.org (3). Then Mike, Ben and I decided that it's time my module gets integrated into the next version of webhelpers (2). Currently the webhelpers version 0.6 is in the making and is probably released soon. The paginate module is now integrated there and I'm currently working on the last cosmetic changes. Webhelpers 0.4 and 0.5 have never been released AFAIK. now #3 was supposed to become part of webhelpers (so I read), does that means #3 and #2 are the same? The webhelpers.paginate (#3) version is newer and has a few more features. #2 is still fully usable if you need it outside of a Pylons context. why #1 got replaced? what are it's problems? IMHO webhelpers.pagination is uncomfortable, doesn't have enough useful features and needs too much code to get simple pagination. will #2 and #3 work with current released pylons (0.9.6.x)? When webhelpers 0.6 are released you won't need #3 seperately any more. overall what are the differences between the three modules? and which one is recommended for production, right now I'm interested in having as little tip/head dependencies as possible for this project as it's launch date is really near. I'm confident that #2 is stable. I'm using it in two real-life projects already. Feel free to use that. which one is more future proof, for example I assume #1 will go away ones pylons 0.9.7 gets out. #1 is still present in webhelpers 0.6 but deprecated. It will go away. Pylons 0.9.7 depends on webhelpers 0.6 so you can still use it if you have code using it. Christoph (hoping he didn't tell nonsense) -- When you do things right people won't be sure you've done anything at all. Thank you very much on this input. this is exactly what I was looking for. then I guess the short version (for people reading this in the future will be) if you like/know RoR pagination go with #1 if you want a better implementation use #2 and after 0.9.7 go with #3 (or if you are feeling experimental) I have installed and configure #2 and I find it great, documentation is excelent and the sample project is really something. Thanks for this great module. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: tg_flash equivalent in pylons?
On Fri, May 2, 2008 at 7:04 PM, noflashlight [EMAIL PROTECTED] wrote: Hello, I am fairly new to pylons, so far I really like it. I think it is a big improvement over Turbogears. However I have one question. Is there any equivalent functionality to the Turbogears' tg_flash' in Pylons? there is one in webhelpers although with the recent changes you need to look out which version of webhelpers you are using to know where to find it. as for the improvement I have to disagree TG1 gives you more than pylons in fact pylons is like a barebone TG. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Paginate module
On Wed, Apr 9, 2008 at 5:03 PM, Mike Orr [EMAIL PROTECTED] wrote: On Wed, Apr 9, 2008 at 1:04 PM, blaf [EMAIL PROTECTED] wrote: Thanks Mike... you got a more complete one =) The more I use Pylons the more I'm impressed by all the contributions... juste started using your Flash webhelper today... The new helpers haven't gotten much testing, so please give me or Ben feedback on how well they work. Also let us know about anything you don't understand, because that's a hole in the documentation. The new helpers are: webhelpers.date webhelpers.html webhelpers.paginate webhelpers.tags webhelpers.text webhelpers.tools (These all refer to the WebHelpers development version, or future 0.6.) hi I was going to ask about this but I saw this recent thread regarding the pagination and it seems better to follow up on this than to start a new thread. Please note this is my first time working on paginated data with pylons. From what I understand currently pylons has 3 different pagination modules. 1- current released webhelpers package (0.3.x) http://pypi.python.org/pypi/WebHelpers/ 2- current trunk webhelpers package (0.6.x) - side question what happen to .4 and .5? 3- the paginate module http://paginate.workaround.org/?page_nr=1 and http://pypi.python.org/pypi/paginate/0.3.2 now #3 was supposed to become part of webhelpers (so I read), does that means #3 and #2 are the same? why #1 got replaced? what are it's problems? will #2 and #3 work with current released pylons (0.9.6.x)? overall what are the differences between the three modules? and which one is recommended for production, right now I'm interested in having as little tip/head dependencies as possible for this project as it's launch date is really near. which one is more future proof, for example I assume #1 will go away ones pylons 0.9.7 gets out. Thanks for your replies in advance. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Mako escaping javascript/stylesheet WebHelpers
On Fri, Apr 25, 2008 at 4:29 PM, Devin Torres [EMAIL PROTECTED] wrote: Nevermind. It seems there was a bug in Mako. It never needed the filter syntax before, but changing it to this did the trick: ${ h.stylesheet_link_tag('blueprint/src/reset.css', 'blueprint/src/typography.css', 'blueprint/src/grid.css', 'blueprint/src/forms.css', 'blueprint/plugins/css-classes/css-classes.css', media=screen, projection, minified=True, combined=True) | n } in which version is this? I'm running the above and I'm not needing what your saying. On Fri, Apr 25, 2008 at 3:22 PM, Devin Torres [EMAIL PROTECTED] wrote: This used to work. ${ h.stylesheet_link_tag('blueprint/src/reset.css', 'blueprint/src/typography.css', 'blueprint/src/grid.css', 'blueprint/src/forms.css', 'blueprint/plugins/css-classes/css-classes.css', media=screen, projection, minified=True, combined=True) } But now all I get is this: lt;link href=quot;/stylesheets/blueprint/src/reset.cssquot; media=quot;screen, projectionquot; rel=quot;Stylesheetquot; type=quot;text/cssquot; /gt; lt;link href=quot;/stylesheets/blueprint/src/typography.cssquot; media=quot;screen, projectionquot; rel=quot;Stylesheetquot; type=quot;text/cssquot; /gt; lt;link href=quot;/stylesheets/blueprint/src/grid.cssquot; media=quot;screen, projectionquot; rel=quot;Stylesheetquot; type=quot;text/cssquot; /gt; lt;link href=quot;/stylesheets/blueprint/src/forms.cssquot; media=quot;screen, projectionquot; rel=quot;Stylesheetquot; type=quot;text/cssquot; /gt; lt;link href=quot;/stylesheets/blueprint/plugins/css-classes/css-classes.cssquot; media=quot;screen, projectionquot; rel=quot;Stylesheetquot; type=quot;text/cssquot; /gt; lt;link href=quot;/stylesheets/blueprint/print.cssquot; media=quot;printquot; rel=quot;Stylesheetquot; type=quot;text/cssquot; /gt; !--[if IE]lt;link href=quot;/blueprint/ie.cssquot; media=quot;screen, projectionquot; rel=quot;Stylesheetquot; type=quot;text/cssquot; /gt;![endif]-- Has anybody seen this before? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---