[pylons-discuss] pyramid_appengine 0.8.3 released
This version should get around all the various setuptools issues that people have been experiencing with it I tried to make the directions on setting up the buildout more explicit in regards to virtualenv. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
[pylons-discuss] Re: Does anyone who use GAE to deploy your applicaton?
I'm currently waiting for the issue in rod.recipe.appengine to get taken care of. https://github.com/twillis/pyramid_appengine/issues/27 then I can cut another release that should be working again. On Sunday, October 27, 2013 5:46:38 AM UTC-4, BINLEI XUE wrote: I cannot find a way to do this, monkey is too old and buildout always raise the setuptools not found exception. Is there something to work around? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
Re: [pylons-discuss] Using Pyramid with an AngularJS app
Well, my previous employer used pyramid + emberjs, same kind of design pattern. I just used Authtkt and if the client didn't pass the cookie back would return a 401. For CORS, i just subscribed to INewResponse def make_response_access_control_header(unit_test=False): def access_control_header(event): try: if hasattr(event.response, headers): event.response.headers[Access-Control] = allow * if Origin in event.request.headers: origin = event.request.headers[origin] or * # may want to whitelist if community context else: origin = * event.response.headers[Access-Control-Allow-Origin] = origin event.response.headers[Access-Control-Allow-Credentials] = true event.response.headers[Access-Control-Allow-Methods] = GET, POST, OPTIONS except BaseException, ex: log.error(Error adding headers..., exc_info=True) log.error(ex, exc_info=True) if unit_test: raise # so we can make sure this stuff is working return access_control_header and elsewhere... config.add_subscriber(make_response_access_control_header(unit_test=unit_test), INewResponse) you may want to do things differently but from what you describe it sounds to me like you are on the right track. Thomas G. Willis On Wed, Oct 9, 2013 at 9:38 AM, Mark Huang zhengha...@gmail.com wrote: Hi, I've used Pyramid for my last project and I loved it, however, now it's my first time using it purely for creating the API and allowing my AngularJS client app to interact with it. I want to know for my use-case, whether I need to alter any of the authentication policies or session factories? I was using pyramid_beaker for my sessions and SessionAuthenticationPolicy for my authentication policy. Does any of this have to change now that I'm developing for one of those Single Page Apps where the client only interacts with the backend through REST endpoints and JSON. I read in some places that BasicAuthentication seems the way to go but wasn't sure on swapping that in. I'm also not entirely sure on how CORS could be setup on the server side. I'm using a mixture of URL Dispatch and Cornice for the API because when I wanted to create the route for /auth/login and /auth/logout, that meant I had to create two Cornice Services just to handle those requests. I ended up using URL Dispatch for login and logout. Not many people use Pyramid with Angular, at least from what I've searched on Google. Was wondering if anyone here has any sample projects that I can have a look. Thanks -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
Re: having error when using buildout for deploying
So, if you all wouldn't mind, I would appreciate issues dropped in github so I can update as needed. Unfortunately i'm not using appengine right now, so typically, I don't run into the issues before you all using it. https://github.com/twillis/pyramid_appengine I should have some time over the long weekend to freshen things up and cut a new release if necessary or change the docs etc Thomas G. Willis On Thu, Aug 29, 2013 at 3:19 AM, Andi Balke andi.ba...@googlemail.comwrote: my notes when this issue came up: - hide quoted text - recap: [06.07.13 20:43:56] andi: ok, i deleted everything called ``distribute*`` on osx and debian. then installed new ``setuptools`` (macports: ``sudo port sync; sudo port -v install py27-setuptools``, debian ``wget https://bitbucket.org/pypa/setuptools/raw/0.8/ez_setup.py -O - | python2.7`` as seen on https://pypi.python.org/pypi/setuptools/0.8https://pypi.python.org/pypi/setuptools/0.8 in ``buildout.cfg`` set:: distribute = 0.7.3 setuptools = 0.8 update ``bootstrap.py`` in your project:: rm bootstrap.py curl -O http://downloads.buildout.org/2/bootstrap.py [06.07.13 20:46:11] andi: now seems to work. on a ci-systemen don't forget the ``bootstrap.py``. i got this conditionally, this was a trap of course ;) best, andi On 29.08.2013, at 02:20, Chung WONG wrote: For some reasons, shit always happen. After I ran ~/newproject $ ./bin/buildout I get another error saying setuptools not found Develop: '/tmp/newproject/src/newproject' /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'paster_plugins' warnings.warn(msg) warning: no files found matching '*.ini' warning: no files found matching '*.rst' warning: no files found matching '*.jpg' under directory 'newproject' warning: no files found matching '*.pt' under directory 'newproject' warning: no files found matching '*.txt' under directory 'newproject' warning: no files found matching '*.mak' under directory 'newproject' warning: no files found matching '*.mako' under directory 'newproject' warning: no files found matching '*.js' under directory 'newproject' warning: no files found matching '*.html' under directory 'newproject' warning: no files found matching '*.xml' under directory 'newproject' Couldn't find index page for 'collective.recipe.cmd' (maybe misspelled?) Unused options for buildout: 'ae-runtime' 'include-site-packages' 'unzip'. Installing newproject. rod.recipe.appengine: Google App Engine distribution already downloaded. Generated script '/tmp/newproject/bin/devappserver'. Generated script '/tmp/newproject/bin/appcfg'. Getting distribution for 'Chameleon=1.2.3'. Got Chameleon 2.12. While: Installing newproject. An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File /tmp/newproject/eggs/zc.buildout-2.2.0-py2.7.egg/zc/buildout/buildout.py, line 1942, in main getattr(buildout, command)(args) File /tmp/newproject/eggs/zc.buildout-2.2.0-py2.7.egg/zc/buildout/buildout.py, line 622, in install installed_files = self[part]._call(recipe.install) File /tmp/newproject/eggs/zc.buildout-2.2.0-py2.7.egg/zc/buildout/buildout.py, line 1366, in _call return f() File /tmp/newproject/eggs/rod.recipe.appengine-2.0.2-py2.7.egg/rod/recipe/appengine/__init__.py, line 367, in install self.copy_packages(ws, temp_dir) File /tmp/newproject/eggs/rod.recipe.appengine-2.0.2-py2.7.egg/rod/recipe/appengine/__init__.py, line 274, in copy_packages self.write_pkg_resources(ws, lib) File /tmp/newproject/eggs/rod.recipe.appengine-2.0.2-py2.7.egg/rod/recipe/appengine/__init__.py, line 257, in write_pkg_resources assert len(setuptools_eggs) == 1, setuptools not found AssertionError: setuptools not found BTW, someone has removed the --distribute option from the cookbook, thanks. On Wednesday, August 28, 2013 11:01:35 AM UTC+10, Chung WONG wrote: Hi all, I am learning how to deploy to google app engine on this linkhttp://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html . However , I am stuck at ~/ $ cd newproject ~/newproject $ /usr/bin/python2.7 bootstrap.py --distribute After typing the command, I got this error for some reasons which I don't have a clue at all. *Usage: [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]* *Bootstraps a buildout-based project.* * * *Simply run this script in a directory containing a buildout.cfg, using the* *Python that you want bin/buildout to use.* * * *Note that by using --setup-source and --download-base to point to* *local resources, you can keep this script from going over the network.* * * * * *bootstrap.py: error: no such option: --distribute* I am running debian wheezy and I followed the exact steps and commands in the tutorial. Does anyone have any idea? Thanks. -- You
Re: having error when using buildout for deploying
I think because of the updates to buildout and bootstrap and the merging of distribute into setuptools, you could probably get by without that option. Give that a try Thomas G. Willis On Tue, Aug 27, 2013 at 9:01 PM, Chung WONG wch...@gmail.com wrote: Hi all, I am learning how to deploy to google app engine on this linkhttp://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html . However , I am stuck at ~/ $ cd newproject ~/newproject $ /usr/bin/python2.7 bootstrap.py --distribute After typing the command, I got this error for some reasons which I don't have a clue at all. *Usage: [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]* *Bootstraps a buildout-based project.* * * *Simply run this script in a directory containing a buildout.cfg, using the* *Python that you want bin/buildout to use.* * * *Note that by using --setup-source and --download-base to point to* *local resources, you can keep this script from going over the network.* * * * * *bootstrap.py: error: no such option: --distribute* I am running debian wheezy and I followed the exact steps and commands in the tutorial. Does anyone have any idea? Thanks. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
Re: Should view callable pass request to resource?
The root_factory function you pass to the configurator should be a function that takes the request as a parameter right? So if you keep it as an attribute on the root resource and can be accessed from any resource that is location aware. like class Root(object): def __init__(self, request): self._request = request from pyramid.traversal import find_root find_root(self)._request http://docs.pylonsproject.org/projects/pyramid/en/latest/api/traversal.html?highlight=traversal#pyramid.traversal.find_root so the view passing the request to the model seems redundant to me. Thomas G. Willis On Fri, Jun 7, 2013 at 12:51 PM, Wade Leftwich wleftw...@gmail.com wrote: Hi, I'm putting together a little demo using Pyramid with a MongoDB back end and routes-type url dispatch. The pyramid_mongodb scaffold and all the example code I've seen attach the Mongo connection to each request, and the view_callable in turn passes it to the model. However, the SQLAlchemy scaffold uses a module-level Session object which gets an engine bound to it at startup, so functions that query the db do not need to receive a db connection explicitly. So, which is the more Pyramidal way to do it? That's assuming that a module level Mongo connection will work satisfactorily. According to the discussion at https://groups.google.com/forum/?fromgroups#!topic/pylons-discuss/6bLGOXngVvY it will, and my current toy implementation works that way; but I have seen some observations that it may cause problems with authenticated Mongo connections. I'll confess right now that my understanding of thread-local db connections is sketchy. I can see an explicit-vs-implicit argument in favor of associating a db connection with each request; vs a Law of Demeter argument in favor of keeping any knowledge of requests out of models, and knowledge of db sessions out of views. Any advice appreciated. And in case I am revisiting a long-settled discussion, apologies and thanks in advance for a link. Wade Leftwich Ithaca, NY -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
adding settings during config.scan in decorator/venusian......
So I have this code which works fine in unittesting but I get a KeyError https://gist.github.com/twillis/2c7722fb9f7fb0c22976#file-gistfile1-py-L70 when running. I even tried adding a dictionary to settings but by the time the request is handed to a resource or view the settings are not there. I'm sure I'm missing something but I can't figure it out. Anyone have any ideas? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: adding settings during config.scan in decorator/venusian......
Yeah, sorry I realized after I sent the email out, that I should probably get a better gist up there. And as it turns out. it must be something in my unit test suite that's bugging it out. So all of this actually works. https://gist.github.com/twillis/5569288 sorry for the noise. On Monday, May 13, 2013 10:48:52 AM UTC-4, Michael Merickel wrote: A traceback sure would be nice. Without one I'm going to throw out an initial guess that you are using a DummyRequest that isn't really attached to the registry at all. As it stands I have no idea what part of your paste is failing except that one line is highlighted. You showed 2 tests, one of which uses code that isn't included (self.make_request) and simply too much to sift through for you right now. ;-) On Mon, May 13, 2013 at 7:34 AM, Thomas G. Willis tom.w...@gmail.comjavascript: wrote: So I have this code which works fine in unittesting but I get a KeyError https://gist.github.com/twillis/2c7722fb9f7fb0c22976#file-gistfile1-py-L70 when running. I even tried adding a dictionary to settings but by the time the request is handed to a resource or view the settings are not there. I'm sure I'm missing something but I can't figure it out. Anyone have any ideas? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com javascript:. To post to this group, send email to pylons-...@googlegroups.comjavascript: . Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Pyramid Books Published by O'Reilly
I'm kind of late to the discussion but what Tjevlar said really strikes a chord with me. I believe that a book about pyhon and the web would be an awesome resource to have. I'm not a writer, but I've been kicking around an outline for a book for a couple of years, but before I get to that, this is my story When I came from ASP.net to python via turbogears and then pylons many years ago, there was WSGI, paste, pastedeploy, pasteob etc... and setup.py and easy_install. not to mention the plethora of libs that turbogears bundled together that you needed to get familiar with. It really can make a newbie feel out of their element. The first edition of the turbogears book wa enough for me to complete the project I was working on, but I did not feel like I was a python developer, I wasn't confident I did it right. If you asked me to explain any piece of code I wrote I couldnt tell you. I just followed the recipe described in a chapter the best I could and then banged on it until it worked. There were a few information sources that helped me become (i hope) a python web developer. And based on the questions that come to stackoverflow and other venues I'm not sure they are very well known, thus an opportunity One such resource I stumbled on was Agile development tools in python on showmedo http://showmedo.com/videotutorials/series?name=mcfckfJ4w it did a really good job of demonstrating a workflow for developing python packages. I still use paster to this day to generate my python package skeletons. Though I realize the information is somewhat outdated, I am not aware of something similar that may be more up to date. Another resource that made everything click was when I stumbled on A do it yourself web framework in the paste docs that his since been updated for webob. http://pythonpaste.org/do-it-yourself-framework.html by which I learned enough about wsgi to understand the value in using pastedeploy ini's and what I could do with url map and wsgi middleware and pipelines etc It felt like a new found super power. At which point, being on that foundation of knowledge pyramid, (bfg at the time) was an easy sell to me. it provides powerful tools to build an app on top of, and it stays out of my way. So maybe a book that takes a programmer from 0 to web developer through a series of layers/chapters that justify why you are choosing pyramid for your application and how much power you have at your disposal would have a market. Again not being a writer myself, I just have this outline which I guess would represent how I would teach someone how to code web apps with python. from the ground up instead of top down. I could imagine having fun with the language of the book in the same style as learn x the hard way maybe. Anyway, here's my outline from my org file *** TODO Web Development from the ground up A book about web development using python/javascript that starts out at the lowest level and builds on it so that the reader has the knowledge of web frameworks and how they work and be prepared to build amazing applications. all examples in python 3 and pyramid. History * HTTP * CGI * WSGI * Web Frameworks Future * Web Sockets * tornado/gevent etc Introduction to HTTP * Request ** GET ** POST ** PUT/DELETE/OPTIONS *** Form *** Multi/part * Response ** Status Codes ** Body ** Cookies ** Auth: Challenge/Response Web Application Development * Introduction to WebOb * Template Engines Survey * Example: Directory Listing * Introduction to WSGI ** What it handles ** What it doesn't handle ** Patterns *** Middleware *** Composite *** ??? * Example: Directory Listing with Auth Middleware * Wrap Up Request Routing * sending a request to a function to handle it * Routes/Regex based * Resource Based Persistence * SQL/SQLAlchemy * NoSQL/wild west Caching(key value store) * Memcached * Redis Ajax WebSockets Offline Processing(Task Queues) On Wednesday, March 27, 2013 10:19:20 PM UTC-4, Tjelvar wrote: Dear all, Just thought that I add my two pence worth. I am not a web-hacker, I'm a scientist. I use Pyramid to expose my science as web apps/services. If I am not a web-hacker then why don't I use something that is simpler than Pyramid. Personally, because the science that I want to expose does not fit easily into the more opinionated out-of-the-box solutions. So what is the difficulty with using Pyramid? Some people believe that it is all explained in the docs, and I'm sure it is, but Pyramid forces users like me to think harder about some of the underlying concepts of what they are trying to do. Let me explain by some illustrations. Let us start with the hello world example. When I look at it my first question is: what on earth
Request for feedback/guidance during the pyramid sprints.
Another damn http client Hello pythonistas and pyramideers. My day job has had a need for http client functionality similar to what requestshttp://docs.python-requests.org/en/latest/provides but also works on appengine. As a result, I wrote webobtoolkithttps://github.com/Batterii/webobtoolkit And we get a lot of use out of it as a way to communicate with various web services. And as a very specialized test client. from webobtoolkit.client import Clientclient = Client()print client.get(http://google.com;) 301 Moved PermanentlyLocation: http://www.google.com/Content-Type: text/html; charset=UTF-8Date: Sun, 17 Mar 2013 18:52:33 GMTExpires: Tue, 16 Apr 2013 18:52:33 GMTCache-Control: public, max-age=2592000Server: gwsContent-Length: 219X-XSS-Protection: 1; mode=blockX-Frame-Options: SAMEORIGIN HTMLHEADmeta http-equiv=content-type content=text/html;charset=utf-8TITLE301 Moved/TITLE/HEADBODYH1301 Moved/H1The document has movedA HREF=http://www.google.com/;here/A./BODY/HTML There were 3 motivations for writing this. 1. requests at the time did not work with appengine 2. I couldnt figure out how to get webtest to show me the response when assertion errors happened. 3. our team is familiar with webob and didnt want to learn yet another way to represent http requests and responses. The result is a client based on webob that has 1. cookie support 2. gzip encoding support 3. extendable by writing wsgi middleware that is client centric. 4. 100% test coverage https://gist.github.com/twillis/5183100#what-im-asking-forWhat I'm asking for if there's interest, I would like some strong opinions from people smarter than I about how the api and the docs could be improved. Though this has been on pypi for about a year or so, I haven't made any formal announcements about it. I'm hoping maybe I can do that soon after the sprints. So, for any of you reading this who may be interested, I'll be at the sprint planning this afternoon and at the sprints on Monday and Tuesday. I'm the dork with the blue hair. Thanks for your time. https://gist.github.com/twillis/5183100 -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: The problem with using KeyError for non-existing resources and traversal
this is just an idea, but you could catch KeyError s and log the stacktrace before re-raising, that might help. something like try: return whatevs() except Exception: log.warning(error happened during traversal, exc_info=True) On Wednesday, March 6, 2013 11:32:44 AM UTC-5, Peter Waller wrote: Thanks Steve for your great reply! In my use case, the users will (likely) not be using it as a platform as a service, but executing the pyramid application locally. My users will be comfortable with writing python and seeing stack traces. You're right that I will have to write documentation and teach them caveats. A lot of this stuff does just work though. Many people will learn from example code, which won't teach them that you have to be certain you can't ever raise a KeyError in the wrong place. In addition, I'm not sure _as an experienced python developer_ how to write code which guarantees it doesn't raise a KeyError. You've reminded me that I'm stuck at a microscopic level looking at one problem when there exist other things to worry about - especially once you throw other users writing code into the mix. However, I complain about this one behaviour for a specific reason: it's hell to debug. It's silent error passing. It's that's funny, why is my data subtly wrong? and a violation of the assumption that if it's an exception, I'll get a stack trace (or error e-mail, or whatever), like I always do whenever there is an exception. I've spent a lot of time going that's funny, why does it give me resource not found, this should definitely exist.. Brief thoughts inline. On 6 March 2013 16:05, Steve Schmechel shm...@gmail.com javascript:wrote: In essence, you stated that you want to have inexperienced users writing untested code that simply works. That is a very ambitious goal and you probably have a great deal of work to do beyond getting traversal to function, in order to have any hope of having system that can be stable and maintainable by inexperienced users. Indeed. It's ambitious, it might not work, it might be stupid. It works really well so far except for this one thing which has been a recurring issue for me. Are any exception messages going to be clear enough for them to know how to take corrective action to fix an unforeseen problem in their own code, without understanding the Pyramid internals? You probably need a whole layer of code checking/introspection with custom feedback to guide the users - *before* they deploy their code into the live system. In this case I'm worried about the user using a dictionary (something they're likely to do) and just fat fingering something such that they cause a KeyError somewhere in the traversal. A stack trace telling them exactly what dictionary had a KeyError, and what the missing key is would be extremely helpful. It would at least not mean hours of trying to figure out why traversal appears not to be working at all. If someone wants to select the color of their car at a dealership, they don't hand them the manual for the painting robot at the assembly plant, even if it is the best painting robot manual ever written. :D, I like this analogy. I will use it as I hand them the pyramid manual. If you don't handle all the possible problems in your code, it seems you are simply delaying the point where your users must become Pyramid developers, to when they experience their first bug and have to crack open the Pyramid documentation to figure out how to fix it. Yup. Except that this caveat isn't really explained anywhere that I've seen, so becoming a Pyramid developer won't help, to first order. That's one of my biggest problems with this, that I see there might well be bugs lurking in existing applications, since I managed to write a lot of code before I encountered this problem. And then I managed to use my application and encounter weird issues for quite some time before I understood the root cause. For most people building stuff on top of Pyramid, the fact that it is simple, stable, and thoroughly tested is of greater importance then the ease of integrating it into every conceivable use case. I really do not need or want a bunch of framework-specific exceptions thrust upon me to add to my learning curve. And if I someday want some, I will override what I need to in order to add them. I think that is probably what you are going too need to do. I very much appreciate this and I'm quite happy to be told no changes to pyramid, go away. I haven't seen any other discussion on this matter though, so I thought it was worth having an exhaustive discussion. I read what I've written and I hate the whiny tone, so I should probably stop talking now. If you read this far, thanks. Again, I love the way the project is and by no means am I saying my way is right (I don't even have a way..), I just would love to see a
Re: Pyramid Booth at PyCon 2013: Mummy Awesomeness Unleashed
Count me in. On Wednesday, February 27, 2013 2:29:37 AM UTC-5, Michael R wrote: Pyramid Loving Folks of the World ... um ... unite, The awesomeness of Pylons Project and Pyramid Framework will strike again this PyCon. Please join us for a few hours of boothiness and make it rock (thats right, I said it). So far we got a few volunteers but I am hoping to get 2 dozen so we call enjoy the talks as well kick it at the booth. To make it moire fun, we are teaming up with the Plone and gocept booth for some fun yet to be announced (the word keghave been thrown around). Please let me know you want to help by responding here, or emailing *pyramid \-@-/ webhippo.net *and we will set you up. To confirm the authenticity of this message, I trapped Chris McDonough in a small room, deprived him of beer and he had the following message for you all: Come and help at the booth, or goodwill (Michael R) will hug me -- michael r (a.k.a goodwill) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: is any one using tosca widgets or dynforms in real applications?
On Monday, February 25, 2013 6:14:43 AM UTC-5, kk.gnu wrote: Hello, thanks for the help. ... 3) you can also customize the generated forms via custom templates. This is some thing I did not understand. Could you clearify? The base class that presumably all widgets share looks for an attribute named template, in order to override a template just set that attribute to a new template So for the input field widget ... https://github.com/toscawidgets/tw2.forms/blob/develop/tw2/forms/widgets.py#L31 class InputField(FormField): type = twc.Variable('Type of input field', default=twc.Required, attribute=True) value = twc.Param(attribute=True) template = tw2.forms.templates.input_field so just subclass it and override the template attribute all widgets also have a css_class attribute that can be set to whatever, and then you write your stylesheet accordingly. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: is any one using tosca widgets or dynforms in real applications?
the folks on the toscawidgets mailing list would probably be better qualified to answer that kind of question. I haven't used tw2 in a while but you should be able to override the templates of all the widgets for maximum flexibility, but you can also assign a series of css classes. So there's 2 options for you. On Saturday, February 23, 2013 10:35:56 AM UTC-5, kk.gnu wrote: Hello all, I think the subject says it all. My questions is about tosca widgets. Is it production quality, has some one used in real apps and how good is dynforms for ajax based requirements? Also I wish to know if there is a way to change the css of forms generated by tosca? Happy hacking. Krishnakant. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
pyramid_appengine scaffold version 0.8 released today.
It's been a while since I updated things so I did that this morning. New hotness Upgraded template to app engine sdk 1.7.5 Upgraded project template to depend on pyramid 1.4 Upgraded buildout to version 2.0 Added version pinning via versions.cfg Install from pypi via pip install pyramid_appengine And you can report issues here https://github.com/Batterii/pyramid_appengine/issues -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
webob docs.
for whatever reason http://docs.webob.org doesn't resolve and I get a lovely half assed search page from our ISP. anyone know what's up with that? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/2qGZg7yoVHMJ. 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: webob docs.
Weird. must be an isp thing. or some dns hates ohio. :) On Wednesday, October 31, 2012 12:25:46 PM UTC-4, Chris McDonough wrote: On 10/31/2012 12:23 PM, Thomas G. Willis wrote: for whatever reason http://docs.webob.org doesn't resolve and I get a lovely half assed search page from our ISP. anyone know what's up with that? Works here too. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/2qGZg7yoVHMJ. To post to this group, send email to pylons-...@googlegroups.comjavascript:. To unsubscribe from this group, send email to pylons-discus...@googlegroups.com javascript:. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/hS7rTFvz8r8J. 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: webob docs.
so it looks like i can get to it from wget and it responds with a 302. Location: http://docs.webob.org/en/latest/ ah well. at least I can read the docs now :) On Wednesday, October 31, 2012 12:35:49 PM UTC-4, Thomas G. Willis wrote: Weird. must be an isp thing. or some dns hates ohio. :) On Wednesday, October 31, 2012 12:25:46 PM UTC-4, Chris McDonough wrote: On 10/31/2012 12:23 PM, Thomas G. Willis wrote: for whatever reason http://docs.webob.org doesn't resolve and I get a lovely half assed search page from our ISP. anyone know what's up with that? Works here too. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/2qGZg7yoVHMJ. To post to this group, send email to pylons-...@googlegroups.com. To unsubscribe from this group, send email to pylons-discus...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/9LQXCrVChjsJ. 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: Sites using Pyramid Pyramid Advocacy
I work for Batterii(http://batterii.com) we have a managed innovation solution written in pyramid and ember.js on top of google appengine. We actually have happy customers using it. I had sent someone our logo about a year ago for inclusion on the pylons site but it's still not up there. Ember.js on the other hand included the logo fairly quickly. On Friday, October 19, 2012 9:30:24 PM UTC-4, Blaise Laflamme wrote: I think this should be added to the new pylons project / pyramid sites refactoring. Noted. If you have anything collected please share. On Friday, 19 October 2012 17:33:15 UTC-4, Iain Duncan wrote: Hi everyone, I started a thread about this ages ago, and expressed interest in making something happen, and then life happened and I had not time. Now I'm in a position where this has become a higher priority again. It seems to me that one thing really lacking in the Pyramid docs is some advocacy and examples of high profile sites using Pyramid. I realize this is a bit non-sensical in that we're not talking about a CMS, but I'm sure I'm far from the only one who has had a client ask about that. Plone and SQLAlchemy have done a great job of it. So questions: - sites using Pyramid? is there a list anywhere? - If I want to help make one, what would be the recommended way of going about this? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/sUw3kubem4EJ. 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: Pyramid with GAE error
I suppose the explanation for what you are doing(or should be) should go here then to make it more obvious. http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html#bootstrap-the-buildout ~/ $ cd newproject ~/newproject $ /usr/bin/python2.7 bootstrap.py --distribute pyramid_appengine merely generates a buildout directory based on templates, once the project is generated, it's does not have pyramid_appengine as a dependency. installing pyramid/associated libs like pyramid_appengine in a virtualenv is generally good practice so that you avoid polluting your system install of python maybe it's a miss on the expected experience level of the reader. If I documented why you should use buildout and why you should use virtualenv and why appengine apps are structured the way they are it would be very long documentation that would be quickly out of date because it would have to be copied from other sources. So I'm open to suggestions on how to make this bit clearer, but I'm not too keen on documenting virtualenv, appengine apps and buildout. especially since all 3 are in a state of flux at the moment. Thomas G. Willis On Tue, Sep 25, 2012 at 2:25 AM, Jacob Hite jrh...@gmail.com wrote: I've encountered the same problem. The pyramid docs here specifically document using virtualenv and buildout together. Docs should probably be fixed... http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html On Sun, Sep 16, 2012 at 10:05 PM, Thomas G. Willis tom.wil...@gmail.com wrote: As far as I know, buildout and virtualenv dont play well together. buildout and virtualenv do share some of the same goals such as isolating your development environment libraries from your system. there's no reason I can think of to use both. I would suggest trying to bootstrap the buildout with the system python2.7. like so $ /usr/bin/python2.7 bootstrap.py --distribute ./bin/buildout If that doesn't work, file an issue @ https://github.com/Batterii/pyramid_appengine/issues and I'll see if I can help you out. On Saturday, September 15, 2012 11:43:41 PM UTC-4, Alejandro Jatib wrote: Hi guys, I'm making a new project with pyramid_appengine (I have a few other and these are working fine) and when i try to buildout a skeleton empty project i have this error: . rod.recipe.appengine: Google App Engine distribution already downloaded. While: Installing mascotanube. An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py, line 1852, in main getattr(buildout, command)(args) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py, line 618, in install installed_files = self[part]._call(recipe.install) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py, line 1327, in _call return f() File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py, line 327, in install self.copy_packages(ws, temp_dir) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py, line 234, in copy_packages self.write_pkg_resources(ws, lib) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py, line 217, in write_pkg_resources assert len(setuptools_eggs) == 1, setuptools not found AssertionError: setuptools not found Any suggestion? I use virtualenv and I have setuptools installed in the same virtualenv. Thanks! -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/vpBUKgzFSLkJ. 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. -- 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. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group
Re: Pyramid with GAE error
As far as I know, buildout and virtualenv dont play well together. buildout and virtualenv do share some of the same goals such as isolating your development environment libraries from your system. there's no reason I can think of to use both. I would suggest trying to bootstrap the buildout with the system python2.7. like so $ /usr/bin/python2.7 bootstrap.py --distribute ./bin/buildout If that doesn't work, file an issue @ https://github.com/Batterii/pyramid_appengine/issues and I'll see if I can help you out. On Saturday, September 15, 2012 11:43:41 PM UTC-4, Alejandro Jatib wrote: Hi guys, I'm making a new project with pyramid_appengine (I have a few other and these are working fine) and when i try to buildout a skeleton empty project i have this error: . rod.recipe.appengine: Google App Engine distribution already downloaded. While: Installing mascotanube. An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py, line 1852, in main getattr(buildout, command)(args) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py, line 618, in install installed_files = self[part]._call(recipe.install) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/zc.buildout-1.6.3-py2.7.egg/zc/buildout/buildout.py, line 1327, in _call return f() File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py, line 327, in install self.copy_packages(ws, temp_dir) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py, line 234, in copy_packages self.write_pkg_resources(ws, lib) File /Users/alejandro/Development/Python/enviroments/mascotanube/mascotanube/eggs/rod.recipe.appengine-2.0.0-py2.7.egg/rod/recipe/appengine/__init__.py, line 217, in write_pkg_resources assert len(setuptools_eggs) == 1, setuptools not found AssertionError: setuptools not found Any suggestion? I use virtualenv and I have setuptools installed in the same virtualenv. Thanks! -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/vpBUKgzFSLkJ. 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: Pyramid on GAE
looks like it's bombing out on some setup tools magic(probably some entry points stuff), which doesn't work on appengine. I don't know enough about Chameleon to know what the fix would be. Also, unless you changed buildout.cfg to include it, chameleon won't be deployed with your app anyway. On Monday, September 3, 2012 10:27:07 AM UTC-4, bismigalis wrote: I am trying to run Pyramid 1.3 app on app engine python27 after cookbook recipe Pyramid on Google’s App Engine (using buildout)http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html. All work fine when I return Response object directly, but when i am using renderer option with chameleon template or render_to_responce, I get error Traceback (most recent call last): File /home/user/workspace/qlugat/parts/google_appengine/google/appengine/runtime/wsgi.py, line 195, in Handle result = handler(dict(self._environ), self._StartResponse) File /home/user/workspace/qlugat/parts/qlugat/pyramid/router.py, line 187, in __call__ response = self.handle_request(request) File /home/user/workspace/qlugat/parts/qlugat/pyramid/tweens.py, line 20, in excview_tween response = handler(request) File /home/user/workspace/qlugat/parts/qlugat/pyramid/router.py, line 164, in handle_request response = view_callable(context, request) File /home/user/workspace/qlugat/parts/qlugat/pyramid/config/views.py, line 352, in rendered_view context) File /home/user/workspace/qlugat/parts/qlugat/pyramid/renderers.py, line 396, in render_view return self.render_to_response(response, system, request=request) File /home/user/workspace/qlugat/parts/qlugat/pyramid/renderers.py, line 426, in render_to_response result = self.render(value, system_values, request=request) File /home/user/workspace/qlugat/parts/qlugat/pyramid/renderers.py, line 399, in render renderer = self.renderer File /home/user/workspace/qlugat/parts/qlugat/pyramid/decorator.py, line 17, in __get__ val = self.wrapped(inst) File /home/user/workspace/qlugat/parts/qlugat/pyramid/renderers.py, line 383, in renderer return factory(self) File /home/user/workspace/qlugat/parts/qlugat/pyramid/chameleon_zpt.py, line 25, in renderer_factory return renderers.template_renderer_factory(info, ZPTTemplateRenderer) File /home/user/workspace/qlugat/parts/qlugat/pyramid/renderers.py, line 351, in template_renderer_factory return lookup(info) File /home/user/workspace/qlugat/parts/qlugat/pyramid/renderers.py, line 323, in __call__ if not pkg_resources.resource_exists(package_name, filename): File /home/user/workspace/qlugat/parts/qlugat/pkg_resources.py, line 897, in resource_exists return get_provider(package_or_requirement).has_resource(resource_name) File /home/user/workspace/qlugat/parts/qlugat/pkg_resources.py, line 1196, in has_resource return self._has(self._fn(self.module_path, resource_name)) File /home/user/workspace/qlugat/parts/qlugat/pkg_resources.py, line 1250, in _has Can't perform this operation for unregistered loader type NotImplementedError: Can't perform this operation for unregistered loader type -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/M3aqGbnd20IJ. 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: pyramid_appengine error and debugging
conftest.py bootstraps the test suite so that your unit tests will populate your index.yaml among other things. I wouldn't have expected that to be imported, but I guess if you are using view_config and config.scan() that might happen. On Wednesday, June 27, 2012 11:21:49 AM UTC-4, Alejandro Jatib wrote: Hello I could solve the problem but the reason is very rare. In pyramid_appengine template refers to a library from import google.appengine.tools dev_appserver_index within the file library conftest.py and it is this which is not found. Did anyone have this error? Why can that happen? El martes, 26 de junio de 2012 11:40:10 UTC-3, Alejandro Jatib escribió: I have a project that's work perfect locally but, when i deploy it to GAE i have this error: Error: Server Error The server encountered an error and could not complete your request. If the problem persists, please report your problem and mention this error message and the query that caused it. I'm using only one extra package wtforms (installed adding in requires's setup.py and packages's buildout.cfg) How i can debug this error? Log section on GAE administration panel show no errors. Searching i find this example using webapp: https://developers.google.com/appengine/articles/logging How i can do anything like this? I try to install pyramid_debugtoolbar but i have some errors including this. Any other debuging tips? Thanks, Alejandro -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/CqwMbts4SQEJ. 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: Packaging/Distributing pyramid apps
We use buildout and ant because we have a fairly sizable javascript app talking to a pyramid app on appengine. I'm not sure if ant is really necessary for us but it makes things nice for jenkins. On Friday, June 15, 2012 3:50:43 PM UTC-4, Sontek wrote: What are you guys using these days? easy_install? pip? buildout? etc.. :) Just looking for more information on what all you guys are using and why so that we can make a better decision on what we are going to go with! Thanks! -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/quwq6K8pv30J. 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: Managed Widget Framework
toscawidgets 2. http://www.toscawidgets.org/ Thomas G. Willis On Tue, Jun 5, 2012 at 9:02 AM, Andi Balke andi.ba...@googlemail.com wrote: hi guys, we are using pyramid, sqlalchemy and deform for an application and are quite amazed so far. currently we are looking for a library/framework that provides a managed widget infrastructure. in particular we would like to have something that is able to - let us build widgets with own functionality, e.g. an autocomplete input which is prepared with a datasource - let us build composites, e.g. group different widgets together to a new composite widget - provides interfaces and some kind of manager or the ability to manage a tree (composite pattern) of widgets anyone of you has a good suggestion? thanks, andi -- 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. -- 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: Pyramid 1.3 + GAE + Python 2.7 + threadsafe
Note the dev Yeah, me being a packaging noob, I haven't quite got a hold of what I should do to get rid of that yet, but I do plan on making one more change when SDK 1.6.4 is released because the buildout should be made a lot simpler then. :) @Constatine Also, there's a chapter in the pyramid cookbook now that goes into more detail on how to use it. http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment/gae_buildout.html On Friday, March 23, 2012 4:43:48 PM UTC-4, Jim Washington wrote: On Fri, 2012-03-23 at 09:55 -0700, Constantine Vasil wrote: I was able to successfully run a Hello World Pyramid app using Python 2.5. I need to run Python 2.7 now. Here is what is needed: http://code.google.com/appengine/docs/python/python27/using27.html Hi, Constantine Short answer: It can work. Probably. Long answer: One way to do it is to start with a pyramid scaffold newly built just for this purpose. http://pypi.python.org/pypi/pyramid_appengine/0.5.2devhttp://pypi.python.org/pypi/pyramid_appengine/0.5.2dev Note the dev. Help development of this scaffold by submitting issues to https://github.com/twillis/pyramid_appenginehttps://github.com/twillis/pyramid_appengine. BTW, An initial proof of concept of the setup you mention (and using the scaffold I mention) is at http://test-app-509.appspot.com/http://test-app-509.appspot.com/. - Jim Washington -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/bM7Ic7GL7F8J. 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: Pyramid on GAE
Hey Jim, Thanks for the feedback. I was pleasantly surprised you got it working on pyramid 1.3. I'll have to cut another release to pypi I suppose. :) Depending on when you pulled you may have noticed that unit tests are run through py.test and it takes care of bootstrapping the appengine services for your tests and keeps the index.yaml updated for you(see conftest.py). I am pretty happy with how that turned out because when I was doing my first appengine app, the challenge was writing/running tests under the devappserver environment. Thanks again. now to finish the cookbook recipe. On Wednesday, March 21, 2012 4:59:00 PM UTC-4, Jim Washington wrote: On Wed, 2012-03-14 at 14:04 -0400, Thomas G. Willis wrote: Hello, one of the tasks that was outlined as part of the sprints after pycon was improving the documentation for running pyramid on appengine. I've thrown some code out here with some docs in the readme https://github.com/twillis/pyramid_appengine if you want to give that a spin, just file an issue in github if you have any issues. It's working for me. My notes: Pyramid-1.3 works just fine with webob-1.1.1. Pyramid tests all work, and the buildout takes care of putting the gae-supported webob in the development appserver, so you should get a heads-up through testing if there are any edge cases in your app. You will end up with an extra webob egg in the eggs folder, but that doesn't matter because the stuff in parts/MyApp is what goes to appengine. Anytime you add a required dependency in your app's setup.py, also add that dependency (and sub-dependencies, if any) to the rod.recipe.appengine stanza in buildout.cfg. Then re-run bin/buildout. Note that apps can be spelled differently in the two places. E.g., it's pyramid_rpc in requires, and pyramid-rpc in the appengine stanza. You want pyramid installed in your system python. Don't bother with a virtualenv when using this buildout; the paths get duplicative and confusing. Installing pyramid in your system python makes pcreate -t appengine_starter MyApp or paster create -t appengine_starter MyApp available to you when you want it. You do not want zc.buildout installed system-wide. If you get can't find it errors, that is the most likely problem. When you do python bootstrap.py, don't forget the --distribute. e.g., python bootstrap.py --distribute To run the devappserver, point it to parts/MyApp, not src/MyApp. bin/devappserver parts/MyApp Point bin/appcfg update to the same location. Make sure you run bin/buildout before running, testing or updating your app! parts/MyApp is updated from src/MyApp by buildout. Tasty stuff, BTW. Proof of the pudding at http://test-app-509.appspot.com/ - Jim Washington -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/TJfG5FygZ_cJ. 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: Pyramid on GAE
Hi Jim, I just tried it with pyramid 1.3 and I didn't get the same results you did. Got pyramid 1.3. While: Installing myae. Error: There is a version conflict. We already have: WebOb 1.1.1 but pyramid 1.3 requires 'WebOb=1.2dev'. Is there something you did differently than just running ./bin/buildout ? On Thursday, March 22, 2012 6:22:11 AM UTC-4, Thomas G. Willis wrote: Hey Jim, Thanks for the feedback. I was pleasantly surprised you got it working on pyramid 1.3. I'll have to cut another release to pypi I suppose. :) Depending on when you pulled you may have noticed that unit tests are run through py.test and it takes care of bootstrapping the appengine services for your tests and keeps the index.yaml updated for you(see conftest.py). I am pretty happy with how that turned out because when I was doing my first appengine app, the challenge was writing/running tests under the devappserver environment. Thanks again. now to finish the cookbook recipe. On Wednesday, March 21, 2012 4:59:00 PM UTC-4, Jim Washington wrote: On Wed, 2012-03-14 at 14:04 -0400, Thomas G. Willis wrote: Hello, one of the tasks that was outlined as part of the sprints after pycon was improving the documentation for running pyramid on appengine. I've thrown some code out here with some docs in the readme https://github.com/twillis/pyramid_appengine if you want to give that a spin, just file an issue in github if you have any issues. It's working for me. My notes: Pyramid-1.3 works just fine with webob-1.1.1. Pyramid tests all work, and the buildout takes care of putting the gae-supported webob in the development appserver, so you should get a heads-up through testing if there are any edge cases in your app. You will end up with an extra webob egg in the eggs folder, but that doesn't matter because the stuff in parts/MyApp is what goes to appengine. Anytime you add a required dependency in your app's setup.py, also add that dependency (and sub-dependencies, if any) to the rod.recipe.appengine stanza in buildout.cfg. Then re-run bin/buildout. Note that apps can be spelled differently in the two places. E.g., it's pyramid_rpc in requires, and pyramid-rpc in the appengine stanza. You want pyramid installed in your system python. Don't bother with a virtualenv when using this buildout; the paths get duplicative and confusing. Installing pyramid in your system python makes pcreate -t appengine_starter MyApp or paster create -t appengine_starter MyApp available to you when you want it. You do not want zc.buildout installed system-wide. If you get can't find it errors, that is the most likely problem. When you do python bootstrap.py, don't forget the --distribute. e.g., python bootstrap.py --distribute To run the devappserver, point it to parts/MyApp, not src/MyApp. bin/devappserver parts/MyApp Point bin/appcfg update to the same location. Make sure you run bin/buildout before running, testing or updating your app! parts/MyApp is updated from src/MyApp by buildout. Tasty stuff, BTW. Proof of the pudding at http://test-app-509.appspot.com/ - Jim Washington -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/bHFi6UnJXeMJ. 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: Pyramid on GAE
Thanks Jim, I'll give it a whirl. If you have any other suggestions/issues just file them here. https://github.com/twillis/pyramid_appengine Thanks again for the feedback. On Thursday, March 22, 2012 7:24:52 AM UTC-4, Jim Washington wrote: On Thu, 2012-03-22 at 04:05 -0700, Thomas G. Willis wrote: Hi Jim, I just tried it with pyramid 1.3 and I didn't get the same results you did. My git diff is attached. Caution: it's at works for me - Jim -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/cp_hfw8FEnMJ. 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: Thank You, Chris!
It's strictly a matter of preference which editor/ide you choose. try them all and see which one you feel the most **productive** in. There's plenty of information spanning decades on the internet for vim and emacs. And there's plenty of high quality ide's for python now both free and non-free. It's all about productivity and the journey towards it. On Sunday, March 18, 2012 11:47:17 PM UTC-4, Igor wrote: Oh, that's a good point. You know, I've heard a lot about emacs and vim but never used them. Can you please give me some advices, why would i want to use one of them and maybe a link to starter's guide in using it for python development? On 19 мар, 00:00, Thomas G. Willis tom.wil...@gmail.com wrote: yeah that filled in a lot of gaps for me. It's too bad he didn't have time to get into emacs pdbtrack. I've been wanting that for a while, but I have to deal with further complexities due to how the appengine sdk manages stdout and stderror. On Sunday, March 18, 2012 2:34:41 AM UTC-4, Igor wrote: I just watched a video from PyCon 2012, where Chris McDonough were introducing Pdb, and i REALLY liked this presentation! I'm still new in Python, so i felt my requirement in a debugger for just a few times, but i definitely wanted to dig into that, and here we are -- best introduction ever in video format :D So thank you very much, Chris, It's always a pleasure to listen to you and learn. If somebody haven't seen it yet, as well as tons of other talks from the recent PyCon, i'm inviting you to visit this page http://pyvideo.org/category/17/pycon-us-2012 Also, in my opinion, there were a couple of especially remarkable speeches, given by David Beazley and Guido Van Rossum: http://pyvideo.org/video/659/keynote-david-beazley http://pyvideo.org/video/956/keynote-guido-van-rossum Have fun! -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/QLragA8PifIJ. 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: Thank You, Chris!
I see that the prices have gone up a bit, but the peepcode screencasts are still a good value. You may consider taking these for a spin. https://peepcode.com/products/meet-emacs https://peepcode.com/products/smash-into-vim-i https://peepcode.com/products/smash-into-vim-ii The cool thing about these editors is you pretty much build what you need, they are both quite malleable and can bend to your will. VIM has the upper hand for being installed on damn near every *nix machine and if you had to choose between the 2, it would still be of benefit to know your way around VIM, i'm an emacs user, but I can get enough done in VIM to be pretty productive on any machine. Again, you would do better to focus on what makes you more productive and constantly thinking how you could become more productive. The tools you choose should help you with that, but not every tool works for everyone. You may want to read this as well. FWIW. http://www.amazon.com/Productive-Programmer-Theory-Practice-OReilly/dp/0596519788/ref=sr_1_1?ie=UTF8qid=1332202032sr=8-1 On Monday, March 19, 2012 7:15:23 PM UTC-4, Igor wrote: No, no, no... vim isn't for me, that's for sure! :D I'm using SublimeText 2 right now for my web-dev studies, and i'm totally comfortable with it at the moment, it has all i want for now, including code completion. But it's not free and not open, so i wanted to try something else and I think I found useful link about Emacs for Python here: https://github.com/gabrielelanaro/emacs-for-python -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/yBBLAoMms30J. 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: Thank You, Chris!
yeah that filled in a lot of gaps for me. It's too bad he didn't have time to get into emacs pdbtrack. I've been wanting that for a while, but I have to deal with further complexities due to how the appengine sdk manages stdout and stderror. On Sunday, March 18, 2012 2:34:41 AM UTC-4, Igor wrote: I just watched a video from PyCon 2012, where Chris McDonough were introducing Pdb, and i REALLY liked this presentation! I'm still new in Python, so i felt my requirement in a debugger for just a few times, but i definitely wanted to dig into that, and here we are -- best introduction ever in video format :D So thank you very much, Chris, It's always a pleasure to listen to you and learn. If somebody haven't seen it yet, as well as tons of other talks from the recent PyCon, i'm inviting you to visit this page http://pyvideo.org/category/17/pycon-us-2012 Also, in my opinion, there were a couple of especially remarkable speeches, given by David Beazley and Guido Van Rossum: http://pyvideo.org/video/659/keynote-david-beazley http://pyvideo.org/video/956/keynote-guido-van-rossum Have fun! -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/zbZhMJPvBSMJ. 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: Pyramid on GAE
Hello, one of the tasks that was outlined as part of the sprints after pycon was improving the documentation for running pyramid on appengine. I've thrown some code out here with some docs in the readme https://github.com/twillis/pyramid_appengine if you want to give that a spin, just file an issue in github if you have any issues. Thomas G. Willis On Wed, Mar 14, 2012 at 1:01 PM, Fábio Dias fabio.a.s.d...@gmail.comwrote: Hi! I'm actually trying to do a simple web app using Python 2.7 and pyramid (v 1.3) however I'm stuck in the process of running a demo locally because the documentation from the Pyramid website stops after the installation of the Pyramid framework in the virtual environment, using this tutorial here: http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/narr/install.html#installing-pyramid-on-google-app-engine So I'm new to this world and I'm kind of lost. I've already read and followed Pyramid tutorials and the same for the App Engine but still no success on running locally the web app with Pyramid framework. I would appreciate some lights on doing this! My development environment is Windows 7 with Python 2.7 (and setuptool) installed. Many thanks and sorry about my English. It's the first time that I've been searching for help somewhere out of books or documentation. Best regards, Fábio Dias. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/llk2mnSoRAQJ. 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. -- 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: traversal: resource vs domain model?
Using DENY is handy for stuff like enforcing not being able to like your own posts. On Tuesday, March 6, 2012 4:50:30 AM UTC-5, Daniel Nouri wrote: On Tue, Mar 6, 2012 at 2:24 AM, Mike Orr sluggos...@gmail.com wrote: OK. Any tips for attaching an ACL to them? Especially in the case where permissions are record-specific. For instance, I have a situation where one group can view and edit all records, another group can only view, a third set of users (not a group) can view/edit only this record or a few records, and a fourth set of users can view this record or a few records but not edit them. Would I just specify: [(ALLOW, g:manager1, view), (ALLOW, g:manager1, edit), (ALLOW, g:manager2, view), (ALLOW, user1, view),#... user2, user3 ... (ALLOW, user1, edit),# ... user2, user3... (ALLOW, user4, view), # ... user5, user6.. ]. For those groups (and users) that have permissions globally (can view/edit all records), you can put the entries at the root. With the standard ACLAuthorizationPolicy, it'll get inherited down the traversal path to all children records: root.__acl__ = [ (ALLOW, g:manager1, view), (ALLOW, g:manager1, edit), (ALLOW, g:manager2, view), ] The entries that control access to individual records are attached to exactly those instances: bobsfolder.__acl__ = [(ALLOW, bob, (view, edit))] How do these interact with the permission arg in the view configuration, and with the strings coming from the authenticator? The authenticator will provide user and group names like bob and g:manager2. The view permissions correspond to view and edit here. What does a DENY element mean, and how does it interact with the view config? Does ALLOW mean this permission string is included, and deny means it's excluded? So the permission arg causes a check whether that string is excluded? Why would you need DENY at all then if the default is deny? I haven't ever used DENY, but I suppose it's useful for when you want to take away permissions down the path. Imagine if Bob wanted his home folder not to be readable by g:manager2, he could use a deny ACE to block the inheritance. -- http://danielnouri.org -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/WmmuGvvu-d0J. 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.
pyramid config.include(...) not working as I expect
I've been reading up on extending pyramid applications and trying this out. but it's not working as I expect. http://docs.pylonsproject.org/projects/pyramid/en/1.2-branch/narr/extending.html Anyone see anything immediately wrong with this? import unittest from webtest import TestApp from pyramid.configuration import Configurator from pyramid.response import Response def default_view(request): return Response() def config_user_app(config, with_route=False): if with_route: route_name = default else: route_name = None if route_name: config.add_route(route_name, /) config.add_view(default_view, name=login, route_name=route_name) config.add_view(default_view, name=logout, route_name=route_name) class TestApplicationComposition(unittest.TestCase): def testUserApp(self): works cfg = Configurator() cfg.include(config_user_app) app = TestApp(cfg.make_wsgi_app()) app.get(/login) app.get(/logout) def testIncluded(self): fails with 404 route_prefix = user cfg = Configurator() cfg.include(config_user_app, route_prefix=route_prefix) app = TestApp(cfg.make_wsgi_app()) app.get(/user/login) app.get(/user/logout) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/i6WyT3O6CCEJ. 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: pyramid config.include(...) not working as I expect
Thanks Sontek, After learning more URL dispatch. Basically if I want the view name to be applicable I need to combine URL dispatch with traversal, or have an add_route for every add_view. So I got this down to an example I am happy with. Thanks again for the help. import unittest from webtest import TestApp from pyramid.configuration import Configurator from pyramid.response import Response def default_view(context, request): return Response() def config_user_app(config): class RootFactory(object): __parent__ = None __name__ = None def __init__(self, request): self._request = request def __getitem__(self, key): raise KeyError(key) config.add_route(name=root, path=/*traverse, factory=RootFactory) config.add_view(default_view, name=login, context=RootFactory, route_name=root) config.add_view(default_view, name=logout, context=RootFactory, route_name=root) class TestApplicationComposition(unittest.TestCase): def testUserApp(self): cfg = Configurator() cfg.include(config_user_app) app = TestApp(cfg.make_wsgi_app()) app.get(/login) app.get(/logout) def testIncluded(self): route_prefix = /users cfg = Configurator() cfg.include(config_user_app, route_prefix=route_prefix) app = TestApp(cfg.make_wsgi_app()) app.get(/users/login) app.get(/users/logout) On Monday, March 5, 2012 9:17:36 AM UTC-5, Sontek wrote: On Mon, Mar 5, 2012 at 7:44 AM, Thomas G. Willis tom.wil...@gmail.comwrote: I've been reading up on extending pyramid applications and trying this out. but it's not working as I expect. http://docs.pylonsproject.org/projects/pyramid/en/1.2-branch/narr/extending.html Anyone see anything immediately wrong with this? import unittest from webtest import TestApp from pyramid.configuration import Configurator from pyramid.response import Response def default_view(request): return Response() def config_user_app(config, with_route=False): if with_route: route_name = default else: route_name = None if route_name: config.add_route(route_name, /) config.add_view(default_view, name=login, route_name=route_name) config.add_view(default_view, name=logout, route_name=route_name) class TestApplicationComposition(unittest.TestCase): def testUserApp(self): works cfg = Configurator() cfg.include(config_user_app) app = TestApp(cfg.make_wsgi_app()) app.get(/login) app.get(/logout) def testIncluded(self): fails with 404 route_prefix = user cfg = Configurator() cfg.include(config_user_app, route_prefix=route_prefix) app = TestApp(cfg.make_wsgi_app()) app.get(/user/login) app.get(/user/logout) You need to do an add_route with your add_view for login/logout for this to work. For a breakdown of each you can check out: http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/urldispatch.html http://docs.pylonsproject.org/projects/pyramid/en/latest/api/config.html#pyramid.config.Configurator.add_route http://docs.pylonsproject.org/projects/pyramid/en/latest/api/config.html#pyramid.config.Configurator.add_view -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/i4CaE78jSbkJ. 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: Pyramid on GAE
Yeah. It works, performance is nearly on par with the 2.5 runtime according to our load tests. There are quirks but nothing pyramid specific. On Monday, March 5, 2012 7:09:04 AM UTC-5, Jim Washington wrote: Python2.7 on Google App Engine has moved out of experimental. http://googleappengine.blogspot.com/2012/02/announcing-general-availability-of.html According to a comment on http://www.reddit.com/r/AppEngine/comments/q8p60/announcing_the_general_availability_of_the_python/ 2.7 performance issues seem to be fixed. Has anyone given it a shakedown with Pyramid yet? - Jim Washington -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/mf79sB-WUSQJ. 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: traversal: resource vs domain model?
I can only speak for me and my preferences. I have a domain model and a Resource Model(i guess that is what it is) The resource model is similar to the domain model but there are differences because they both serve different purposes. I use the domain model for persistence and retrieval, and I use the resource model to provide access to the domain model OR expose other services to the views, sometimes a resource model objects serves both purposes, other times the resource is mostly wrapping what's on the domain model. I have no idea if I'm doing it right. But my unit tests still pass :) On Monday, March 5, 2012 3:27:33 PM UTC-5, Jasper wrote: I have a question for the traversal users: do you a) load your model from data (i.e. sqla) and add the resource properties (request, __parent__) in the parent? or b) have a separate domain model class and a resource class that wraps the former with the above properties? (i.e. BlogModel and BlogResource) B seems to be the cleaner version if you have a non-http API as well, but A is clearly simpler. Thanks for sharing your experience. Jasper -- jas...@ilogue.com http://ilogue.com/jasper I'd love to see your attachment, but please use OpenDocument, not a proprietary format like docx. It's an international standard, endorsed by the EU, and implemented in many office suites, such as LibreOffice, and commercial products from Oracle, Sun, IBM and Microsoft (from 2007). -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/L-3rp7kwu3cJ. 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: Announcement: Poolyx - New cms based on pyramid
NEAT. Do you have the code hosted anywhere? I didn't see it on github or bitbucket, I'd be interested in checking stuff out. On Monday, February 27, 2012 2:33:09 PM UTC-5, Arndt Droullier wrote: I'm pleased to announce the first release of a new out of the box content management system based on pyramid. It's intended to be useful to all pyramid users, programming experts as well as non-programmers. Please refer to the website for more information, docs and download. http://www.poolyx.net (The installation is not available through pypi or github yet.) Feedback is welcome. Thanks and enjoy it! Arndt. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/9XyzAxCHFPcJ. 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: Behavior Driven Development in Pyramid
I don't think there's any particular way to do BDD that pyramid endorses. You may want to take a look at lettuce (http://lettuce.it/) the docs should set you well on your way. There's also an interface to selenium so you could in theory have your lettuce scripts drive a web browser. ( https://github.com/bbangert/lettuce_webdriver), the author of this also wrote pylons. Hopefully that helps answer the bdd question. Thomas G. Willis On Sun, Feb 12, 2012 at 5:27 PM, Theron Luhn the...@madebypanthr.comwrote: Hi guys! I'm a PHP developer, but I've decided to switch to Python and Pyramid for a big upcoming project. Before I dive right into Pyramid, however, I'm doing a bit of research and getting all my ducks in a row, so to speak. So, I have a few questions: I've often wanted to start using Test Driven Development in my projects. However, the concept has been completely over my head. Recently I stumbled across Behavior Driven Development, and now it all clicks. What's the best way to use BDD for a Pyramid project? Sessions: Pyramid docs say session data is digitally signed, however, and thus its data cannot easily be tampered with. I don't want anyone tampering with my sessions, easy or not. Is this sufficiently secure, or is there a better implementation? Maybe sessions stored server-side with ZODB? -- 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. -- 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: CMS options?
Using pastedeploy you can mount different wsgi apps at different urls. http://pythonpaste.org/deploy/#the-config-file see egg:Paste#urlmap I presume plone is a wsgi app. You can do the same thing on google appengine in your app.yaml http://code.google.com/appengine/docs/python/config/appconfig.html#Script_Handlers though in your app.yaml you don't have the middleware filter option like you do in Paste so things are slightly different. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/MH1J_cCqmkMJ. 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: CMS options?
Is there a reason you've excluded Kotti from consideration? Just a thought as I'm actually considering Kotti, but briefly playing with it myself, i saw that there's no way to upload images when you are authoring a page. That makes it a little awkward for non-tech folk to add content I think. Or rather a + on the django-cms side for someone who may be expecting something closer to drupal or wordpress. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/2nrmrubBFTYJ. 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: CMS options?
good to hear. I was looking at the code and the docs, and it looks to be easily extendable. I have 2 sites that have very light cms needs at the moment. I may hack on this a bit. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/Lw7bkDs1TDgJ. 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: Events system
The event system in pyramid is simple and kicks ass. I use it to do the following 1: notify interested users about interesting things via email or sms based on their profile preferences. 2: notify the js clients running in the browser via pubnub( http://www.pubnub.com/) of interesting things that just happened on the system(user logged in, added new comment etc...) 3: schedule a map reduce job to calculate and aggregate statistics when certain things change in the data. All of these have one thing in common 1: an event is raised somewhere in the code that a handler receives, serializes and posts it on one or more task queues. 2: a process on the other side is consuming messages from the queue(s) and doing all the cool stuff. If you are on appengine, scheduled tasks consumed by back end instances are great for this. If you want to go enterprisey, there's rabbitmq and you can interface with it via celery or whatever. if you want to go the low tech route you could just write another pyramid application or set of url/view to post to to actually do the work And communicate with it through a queuing system. and restrict access to the local IP. or if you think the work that needs to be done is not going to substantially effect the response time(or you just don't care) you can do it in your event handlers. The point is, the event system does exactly what it advertises, it allows you to publish events in your app and subscribe to them with handlers in your app. The heavy lifting is done by your handlers and is only limited by your imagination, not the event system. :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/rpp_-rXNhogJ. 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: Model validation
H, and yet my company is using pyramid quite successfully where 2 full stack frameworks have failed us. Clearly something is wrong. :) Thomas G. Willis On Mon, Dec 12, 2011 at 11:51 AM, rihad ri...@mail.ru wrote: Pfff... I've got a confession to make :) All this lightweightedness makes using Pyramid a bit confusing at first. It's like needing to get separate Firefox plugins to enable JavaScript, show JPEGs, browse FTP sites, handle form submission, etc. Dare I say, I find full-stack frameworks like TG2 more... appealing. Perhaps lightweight frameworks such as Pyramid are for more advanced usage, although I doubt for which purpose, given that problems a web programmer faces in his projects are amazingly the same. In other words, everyone is welcome to build their own magic framework out of Pyramid as they see fit. That's not a bad thing at all, if that's what you want :) -- 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. -- 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: Pyramid on GAE / Python 2.7
Sorry to revive an oldish thread, but if anyone cares I have more info on this. So running pyramid on GAE 2.7 is possible. That being said, here's the caveats I've come across that may be of interest to others.Note: the issues don't really have anything to do with pyramid. #1: if you use nosegae, you will have to patch google_appengine/lib with webob1.1.1 because it still ships with webob0.9 and the nosegae plugin makes it pretty much impossible to to load webob from anywhere else for unit tests as far as I could tell. #2: i said webob1.1.1 because webob1.1.1 causes dev_appserver_blobstore.py to error out before your tests even get run. I really can't agree with the claim that python2.7 on appengine works and it works great and is awesome. I'm experiencing very slow response times on GAE python2.7 versus the GAE python2.5 version. The difference is at least 10x which is the exact opposite of awesome and stretch to say that it works. But I guess if you don't use the datastore or return a response of nothing more than maybe 1KB maybe you won't notice. :) I'm nowhere near an authority on AppEngine, but my recommendation would be to wait. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/GSC9y2lfeAcJ. 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: Pyramid on GAE / Python 2.7
just a little update based on my further experimentation today The only way to even run your app under 2.7 is to deploy it to the cloud according to this thread. https://groups.google.com/forum/#!topic/google-appengine-python/avIh5auDw0E I think there were other threads as well where the sdk supports 2.7 was causing a lot of confusion. I don't know how they can make that claim when the sdk ships with the 2.5 libraries (webob 0.9) but not the 2.7 libraries and no instructions(as far as I know) on how to install them. So what is the answer to Pyramid on GAE 2.7? I guess it would be kind of, Personally, I'm not going to use something that I have to deploy to another machine or the sexy cloud in order to test, that just seems stupid in 2011 unless you are a J2EE developer. Now, as far as pyramid on GAE 2.5? As far as version 1.0 goes, Hell yes it works, It's awesome. I'm very happy with it and I'm glad that I was able to convince my employer last year when it was still called repoze.bfg to let me ditch the web2py app and re-write it in bfg, and just ignore the django/django-nonrel. I think google jumped the gun on making the 2.7 runtime available to everyone honestly, it's not ready for anything non-trivial. They don't seem to be in any position to support an SDK for it just yet. So bottom line, if you want to use appengine and pyramid, you can, but you have to use the python2.5 runtime, and it may be a challenge overriding the provided webob in my experience. my .02 -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/2GMfTx1Y59QJ. 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: Pyramid on GAE / Python 2.7
Yeah, sdk 1.6, it's quite discouraging. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/ckgiu6kG6kgJ. 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: Pyramid on GAE / Python 2.7
Actually, as the first link indicates, python2.7 is still experimental on GAE. I've been trying to port an app to the 2.7 runtime for a few weeks now and it's not going smoothly to say the least. Most of the trouble is I believe is related to the SDK/dev server does not quite support 2.7 yet. I'm sure a pyramid hello world would work just fine though. :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/TPj6vG-Erg4J. 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: Usability is the most biggest problem of Pylons Pyramid.
http://code.google.com/appengine/docs/python/overview.html Because it's more about the infrastructure than the framework. I'm not saying it's the only option, but if you don't have time to do your own research, or the capital to hire talent away from google and build your own awesome data center, then this is a pretty good out of the box solution. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/Bx_8FiIu0-QJ. 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 is wrong with Pyramid? Open Letter to Community
open rant response to open letter to the community know your interfaces.. I think that a solid understanding of how http works and how browsers communicate with web applications might serve better. For example, an ajax call results in a GET or POST to a URL which is handled by a view in pyramid. in this situation pyramid is the honey badger. it doesn't care if you are using jquery or whatever. your view may be implemented to expect or require ajaxy things but that's up to you. If you look at the docs for jquery about ajax http://api.jquery.com/jQuery.ajax/ you will see the first parameter is the url, in this case jquery is also the honeybadger it doesn't give a damn what answers the request for that url, it could be a static file served up by apache, an appengine application running on the java or GO or python2.5 or python2.7 runtime. It could be a php script, jquery does not care. All the libraries, api's you mentioned have great docs in my opinion. If you can't make sense of all that and put it all together then spend time to make sense of all of it so you can make sense of it. /rant -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/3HkiUtdO2lkJ. 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 is wrong with Pyramid? Open Letter to Community
*if someone says that there are fewer tutorials you shall reply friendly.* WTF man are you my boss or my wife or my mom? * * I'm not a pyramid developer, just a pyramid user like yourself (presumably), and I'm purposely coming off as abrasive mainly because your original post was as abrasive. I'm in the fortunate position of not being impacted in the slightest by your choice to use pyramid or not. And a question for you, why aren't you using ruby on rails? I am very familiar with the docs/tutorials, and yet I'm using pyramid. I know why for me and I'm not crying about the lack of pyramid tutorials. So i'm a little confused by your choices. Were you going to use Django and someone told you that you should use pyramid instead? I'd really be curious to know. Now to be a little more constructive, perhaps you have some topic ideas, and maybe if you shared them perhaps someone might take you up on it and write something up, or perhaps give you a nudge in the right direction and then maybe you could write that tutorial as you learned. But topics as vague as ... Pyramid + Sqlalchemy ? Pyramid + Mako ? Pyramid + Jquery ? Are a tad too general for me personally to be motivated to help. What is it about Pyramid and SqlAlchemy that is not clear to you? for example is it the sqlalchemy session and the transaction manager? How to write models? How to use them in views? For everyone else, sorry for the noise, but for some reason this post just irked me today and I couldn't talk myself out of responding. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/d_9EOw7nHJ0J. 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: Pyramid on cloud
appengine.google.com is not a bad way to go once python 2.7 support is made official, but you have to write your app for it, and that of course has it's own benefits and drawbacks. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/BJYSFdWI-QQJ. 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: in defense of traversal
+100 on traversal. we're using it with appengine and it has served us very well. Thomas G. Willis On Wed, Oct 12, 2011 at 1:37 PM, Stefano Fontanelli s.fontane...@asidev.com wrote: Il 12/10/11 19.10, Iain Duncan ha scritto: (was going to be one post, split in two). I'm wondering about making this into a larger article that could be posted on the docs. A lot of people don't get what the heck good traversal is. Part of the issue is that it's a bit harder to make it really shine without using the zodb, but it's certainly possible. We've done it using SQLAlchemy by having all content types in our cms inherit from one base content type using SA table inheritance. The base type holds the parent child relationships, the path, the title, and links into our system wide permission persistancy scheme. This works like a charm. Sure, the table structure is more complicated, but security is rock solid, and the real kicker: USERS FREAKING LOVE TRAVERSAL! I'm freaking love traversal! We are using it with SQLAlchemy without issues. Change our routing architecture from URL Dispatch to Traversal is the best thing we did during the porting of our SEO-CMS from Pylons to Pyramid. Thank you for it! -- Ing. Stefano Fontanelli Asidev S.r.l. Via Osteria Bianca, 108/A 50053 Empoli (Firenze) Tel. (+39) 333 36 53 294 Fax. (+39) 0571 1 979 978 E-mail: s.fontane...@asidev.com Web: www.asidev.com Skype: stefanofontanelli -- 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.**compylons-discuss@googlegroups.com . To unsubscribe from this group, send email to pylons-discuss+unsubscribe@* *googlegroups.com pylons-discuss%2bunsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/** group/pylons-discuss?hl=enhttp://groups.google.com/group/pylons-discuss?hl=en . -- 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: in defense of traversal
On Wednesday, October 12, 2011 2:53:09 PM UTC-4, Rob Miller wrote: On 10/12/11 11:00 AM, Parnell Springmeyer wrote: One quick thing to add: I am building/maintaining a *big* production application that is 100% on top of Pyramid and strictly uses Traversal and SQLAlchemy. One thing worth noting when using traversal w/ SQL is that you often pay a lookup penalty, since every part of the requested URL path usually results in an additional database query (e.g. GET /foo/bar/baz would be at least 3 queries). or 3 requests to memcached. :) Also, I can imagine that it would be possible in the root factory to have enough information to everything for the context path that it can in one batch. I haven't needed to implement this yet, but it's in the tech debt at work for if things go down in flames. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/fDlbUULVWVQJ. 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: Widget oriented
yeah pyramid works fine for rich ui's. my day job uses gwt for the front end and pyramid for the back. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/FoNk0A57IlEJ. 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: WebOb POST vars like in PHP?
deform is one way. http://docs.pylonsproject.org/projects/deform/dev/ Toscawidgets is another way but that library may not be as stable as you would like at the moment. http://toscawidgets.org/documentation/tw2.core/history.html -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/5pKb0dr1Pp0J. 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: ownership authorization
I've done it with traversal and didn't need to use repoze.what. Basically you just derive your __acl__ attribute anyway you wish. The trick is getting the user associated with the request, but if you are passing in the request to your root_factory function that shouldn't be too much of a problem. get familiar with these things and you should be well on your way. http://docs.pylonsproject.org/projects/pyramid/1.0/narr/resources.html http://docs.pylonsproject.org/projects/pyramid/1.0/narr/security.html#assigning-acls-to-your-resource-objects -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/3lxPDkBdoCEJ. 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 to add middleware
If you want to do it through the ini file, then you should read up on PasteDeploy. http://pythonpaste.org/deploy/#paste-filter-app-factory -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/e7tXGS4PTnoJ. 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: sqlalchemy version in pylons 1.0
it's the orm code that you write that might have a problem with sqla 0.7. Not pyramid. And only you can know if your model code will have a problem running on sqla 0.7 I can say with certainty that the model code I am working on works just fine on sqla 0.7, no issues whatsoever. Also, views that I route requests to via pyramid that in turn consume/produce model objects from that code also work with no issues whatsoever. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/xRQGbHBEFzUJ. 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: Pyramid and access to basic useful objects outside of view callables
Assuming that application.ini defines all your settings for your pyramid app... one way that could work for you is this from paste.deploy import loadapp import os here = os.getcwd() app = loadapp(config:application.ini, relative_to=here) at this point any initialization that was needed should be done. you should be able to do things like import your models and perform queries and such from myapplication.model import User, DBSession [u.email for u in DBSession().query(User)] This assumes your models are defined in model.py and youre session factory is named DBSession or to get your resource root assuming its defined in resource.py as Root and this is what's passed to the configurator as the root_factory from myapplication.resource import Root root = Root() -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/VK2XlHpsgg8J. 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 to use Pyramid/models outside of WSGI/Paster
But that's really a python pastedeploy thing. you dont need the import pyramid to get the app initialized from configuration. Python Paste has docs, http://pythonpaste.org/deploy/#basic-usage Maybe pyramids docs could elaborate on the capabilities of pastedeploy in this section. http://docs.pylonsproject.org/projects/pyramid/1.0/narr/startup.html However I think things like that would probably not be in scope, it's probably good enough that PasteDeploy is mentioned and curious users can go research themselves. :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/txTgkoJD6UMJ. 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: pyramid ecommerce/shopping cart?
Seems to me you would be writing a lot of what openerp already has. http://www.openerp.com/ Maybe using that as a foundation might be a good place to start. -- 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: An overview over form libraries
I like the ideas in tw2(resource injection, js integration, Formencode support, reusable widget patterns), but I'm not confident that it's in the cards to get finished. I've found the validation to be inconsistent. From validators not firing at all(Form), to firing but putting msgs somewhere that I can't find them in my templates(CompoundWidget). Overall, the docs are a little light on how validation works in the built in system. I hope that due to turbogears coming to the pylons project umbrella that there may be some renewed development interest in it. At least to get it to a 1.0 release. It just feels abandoned right now. /end bitching -- 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: some thoughts on pyramid
it's possible to use the Hg-Git plugin and be able to push to and pull from a Git server repository from Mercurial. I was wondering this actually. Is it really practical? as in you don't need to know git to push/pull? learning git is in the cards for me, but it's way down on the list right 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: some thoughts on pyramid
sweet, I will give it a shot then -- 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: pymongo and mongokit
looks to me like mongokit runs on top of pymongo. And it seem like mongokit provides some object mapper functionality that you don't get with pymongo. So I would assume that if objects with some logic are something you want to deal with in your app, mongokit would be the way to go. -- 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: Will Pyramid switch to Python 3?
I saw some twitter traffic a couple of days ago, I guess a prerequisite is a python 3 version webob. -- 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: pyramid ConfigurationConflictError has me baffled
Geez it was a boneheaded move on my part. I was importing those same views into a different module so I could delegate to them. It was a hack that I wondered whether it would bite me in the ass later, and it did. all tests pass now, so our little gae app will be going pyramid before the end of te year I think. Thanks for the help Chris On Dec 21, 4:36 pm, Chris McDonough chr...@plope.com wrote: On Tue, 2010-12-21 at 13:16 -0800, Thomas G. Willis wrote: well at the moment I can't tell. before if I removed the log_event and t_view dec's I would get a 404, which is not correct, but not the same error either. I haven't gotten back to a 200 response on these 2 particular views under pyramid after changing from pyramid.configuration to pyramid.config I'm getting inconsistent results at the moment so my problems might be elsewhere, OSX + buildout + appengine + pyramid + clueless newb(me) = fu I'm going to try to make a smaller example to see if I can narrow it down that way. I'll get on irc once I get back around to it. FTR, you can tell Pyramid to ignore conflict detection by passing autocommit=True to the Configurator: from pyramid.config import Configurator config = Configurator(..., autocommit=True) This will disable conflict detection. - C On Dec 21, 2:02 pm, Chris McDonough chr...@plope.com wrote: Does it work when you use a combination of @view_config and @log_event (e.g. disuse t_view)? On Tue, 2010-12-21 at 10:57 -0800, Thomas G. Willis wrote: Thanks Chris, the thing is I have several other views configured almost identically that are not causing conflicts with these decorators. it's just the login and logout views. the only thing unique about those is that I have login/logout defined to take a different context and they have a slightly different implementation to set some more data when someone logs in. But commenting those out doesn't make these errors go away either. I will look at this more over the holidays and see if I can find anything else out. On Dec 21, 12:41 pm, Chris McDonough chr...@plope.com wrote: Hi Tom, I ran into a baffling issue exactly like this yesterday. What I found out was that I was defining a view as an instance at module scope like this: class SomeViewClass(object): wizard = SomeViewClass(...) wizard_view = view_config(...)(wizard) When I started up the process, and scanned the package, I would get a conflict error that pointed at wizard_view. What was happening was that I was unwittlingly creating *two* views at module scope by assigning the result of view_config to wizard_view. When I did this instead, it all worked: class SomeViewClass(object): wizard = SomeViewClass(...) view_config(...)(wizard) Probably what is happening here is that your code is generating *two* separately named implementations of the same view and a scan is registering both, like mine was. It's unclear how this is happening from the code. You don't mention below if it works when you use @view_config and @log_event together. Does that work? If so, then it would point at @t_view. On Tue, 2010-12-21 at 07:45 -0800, Thomas G. Willis wrote: I'm porting a bfg app over to pyramid and getting some strange things happening that I don't understand... first of all, in order to cut down on the cruft I wrote a wrapper around view_config(formerly bfg_view) and it looks like this... def t_view(route_name=model, renderer=json, **kw): some sugar to for the common things. most views have a common route and renderer **DRY** kw[route_name] = route_name kw[renderer] = renderer return view_config(**kw) and I also have a decorator for logging events def log_event(func): @functools.wraps(func) def _inner(context, request): try: result = func(context, request) except Exception, ex: raise else: try: if hasattr(context, key): context_obj = context.key() else: context_obj = None if hasattr(request, user): created_by = request.user else: created_by = None data = dict(view=request.view_name) evt = Event(context_path=context.path, context_obj=context_obj, created_by=created_by, data=json.dumps(data)) evt.put() except Exception, ex
pyramid ConfigurationConflictError has me baffled
I'm porting a bfg app over to pyramid and getting some strange things happening that I don't understand... first of all, in order to cut down on the cruft I wrote a wrapper around view_config(formerly bfg_view) and it looks like this... def t_view(route_name=model, renderer=json, **kw): some sugar to for the common things. most views have a common route and renderer **DRY** kw[route_name] = route_name kw[renderer] = renderer return view_config(**kw) and I also have a decorator for logging events def log_event(func): @functools.wraps(func) def _inner(context, request): try: result = func(context, request) except Exception, ex: raise else: try: if hasattr(context, key): context_obj = context.key() else: context_obj = None if hasattr(request, user): created_by = request.user else: created_by = None data = dict(view=request.view_name) evt = Event(context_path=context.path, context_obj=context_obj, created_by=created_by, data=json.dumps(data)) evt.put() except Exception, ex: log.error(ex) return result return _inner I get this error at startup ConfigurationConflictError: Conflicting configuration actions For: ('view', class 'hydrant.model.user.UserModel', 'login', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 21, 'module', '@log_event') ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 21, 'module', '@log_event') For: ('view', class 'hydrant.model.user.UserModel', 'logout', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 49, 'module', '@log_event') ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 49, 'module', '@log_event') and here's the functions it's whining about, I can't show the implementation though sorry... #view_config(context=UserModel, name=login, route_name=model, renderer=json) @t_view(context=UserModel, name=login) @log_event def view_login(context, request): ... #view_config(context=UserModel, name=logout, route_name=model, renderer=json) @t_view(context=UserModel, name=logout) @log_event def view_logout(context, request): ... I was thinking that maybe it's the log_event decorator but removing that ConfigurationConflictError: Conflicting configuration actions For: ('view', class 'hydrant.model.user.UserModel', 'login', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 20, 'module', '@t_view(context=UserModel, name=login)') ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 20, 'module', '@t_view(context=UserModel, name=login)') For: ('view', class 'hydrant.model.user.UserModel', 'logout', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 48, 'module', '@t_view(context=UserModel, name=logout)') ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 48, 'module', '@t_view(context=UserModel, name=logout)') so I switch to the view_config decorators... view_config(context=UserModel, name=login, route_name=model, renderer=json) #...@t_view(context=UserModel, name=login) #...@log_event def view_login(context, request): ... view_config(context=UserModel, name=logout, route_name=model, renderer=json) #...@t_view(context=UserModel, name=logout) #...@log_event def view_logout(context, request): ... and I get a 404, all my other views seem to work and they are configured with t_view, and log_event I'm calling config.scan at startup after adding the route. I don't know if I've run into a bug or I'm doing it wrong, any guidance is appreciated. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: pyramid ConfigurationConflictError has me baffled
Thanks Chris, the thing is I have several other views configured almost identically that are not causing conflicts with these decorators. it's just the login and logout views. the only thing unique about those is that I have login/logout defined to take a different context and they have a slightly different implementation to set some more data when someone logs in. But commenting those out doesn't make these errors go away either. I will look at this more over the holidays and see if I can find anything else out. On Dec 21, 12:41 pm, Chris McDonough chr...@plope.com wrote: Hi Tom, I ran into a baffling issue exactly like this yesterday. What I found out was that I was defining a view as an instance at module scope like this: class SomeViewClass(object): wizard = SomeViewClass(...) wizard_view = view_config(...)(wizard) When I started up the process, and scanned the package, I would get a conflict error that pointed at wizard_view. What was happening was that I was unwittlingly creating *two* views at module scope by assigning the result of view_config to wizard_view. When I did this instead, it all worked: class SomeViewClass(object): wizard = SomeViewClass(...) view_config(...)(wizard) Probably what is happening here is that your code is generating *two* separately named implementations of the same view and a scan is registering both, like mine was. It's unclear how this is happening from the code. You don't mention below if it works when you use @view_config and @log_event together. Does that work? If so, then it would point at @t_view. On Tue, 2010-12-21 at 07:45 -0800, Thomas G. Willis wrote: I'm porting a bfg app over to pyramid and getting some strange things happening that I don't understand... first of all, in order to cut down on the cruft I wrote a wrapper around view_config(formerly bfg_view) and it looks like this... def t_view(route_name=model, renderer=json, **kw): some sugar to for the common things. most views have a common route and renderer **DRY** kw[route_name] = route_name kw[renderer] = renderer return view_config(**kw) and I also have a decorator for logging events def log_event(func): @functools.wraps(func) def _inner(context, request): try: result = func(context, request) except Exception, ex: raise else: try: if hasattr(context, key): context_obj = context.key() else: context_obj = None if hasattr(request, user): created_by = request.user else: created_by = None data = dict(view=request.view_name) evt = Event(context_path=context.path, context_obj=context_obj, created_by=created_by, data=json.dumps(data)) evt.put() except Exception, ex: log.error(ex) return result return _inner I get this error at startup ConfigurationConflictError: Conflicting configuration actions For: ('view', class 'hydrant.model.user.UserModel', 'login', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 21, 'module', '@log_event') ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 21, 'module', '@log_event') For: ('view', class 'hydrant.model.user.UserModel', 'logout', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 49, 'module', '@log_event') ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 49, 'module', '@log_event') and here's the functions it's whining about, I can't show the implementation though sorry... #view_config(context=UserModel, name=login, route_name=model, renderer=json) @t_view(context=UserModel, name=login) @log_event def view_login(context, request): ... #view_config(context=UserModel, name=logout, route_name=model, renderer=json) @t_view(context=UserModel, name=logout) @log_event def view_logout(context, request): ... I was thinking that maybe it's the log_event decorator but removing that ConfigurationConflictError: Conflicting configuration actions For: ('view', class 'hydrant.model.user.UserModel', 'login', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views
Re: pyramid ConfigurationConflictError has me baffled
well at the moment I can't tell. before if I removed the log_event and t_view dec's I would get a 404, which is not correct, but not the same error either. I haven't gotten back to a 200 response on these 2 particular views under pyramid after changing from pyramid.configuration to pyramid.config I'm getting inconsistent results at the moment so my problems might be elsewhere, OSX + buildout + appengine + pyramid + clueless newb(me) = fu I'm going to try to make a smaller example to see if I can narrow it down that way. I'll get on irc once I get back around to it. On Dec 21, 2:02 pm, Chris McDonough chr...@plope.com wrote: Does it work when you use a combination of @view_config and @log_event (e.g. disuse t_view)? On Tue, 2010-12-21 at 10:57 -0800, Thomas G. Willis wrote: Thanks Chris, the thing is I have several other views configured almost identically that are not causing conflicts with these decorators. it's just the login and logout views. the only thing unique about those is that I have login/logout defined to take a different context and they have a slightly different implementation to set some more data when someone logs in. But commenting those out doesn't make these errors go away either. I will look at this more over the holidays and see if I can find anything else out. On Dec 21, 12:41 pm, Chris McDonough chr...@plope.com wrote: Hi Tom, I ran into a baffling issue exactly like this yesterday. What I found out was that I was defining a view as an instance at module scope like this: class SomeViewClass(object): wizard = SomeViewClass(...) wizard_view = view_config(...)(wizard) When I started up the process, and scanned the package, I would get a conflict error that pointed at wizard_view. What was happening was that I was unwittlingly creating *two* views at module scope by assigning the result of view_config to wizard_view. When I did this instead, it all worked: class SomeViewClass(object): wizard = SomeViewClass(...) view_config(...)(wizard) Probably what is happening here is that your code is generating *two* separately named implementations of the same view and a scan is registering both, like mine was. It's unclear how this is happening from the code. You don't mention below if it works when you use @view_config and @log_event together. Does that work? If so, then it would point at @t_view. On Tue, 2010-12-21 at 07:45 -0800, Thomas G. Willis wrote: I'm porting a bfg app over to pyramid and getting some strange things happening that I don't understand... first of all, in order to cut down on the cruft I wrote a wrapper around view_config(formerly bfg_view) and it looks like this... def t_view(route_name=model, renderer=json, **kw): some sugar to for the common things. most views have a common route and renderer **DRY** kw[route_name] = route_name kw[renderer] = renderer return view_config(**kw) and I also have a decorator for logging events def log_event(func): @functools.wraps(func) def _inner(context, request): try: result = func(context, request) except Exception, ex: raise else: try: if hasattr(context, key): context_obj = context.key() else: context_obj = None if hasattr(request, user): created_by = request.user else: created_by = None data = dict(view=request.view_name) evt = Event(context_path=context.path, context_obj=context_obj, created_by=created_by, data=json.dumps(data)) evt.put() except Exception, ex: log.error(ex) return result return _inner I get this error at startup ConfigurationConflictError: Conflicting configuration actions For: ('view', class 'hydrant.model.user.UserModel', 'login', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 21, 'module', '@log_event') ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 21, 'module', '@log_event') For: ('view', class 'hydrant.model.user.UserModel', 'logout', None, InterfaceClass pyramid.interfaces.IView, None, None, None, 'model', None, False, None, None, None) ('/Users/twillis/projects/hydrant-pyarmid/src/hydrant/hydrant/ views/user.py', 49, 'module
Re: application deployment question about nginx and pylons
I am pretty sure you can do those things with apache too :) . I was under the impression that nginx is easier to setup and faster/lighter weight for things specific to web applications. My experience has been that apache configs don't fit my brain all that well, whereas I found nginx configuration to be fairly straightforward for the most part. On Tue, Apr 27, 2010 at 3:47 PM, Terry Schmitt tschm...@schmittworks.com wrote: Krishnakant, I can't speak to the best method with Pylons, as I'm just learning Python and Pylons, but to me, the main benefit of using Nginx and reverse proxy is: 1. You can load balance between several instances of your pylons app. 2. Nginx can serve all your static content for you, which reduces the load on the app server. Thanks, Terry -- Thanks, but what bennifit will we get by reverce proxy with nginx? Isn't there a way like apache uses mod_python? Happy hacking. Krishnakant. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: can any one recommend a good library for generating printable reports for my pylons web app?
For server side, there's report lab http://pypi.python.org/pypi/reportlab for client side, google visualization might work for you. http://code.google.com/apis/visualization/documentation/gallery/table.html there's a python library to help build the data structures that the js expects. http://code.google.com/p/google-visualization-python/ On Tue, Apr 13, 2010 at 1:33 PM, Krishnakant Mane krm...@gmail.com wrote: hello. I have a requirement where I need to generate spreadsheet type reports as well as integrating pdf reports into my web app. I should be able to print them from my browser. Some of them are generated dynamically so I will jsonify my pylons method to give out the data, but are there some libraries which can help me generate spreadsheet kind of interface in the front-end. I know this is a bit off topic, but I thought this could be asked here since there are experienced web developers. happy hacking. Krishnakant. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: can any one recommend a good library for generating printable reports for my pylons web app?
On Tue, Apr 13, 2010 at 2:07 PM, Krishnakant Mane krm...@gmail.com wrote: On Tuesday 13 April 2010 11:13 PM, Thomas G. Willis wrote: For server side, there's report lab http://pypi.python.org/pypi/reportlab I have used report lab before to generate pdf but I did not quite understand how it will help at the server side with my pylons app? Is there a way to render pdf directly to a web browser (provided of course that the browser has the plugin for viewing pdf). I'd have to look at the docs to be sure, but getting the browser to pick it up as a pdf and use the associated application should be a matter of setting the headers correctly on the response. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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 db connection
I believe in sqlalchemy scoped_session is used for this purpose. http://www.sqlalchemy.org/docs/05/reference/orm/sessions.html#sqlalchemy.orm.scoped_session example usage: engine = engine_from_config(config) session = scoped_session( sessionmaker(expire_on_commit = False, bind = engine)) On Mon, Mar 22, 2010 at 6:43 PM, kworm kw...@sofnet.com wrote: Hi, I'm new to Pylons and Python for that matter and I'm looking for the best way to handle thread safety for an ibm_db (DB2 CLI library interface) database connection in a Pylons app. I have seen several older topics on this but not really a clear answer. Any suggestions would be appreciated. Thanks, Kevin -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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 db connection
Well you could always look at the source for scoped_session :) On Mon, Mar 22, 2010 at 7:18 PM, Kevin Wormington kw...@sofnet.com wrote: I'm not wanting to use sqlalchemy, just the low level database interface. I have a working example with sqlalchemy but I prefer to use the low level interface so I need to make a db connection handle thread safe. I don't really care whether the connections are pooled. Kevin Thomas G. Willis wrote: I believe in sqlalchemy scoped_session is used for this purpose. http://www.sqlalchemy.org/docs/05/reference/orm/sessions.html#sqlalchemy.orm.scoped_session example usage: engine = engine_from_config(config) session = scoped_session( sessionmaker(expire_on_commit = False, bind = engine)) On Mon, Mar 22, 2010 at 6:43 PM, kworm kw...@sofnet.com wrote: Hi, I'm new to Pylons and Python for that matter and I'm looking for the best way to handle thread safety for an ibm_db (DB2 CLI library interface) database connection in a Pylons app. I have seen several older topics on this but not really a clear answer. Any suggestions would be appreciated. Thanks, Kevin -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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 images from database
It depends really, if you believe Oracle(or any database vendor), they claim serving file blobs from their database is more efficient then the filesystem and has the benefit of transactional integrity. At least that's how my day job rationalized storing images/pdf's and other things related to a patient chart in the database along with everything else that is stored. But I can see where this would be considered misuse of a database(when all you have a hammer, everything looks like a nail). I would say it's an exotic use of the db for sure. Not mention it's likely that your code will end up relying on more vendor specific api's for this which makes your code less portable. Nonethless, sqlalchemy has column types for binary data. http://www.sqlalchemy.org/docs/search.html?q=binarycheck_keywords=yesarea=default On Sun, Feb 21, 2010 at 11:57 AM, gazza burslem2...@yahoo.com wrote: Why is this wrong? Is it performance? Much appreciated, Garyc On Feb 20, 6:58 pm, Jonathan Vanasco jonat...@findmeon.com wrote: On Feb 20, 4:59 pm, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote: I thought this was generally not recommended and that you should instead store the files on the file system with just the paths to the files in the database. That would be correct. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: Writing a web app as a series of plugins
. There are other frameworks that are more purposely designed to have plugins, the thing is, those frameworks need to enforce an api and are then more restrictive than pylons. Some are more restrictive than others of course. That's the trade off -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: Windows: relationship between paster, python, and your application
On Tue, Feb 16, 2010 at 3:08 PM, Veloz michaelve...@gmail.com wrote: Yeah, I understand that httpserver code is effectively being run - and this code is responsible for creating the thread pool, and the worker threads handle incoming http requests, which eventually call your controller code, etc, etc, etc. This is not really the part that I was unclear about. Let's try it this way: the httpserver code you refer to is not really executed by paster directly, is it? The httpserver code is python code (I can see the source file on my computer, it's apparently not bundled into paster.exe) that has to be parsed and executed by some instance of python., and I suspect paster does not have a built in python interpreter that it's using. paster is just a python script line 1 instructs the os to use the interpreter to run the script. http://bitbucket.org/ianb/paste/src/tip/scripts/paster the interpreter is invoked in order to run it. the paster.exe on windows is a little bit of magic from setuptools I think, and I'm not familiar with the exact mechanics of it, but ultimately the above script gets called. Therefore, at some point, when you start paster serve app.ini a copy of the python interpreter is launched (not sure how?) and at some point this instance of the interpreter is really running the show. That is, the python interpreter is executing the htppserver ptyhon code, which eventually is calling your controller code, etc. In other words Paster isn't really executing anything as your app runs; it somehow gets the ball rolling through Python, though. It's this transition of 1) you starting paster.exe, to: 2) python ends up executing the httpserver code and your pylons code, that I want to understand better. And once Python is executing the code, what role does paster.exe continue to play? (Referring to my original post as proof of collaboration between python and paster: I can kill paster, yet see evidence that my pylons app is still being executed (by the instance of python). So clearly there's some point at which paster is sort of handing the baton to python) Hope this makes sense. Any thought? Michael Well there's always the source. :) http://bitbucket.org/ianb/paste/src/tip/scripts/paster http://bitbucket.org/ianb/paste/src/tip/paste/app_setup.py http://bitbucket.org/ianb/paste/src/tip/paste/server.py -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: Windows: relationship between paster, python, and your application
On Feb 15, 2:45 pm, Veloz michaelve...@gmail.com wrote: Hi I came across something surprising recently that made me scratch my head and want to understand more deeply the relationship between paster, your pylons code, and python. I added some code to the destructor of my Globals object. This code waits 10 seconds, in a timing loop, and then prints a message. When I kill paster with Ctrl-c, it returns to the C: prompt. 10 second later, this message is printed out. I concluded that something other than the paster executable is running my pylons code. I suspected it must be an instance of Python, and when I look at Task Manager I can confirm this. Does anyone know any of the details of how python, paster, and your pylons code is related? Here's what I think I know: - You start paster serve xxx.ini and somehow an instance of python is launched - I'm tempted to say that somehow paster then asks/causes the python instance to fully execute your pylons executable and thus the python instance will stay running until all your threads in your pylons app are done. - Is this even close to right? - So when I do a ctrl-c, to stop paster, who is getting the ctrl-c and acting on it? Paster or python? - If paster is effectvely starting python and having it execute your pylons app, why does paster continue to run as an executable once it's gotten everything started i.e., what could it be doing once python is executing your pylons app? Any insights here could clear a lot of things up for me! Thanks! Michael when you run paste serve app.ini you are launching an instance of PasteHttpServer http://pythonpaste.org/modules/httpserver.html . So to answer the question what is paste doing? it is speaking the HTTP protocol on a specified port, it receives the request, and then hands it off to your pylons app. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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 scheduled method
I would write a custom paste command to do it, then schedule that as a cron job. There doesn't seem to be any reason to make that part of the request/response cycle. read up on this stuff http://pythonpaste.org/script/developer.html and maybe look at how pylons does it. http://bitbucket.org/bbangert/pylons/src/tip/pylons/commands.py so you would have a command line similar to this. $ paste purge-old-files production.ini On Feb 8, 6:33 am, morellik enrico.more...@gmail.com wrote: Dear all, is it possible to integrate in pylons a controller that do something in a predefinite time? I wrote an application that permit to our user to share files. So I would that each, e.g., two days a method check for files older than two days and remove these from disk and database. Is it possible? Thanks in advance Enrico -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: help with a python problem
I am not familiar with enigma, but my guess based on the error is that there are c extensions that are giving errors, swig being mentioned is why I think that. I would try building it from source, or at least confirming with the developers that it is known to work on the python version you are running. Again, this is a wild guess as I am not familiar with enigma2 or dreambox. You may get a better answer on the enigma developer mailing list. https://lists.elitedvb.net/mailman/listinfo/enigma2-devel If it is c extensions, you probably need to install a version compatible with whichever python you are running. On Feb 5, 10:28 am, GwaiTsi re...@ozemail.com.au wrote: I have python 2.5.1 on my dreambox with Enigma2 ver 2.5 and the code works fine. when i change the enigma2 binaries to 2.6 or 2.7 (without changing anything else) i get the following error. Traceback (most recent call last): File /usr/lib/enigma2/python/mytest.py, line 3, in module import enigma File /usr/lib/enigma2/python/enigma.py, line 1281, in module class eGauge (eWidget): File /usr/lib/enigma2/python/enigma.py, line 1286, in eGauge __swig_destroy__=_enigma.delete_eGauge AttributeError: 'module' object has no attribute 'delete_eGauge' can anyone else me with the debugging of it, as i am new to python please. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: Do your models handle all the data logic?
On Sun, Jan 31, 2010 at 7:09 AM, Haron Media i...@haronmedia.com wrote: I wonder how you build your models, do they handle all the data logic? ...snip... I wonder what other patterns would you guys use? Vlad Little late chiming in here. In the past I've tried to fully utilize all the features of the model classes, and I found myself bending my requirements to fit the framework. So I've backed off from that in favor of treating models as strictly row representations. This led to my controllers being a lot more complicated, which I didn't like either. So I've recently found that bfg model traversal(i call it context traversal) fits my brain better than routes. I'm not saying that everyone should ditch pylons in favor of bfg however. Just saying that I'm finding that there's potentially another object role in the system besides a model/view/controller. I guess my line of thinking right now is 1 - views inject data into templates 2 - controllers receive web requests and dispatch to something that produces something else to hand off to the views 3 - models represent rows and maybe relationships 4 - context receives data from the controller decides what to do and does it. whether it be get some models, or validate form posts. So far I feel this has led to a fairly rigid pattern that makes interaction between all the pieces consistent. But I'm sure that there's some complex scenario out there that breaks everything. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: Authentication question
On Jan 8, 10:34 am, Brian O'Connor gatzby...@gmail.com wrote: I’m developing an application now and the time has come to start developing the user accounts portion of the website. This is my scenario I have no need for permissions / groups / administrators or an administration panel. Every visitor to the site MUST be a User. This means that when I make a request, if I don’t have a user_id in the session, I create a User() for them and store it in their session. Users need to be able to login, logout, register, etc. I would like to connect it with Facebook and twitter. I would also like to explore the possibility of allowing people to use OpenID to create their accounts and login, but they must create a username on my site regardless of their login method. Should I seriously consider repose.what/who, or should I just roll my own middleware that just places a remote_user into the request? Hey Brian, repoze.who is only going to give you the authentication piece. It doesn't facilitate registering etc... also, in my opinion, register also implies password reset, so you may want to be thinking about that too. FWIW, I spent a good portion of December attempting to write a generic framework to provide somewhat reusable components or :patterns I threw it up on bitbucket after I felt it was solid enough that someone else might find it useful. http://bitbucket.org/twillis/identity.model While the apps are written in bfg, there are examples of integration via paste/wsgi. Feel free to look it over for inspiration. But to answer your overall question, the experiment from December pretty much convinced me, that looking for a drop in solution for auth/ registration is somewhat hopeless in most situations. Those features are too important and too tightly coupled to your application for something general to work completely. I've noticed others have come to the same conclusion. That's not to say you have to write it all yourself. I think repoze.who is useful for authentication in some scenarios (authtkt implementation etc), Thanks, Brian -- Brian O'Connor -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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: eclipse plugin for pylons
After getting comfy with ipython i've found I don't miss intellisense one bit in python(or pydev for that matter). On the other hand, for Java and C# it's totally valuable. On Mon, Dec 21, 2009 at 4:02 PM, gsandorx gsand...@gmail.com wrote: Hi there, I've been trying to successfully use PyDev in Eclipse to write my Pylons apps. Of course, I guess you guys know all the issues involved: paster and debugging, intellisense, etc. Wouldn't be nice to have a Pylons plugin for Eclipse just like the Google's GWT plugin for Eclipse? Furthermore, is there such plugin? In case there isn't (and I'm afraid there is not), I guess it wouldn't be too much difficult for a skilled Java programmer to create one. She/He would lunch the Pylons community ... to the infinity and beyond! :) -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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 installation Error
On Thu, Dec 17, 2009 at 7:12 PM, Mario Romero mari...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA224 it seems your upgrade to python 2.6 broke yum. Personally, I suggest you get rid of RH and stick to Ubuntu. Otherwise you need to fix yum (by rolling back to 2.4 perhaps) and after that make sure zlib is installed as well as its development headers (zlib/zlib-devel) you also might be forced to have 2 different python versions running in your system, in which case you might want to look at using virtualenv (you should do this whatever you decide to do). +1 Just to further expound on this advice. Ubuntu also uses python for some system critical functions so I've gotten in the habit of building from source and installing in ~/local and then virtualenv, per project. This way I can only hose my home directory by installing various packages and such. ./configure --prefix=/home/you/local make make install then install distribute $ curl -O http://python-distribute.org/distribute_setup.py $ python distribute_setup.py then install virtualenv $ easy_install virtualenv keep sanity in tact. -- Thomas G. Willis -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-disc...@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 cause a form error outside of an @validate schema ?
I would think formencode/htmlfill allows for this. If you need to validate the entire form, use a chained validator(or several), In your validator you can make your error message say whatever you want. Spend some time with the docs, they are pretty thorough. http://formencode.org/ and maybe consider not using the validate decorator, not because it doesn't work or is not useful, but it is a tad less flexible, and I don't think it saves you very much honestly. Also, when I was trying to get my brain comprehending this stuff, this section of the pylons book was invaluable. A true A-HAH !! moment honestly. http://pylonsbook.com/en/1.1/working-with-forms-and-validators.html#handling-forms-manually On Oct 23, 4:18 pm, Jonathan Vanasco jonat...@findmeon.com wrote: On Oct 23, 3:55 pm, d2ncal d2n...@gmail.com wrote: I am looking for the same thing. Currently, I am setting session['flash_error'] and calling my show_form function which does htmlfill. but there has to have a better way. How does your show_form function handle htmlfill ? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
@validate ....
On Oct 23, 4:54 pm, Mike Orr sluggos...@gmail.com wrote: On Sun, Oct 11, 2009 at 1:53 PM, Jonathan Vanasco jonat...@findmeon.com wrote: This is one of the problems with @validate; it's not flexible enough for this situation. The developers are mulling over ways to rewrite it or replace it. -- Mike Orr sluggos...@gmail.com What's been discussed so far? I've been thinking about this a lot lately because validation is tedious(obviously) but I have yet to find a less tedious solution. I'd be interested in hearing what the smart guys are kicking around though. --~--~-~--~~~---~--~~ 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: Deploy question: how to configure the nginx + fastcgi+tg2/pylons ?
I coudl be wrong here, but I was under the impression that fastcgi was on it's way out of favor and that mod_wsgi was the new hottness. this may be why you can't find any information on it. On Thu, Oct 22, 2009 at 5:41 AM, Boern cayso...@gmail.com wrote: Hi,all: I am newbie for the tg2 or pylons,and I have developed a simple app use tg2, I want to use the nginx + fastcgi to deploy the app, so I searched the tg2 wiki and pylons site,but I found only one article that describes how to run pylons with nginx proxy server ,I just want to know how to configure the nginx+fastcgi + tg2 or pylons,so anybody has the experience ? and another question is which one is better between nginx as proxy server and nginx + fastcgi? thanks,all! -- Boern Parx -- Thomas G. Willis --~--~-~--~~~---~--~~ 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: can't find a perfect tw.forms with pylons tutorial.
On Tue, Sep 29, 2009 at 5:43 PM, cd34 mcd...@gmail.com wrote: The very minimal controller you need to do the ToscaWidgets movie tutorial is: from pylons import request, response, session, tmpl_context from tw.mods.pylonshf import validate import tw.forms as twf from cp.lib.base import BaseController, render movie_form = twf.TableForm('movie_form', action='save', children=[ twf.HiddenField('id'), twf.TextField('title'), twf.TextField('year', size=4), twf.CalendarDatePicker('release_date'), twf.SingleSelectField('genera', options=['', 'Action', 'Comedy', 'Other']), twf.TextArea('description', validator=twf.validators.NotEmpty), ]) class TestController(BaseController): def index(self): tmpl_context.form = movie_form return render('/movie.mako') �...@validate(movie_form, error_handler='index') def save(self, **kw): return str(kw) and movie.mako would contain: ${tmpl_context.form()|n} Example taken from: http://toscawidgets.org/documentation/tw.forms/tutorials/index.html The page: http://toscawidgets.org/documentation/tw.forms/tutorials/validate_pylons.html contains an error in the validate string which is missing the quotes around the error_handler. @validate(form=movie_form, error_handler=index) should be replaced with: @validate(form=movie_form, error_handler='index') i use tw.forms, but I always found the validate decorator doesn't necessarily fit my brain. However, you can fall back on formencode/htmlfill which is what the validator wraps up for you. It's not that much more code. http://pylonsbook.com/en/1.0/working-with-forms-and-validators.html#introducing-formencode give that a shot. -- Thomas G. Willis --~--~-~--~~~---~--~~ 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 with chameleon?
On Tue, Sep 29, 2009 at 7:36 PM, Iain Duncan iaindun...@telus.net wrote: To be more precise: chameleon.genshi implements the Genshi XML template syntax as described in http://genshi.edgewall.org/wiki/Documentation/0.5.x/xml-templates.html . ?python is not a part of that syntax. That tutorial does not work due to a limitation chameleon.genshi currently has: match templates defined in included templates are not applied to the calling document. That is documented at http://pypi.python.org/pypi/chameleon.genshi. If enough people ask Malthe if he can add support for that might be fixed :) Sorry if I'm being dumb here, but I'm confused by the above. Does this mean that one can't use a master and derived templates setup with match templates? That would seem to be a big limitation, but maybe I am doing this wrong. Can you tell me how you handle template inheritance or master templates with chameleon.genshi? thanks Iain That's what I took it to mean. Another way to get the same effect is to use something like deliverance or repoze.tempita which is why I wasn't too worried about it. http://svn.repoze.org/repoze.tempita/trunk/README.txt http://www.coactivate.org/projects/deliverance/introduction Though I'm wondering now whether the overhead of either of these 2 would eliminate any gains from chameleon.genshi over straight genshi -- Thomas G. Willis --~--~-~--~~~---~--~~ 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 with chameleon?
On Sat, Sep 26, 2009 at 3:26 PM, Wichert Akkerman wich...@wiggy.net wrote: On 2009-9-26 21:10, Thomas G. Willis wrote: On Sep 26, 10:14 am, Wichert Akkermanwich...@wiggy.net wrote: On 2009-9-25 22:55, Iain Duncan wrote: Hm, the chameleon.zpt template has not seen as much love as the chameleon.genshi version so it might have broken somewhere. Can you test if chameleon.genshi works for you? If so I'll look at fixing up the chameleon.zpt version. Thanks, Chameleon genshi is working with your correction. Is the plan for chameleon to eventually be able to support both genshi and tal attributes at the same time or will it always be an either or? My correction was in chameleon.zpt. chameleon.genshi has always had a working template loader. As far as I know there are no plans to support both Genshi and Page Template syntax in the same file, and I have to admit that I personally do not see any real benefits to doing that. chameleon.zpt does go a little bit beyond the official zpt standards though: it also supports ${...} expansions, similar to Genshi templates. Wichert. -- Wichert Akkermanwich...@wiggy.net It is simple to make things.http://www.wiggy.net/ It is hard to make things simple. I was just playing with this and it seems that the genshi syntax is somewhat limited. Is that correct? For example, including a site page just like this example from gensh blows up. http://genshi.edgewall.org/wiki/GenshiTutorial#AddingaLayoutTemplate And even though I know it's not good practice to do the whole? python ? thing, chameleon seems to blow up on this as well. To be more precise: chameleon.genshi implements the Genshi XML template syntax as described in http://genshi.edgewall.org/wiki/Documentation/0.5.x/xml-templates.html . ?python is not a part of that syntax. That tutorial does not work due to a limitation chameleon.genshi currently has: match templates defined in included templates are not applied to the calling document. That is documented at http://pypi.python.org/pypi/chameleon.genshi. If enough people ask Malthe if he can add support for that might be fixed :) Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. Yes I saw that match templates are not applied, but for some reason I was thinking that meant are ignored not causes things to blow up. So I wasn't sure whether other things were fuxored on my machine that might be causing this. But that's neither here nor there. I can work around these things if it means super fast templates I was just curious about it. Thanks for the clarification. -- Thomas G. Willis --~--~-~--~~~---~--~~ 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: problems using repoze.auth
.egg/pkg_resources.py, line 1913, in load ImportError: No module named auth.repoze_auth Starting subprocess with file monitor Does anyone have any suggestions on how to deal with this? It looks to my untrained eye that I need to install ToscaWidgets, and maybe do something to load my lib/auth/repoze_auth.py file. If that's right, can anyone tell me how to do this? Thanks! Travis -- Obama Nation | My emails do not have attachments; it's a digital signature that your mail program doesn't understand. | http://www.subspacefield.org/~travis/http://www.subspacefield.org/%7Etravis/ If you are a spammer, please email j...@subspacefield.org to get blacklisted. -- Thomas G. Willis --~--~-~--~~~---~--~~ 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: user management (login, registration, etc.)
I would probably recommend reading up on Paste http://pythonpaste.org/do-it-yourself-framework.html Should help you understand the wsgi things underlying pylons. It helped me anyway. On Thu, Sep 10, 2009 at 1:59 PM, travis+ml-pyl...@subspacefield.orgtravis%2bml-pyl...@subspacefield.org wrote: On Sun, Aug 30, 2009 at 12:01:32AM -0700, Mike Orr wrote: That looks cool. Is it listed in the Pylons Cookbook somewhere? We'll be getting more questions like this. Thanks to everyone who helped out with my question. I'm trying to wrap my head around all of this - Pylons is surprisingly complicated! I read through most of the pylonsbook.com and understood most of it. I also located the pylons cookbook, but have not started browsing it yet. Are there any other good resources I should read next? The reason why I ask, is that I'm trying to use one of the authentication packages suggested and I'm not really clear on how to do it. Their documentation is relatively sparse, and I could use some more complete examples. -- Obama Nation | My emails do not have attachments; it's a digital signature that your mail program doesn't understand. | http://www.subspacefield.org/~travis/http://www.subspacefield.org/%7Etravis/ If you are a spammer, please email j...@subspacefield.org to get blacklisted. -- Thomas G. Willis --~--~-~--~~~---~--~~ 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: best strategy for using htmlfill and javascript fields
On Sep 9, 3:08 pm, Mark Hildreth mark.k.hildr...@gmail.com wrote: snip/ Regarding tw, I've been meaning to try it out again (I tried it once a few years ago, but might have better success having gained a bit more experience). I'm just kinda creaped out that tw doesn't even seem finished and they're already working on tw2, which perhaps I'm just reading too much into. I know what you mean. Still, tw can be a useful time saver. I would tend to shy away from anything really complex though. It looks like there's been a spurt of development with some interesting things happening in there as of late. From what I understand the hg tip has the beginnings of some capabilities that makes it possible to have self contained widgets, sort of like the template and mini controller/ app rolled into one. This would greatly simplify a lot of things I write that use ajax because as of now I'm constantly feeding widgets the urls to my controllers which seems to be a little bit leaky to me. --~--~-~--~~~---~--~~ 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: user management (login, registration, etc.)
OK here's my contribution. Put together most hastily. This whole excercise forced me to learn sphinx and restructured text which I am now a huge fan of. http://sadphaeton.com/identity.model_0.0.zip Blogging about it http://blog.sadphaeton.com/tom/2009/08/31/identitymodel-user-registration-and-authorization-wsgi.html On Aug 31, 8:58 am, Thomas G. Willis tom.wil...@gmail.com wrote: Perhaps solving the auth/reg problem is a pylons developer's rite of passage , similar to a php developer writing their own template language. :) --~--~-~--~~~---~--~~ 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: user management (login, registration, etc.)
On Aug 30, 3:01 am, Mike Orr sluggos...@gmail.com wrote: On Sat, Aug 29, 2009 at 7:16 PM, Chris Milesmiles.ch...@gmail.com wrote: You may also be interested in BlastOff, which is a Pylons project template I've put together to generate the boilerplate for a Pylons app with authentication, registration, email confirmation all pre- configured and working out of the box.http://pypi.python.org/pypi/BlastOff If nothing else, it can be a useful reference for your own application. That looks cool. Is it listed in the Pylons Cookbook somewhere? We'll be getting more questions like this. -- Mike Orr sluggos...@gmail.com I took a slightly different approach, I made a library on top of repoze.who/what that consists of middleware for the auth and a wsgi app for the registration. The registration app can then be mounted at / register for any site you want to have registration for. I haven't put the code out there because I wasn't sure the approach was going to work, but so far it has. I suspect an immediate complaint about it would be that it depends on toscawidgets which then requires it's own middleware in the stack for it's resource injection. If anyone's interested, I can throw the code up somewhere with a disclaimer that I don't claim to know much about anything. :) --~--~-~--~~~---~--~~ 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: paste http server hangs every now and then
On Aug 26, 5:58 pm, Mark Hildreth mark.k.hildr...@gmail.com wrote: On Wed, Aug 26, 2009 at 5:24 PM, afrotypa ovuaia...@gmail.com wrote: Hmmm. I am not sure how to figure this one out. There are many of those messages; and the app certainly *did not* hang each time the kill_hung_message was generated. Perhaps that message is a red herring and I should be looking at something else. Any ideas? I'd certainly agree with that assessment. If there is a hang going on, that message isn't giving you any help. FWIW, i was seeing some hanging in a site I was hacking a while back, and I thought that maybe it was some middleware I wrote that was hanging things up. It ended up being a problem when accessing the environ somewhere in my template which I had been doing for debugging purposes. It took me a while to figure it out but I approached the problem in a fairly rigid way, in other words I kept on putting log.debug in until I was able to determine exactly where it was hanging. So maybe start at the controller method and work your way back through the call stack. --~--~-~--~~~---~--~~ 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 marketing, ( new thread from web tech )
On Aug 25, 8:54 am, Thierry lamthie...@gmail.com wrote: Not sure if this will work, but maybe some users should start using stackoverflow if they have Pylons questions. Then those of us who are good at it can answer it over there. Stackoverflow has a lot of developers, some of them might be over the fence on which web framework to use. Some Pylons evangelist can camp over there to promote the framework and some of its benefits compared to the others. The more questions, the more pylons tag you get and if that number comes close to the popular ones in the future, it can be an indication to the general public that it's a viable technology. I'm on there and I am subscribed to python and pylons related tags. A lot of the questions that I've seen have been around framework choice which ultimately provokes a lot of answers Use Django which kind of pisses me off when it's a pylons related question and they get +1'd for mentioning. Like this question. http://stackoverflow.com/questions/1044667/pylons-enterprise-ready/1054488#1054488 But I digress. Ben is on there too. I thought his answer here was absolutely perfect. http://stackoverflow.com/questions/48681/pros-cons-of-django-vs-pylons WSGI http://stackoverflow.com/questions/tagged/wsgi is probably another useful tag to follow. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---