Re: [pylons-discuss] Re: Cloud IDE
Cloud9 (https://c9.io/) supports Python. I don't see how you can't get Pyramid running there. On Sat, Jun 13, 2015 at 11:09 PM Jonathan Vanasco jonat...@findmeon.com wrote: On Saturday, June 13, 2015 at 4:15:33 PM UTC-4, r/ Wobben wrote: Is there a good cloud ide that I can usefor pylons development ? I think you're the first person to being up a cloud ide on this list. Pyramid works on most non-cloud IDEs with minimal setup. (see Steve's note about PyCharm) As long as your cloud ide of choice supports Python and virtualenvs, pyramid/pylon should work fine in it. Setup should be similar to pycharm. @Steve there's been a recent push for cloud based IDEs. basically a hosted pycharm + server that you vnc or browser into. -- 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/d/optout. -- 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/d/optout.
Re: having error when using buildout for deploying
I ran into this bug too. Buildout's bootstrap.py can't handle the distribute/setuptools saga. You need to tell bootstrap.py to use buildout 2.1.0. @:~$ python bootstrap.py -v 2.1.0 --distribute Then it all works. Or or did for me, anyway. -- Raoul Snyman e: raoul.sny...@gmail.com / ra...@snyman.info m: 082 550 3754 Sent from my mobile phone, please excuse the brevity -- 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.
AngularJS and Pyramid: Directory Structure
Hi folks, I'm starting a project using AngularJS, and I was wondering what others using AngularJS do for directory structure? Do you follow the app/, etc. directories used by AngularJS? I started with my own directory structure, but things don't seem to want to work nicely. I'm trying to use AngularJS UI/bootstrap. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: buidout : ImportError : no module named pyramid.config
Two things: firstly, posting the same mail twice isn't going to get you help any sooner. Secondly, you need to make sure you don't have the packages required by buildout installed anywhere else in your system (other than perhaps in a virtualenv). I recently got this error too, and I think it disappeared when I made sure I didn't have any of the dependencies installed system-wide. On 2 April 2013 20:03, Sanele Mahlalela sanel...@gmail.com wrote: I am getting this error when I try to ran buildout, to install myApp packaged to local pypi, and pyramid. Anyone has an idea why? Error: Getting distribution for 'myApp'. Traceback (most recent call last): File string, line 1, in module File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 1937, in main with_ei_usage(lambda: File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 1918, in with_ei_usage return f() File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 1941, in lambda distclass=DistributionWithoutHelpCommands, **kw File /usr/lib/python2.7/distutils/core.py, line 152, in setup dist.run_commands() File /usr/lib/python2.7/distutils/dist.py, line 953, in run_commands self.run_command(cmd) File /usr/lib/python2.7/distutils/dist.py, line 972, in run_command cmd_obj.run() File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 358, in run self.easy_install(spec, not self.no_deps) File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 578, in easy_install return self.install_item(None, spec, tmpdir, deps, True) File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 628, in install_item dists = self.install_eggs(spec, download, tmpdir) File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 823, in install_eggs return self.build_and_install(setup_script, setup_base) File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 1103, in build_and_install self.run_setup(setup_script, setup_base, args) File /usr/local/lib/python2.7/dist-packages/setuptools/command/easy_install.py, line 1089, in run_setup run_setup(setup_script, args) File /usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py, line 33, in run_setup lambda: execfile( File /usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py, line 81, in run return func() File /usr/local/lib/python2.7/dist-packages/setuptools/sandbox.py, line 35, in lambda {'__file__':setup_script, '__name__':'__main__'} File setup.py, line 6, in module File /usr/local/lib/python2.7/dist-packages/pkg_resources.py, line 913, in resource_filename return get_provider(package_or_requirement).get_resource_filename( File /usr/local/lib/python2.7/dist-packages/pkg_resources.py, line 219, in get_provider __import__(moduleOrReq) File /tmp/easy_install-yzmI30/myApp-0.6.0/myApp/__init__.py, line 1, in module # ImportError: No module named pyramid.config An error occured when trying to install myApp 0.6.0. Look above this message for any errors that were output by easy_install. While: Installing py. Getting distribution for 'myApp'. Error: Couldn't install: myApp 0.6.0 -- 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. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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, App Engine, Buildout and Nose Tests
Ah, solved! I threw out pbp.recipe.noserunner in favour of zc.recipe.egg, and now things are working. Updated configuration so that others can get nose working with pyramid_appengine (nsupport is the project name): [nosetests] recipe = zc.recipe.egg eggs = nose nosegae nsupport extra-paths = ${buildout:directory}/parts/nsupport ${buildout:directory}/parts/google_appengine ${buildout:directory}/parts/google_appengine/lib/fancy_urllib ${buildout:directory}/parts/google_appengine/lib/yaml/lib -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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, App Engine, Buildout and Nose Tests
Hi guys, I used the pyramid_appengine module and buildout to create a Pyramid app running on App Engine. Now that I have a minimum viable system I'm trying to add tests to the project using Nose, but it's not quite working. I'm using the pbp.recipe.noserunner recipe for Nose, but it doesn't seem to be pulling in all the dependencies necessary for Pyramid and my app. Here's the error I get when running the nosetests generated script (which may or may not be correct, I've messed with it to get it this far): == ERROR: Failure: ImportError (cannot import name BaseRequest) -- Traceback (most recent call last): File /home/raoul/projects/nsupport/eggs/nose-1.2.1-py2.7.egg/nose/loader.py, line 390, in loadTestsFromName addr.filename, addr.module) File /home/raoul/projects/nsupport/eggs/nose-1.2.1-py2.7.egg/nose/importer.py, line 39, in importFromPath return self.importFromDir(dir_path, fqname) File /home/raoul/projects/nsupport/eggs/nose-1.2.1-py2.7.egg/nose/importer.py, line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File /home/raoul/projects/nsupport/parts/nsupport/nsupport/__init__.py, line 3, in module from pyramid.config import Configurator File /home/raoul/projects/nsupport/eggs/pyramid-1.3.3-py2.7.egg/pyramid/__init__.py, line 1, in module from pyramid.request import Request File /home/raoul/projects/nsupport/eggs/pyramid-1.3.3-py2.7.egg/pyramid/request.py, line 8, in module from webob import BaseRequest ImportError: cannot import name BaseRequest begin captured logging root: WARNING: The datastore file stub is deprecated, and will stop being the default in a future release. Append the --use_sqlite flag to use the new SQLite stub. You can port your existing data using the --port_sqlite_data flag or purge your previous test data with --clear_datastore. root: WARNING: Could not read datastore data from /tmp/nosegae.datastore root: WARNING: Could not read search indexes from /tmp/dev_appserver.searchindexes root: DEBUG: Enabling webob: None - end captured logging - Here's my buildout.cfg file: [buildout] index = http://d.pypi.python.org/simple include-site-packages = false find-links=http://dist.plone.org/thirdparty/ develop=src/nsupport parts=nsupport nosetests ae-sdk-version=1.7.4 ae-runtime=2.7 unzip=true versions=versions [versions] pyramid = 1.3.3 [nsupport] recipe=rod.recipe.appengine packages= pyramid mako repoze.lru zope.interface zope.deprecation venusian translationstring webob pyramid-handlers markupsafe webhelpers src=src/nsupport server-script=devappserver zip-packages=False use_setuptools_pkg_resources=True url=http://googleappengine.googlecode.com/files/google_appengine_${buildout:ae-sdk-version}.zip [bootstrap] recipe=zc.recipe.egg eggs=pastescript [nosetests] recipe = pbp.recipe.noserunner eggs = pbp.recipe.noserunner ${nsupport:packages} WebOb WebTest Nose NoseGAE extra-paths = ${buildout:directory}/parts/nsupport ${buildout:directory}/parts/google_appengine ${buildout:directory}/parts/google_appengine/lib/fancy_urllib ${buildout:directory}/parts/google_appengine/lib/yaml/lib environment = nose-environment defaults = --without-sandbox --gae-application=${buildout:directory}/parts/nsupport --gae-lib-root=${buildout:directory}/parts/google_appengine nsupport/tests [nose-environment] NOSE_WITH_GAE = true NOSE_WHERE = ${buildout:directory}/parts/nsupport -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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, App Engine, Buildout and Nose Tests
I'am using a buildout, which I described here in its base: https://github.com/jensens/pyramid-gae-tutorial Have you had a look at https://pypi.python.org/pypi/pyramid_appengine ? That's what I'm using. I'am using pyramid on appengine and tried a lot to get NoseGAE http://farmdev.com/projects/nosegae/ running, but finally failed. In the main app at my work we use the GAE framework (it's not even that) and NoseGAE quite successfully. I could probably set that up by itself without any hassles. My hassle seems to be getting Nose + Pyramid working in buildout. This is my first experience with buildout, and I know from what I've read that buildout basically creates something similar to virtualenv, and so I was trying to include all the dependencies in my nosetests section in the buildout configuration, but that doesn't seem to be working. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: MySQL has gone away errors...
On 7 May 2012 02:48, Parnell Springmeyer ixma...@gmail.com wrote: I have pool, pool recycle, and max overflow set... Is there something I'm missing? Or maybe it's the DB being hit really hard, or maybe a DB configuration option??? I've been through this a few times, and the main cause of this is the server not being hit enough. Then SQLAlchemy holds a bunch of connections which MySQL has deemed too old and drops them from its side. On one site I ended up polling the DB via a cron job. Nasty hack, but it got the job done when none of the other options described worked. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: any advantages of using fast cgi over reverce proxy with nginx?
On 30 January 2012 19:20, cd34 mcd...@gmail.com wrote: You could use uwsgi (http://projects.unbit.it/uwsgi/) which I think is a lot better than using fastcgi. However, if fastcgi/reverse proxy are your only choices, I think I would choose paster with a reverse proxy. As much as it sounds like overkill, I'm using nginx as a reverse proxy to Apache+mod_wsgi. It means that I have an easy WSGI setup, and a blazingly fast site. I used this blog post as my starting point: http://markmaunder.com/2009/12/01/how-to-handle-1000s-of-concurrent-users-on-a-360mb-vps/ -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: any advantages of using fast cgi over reverce proxy with nginx?
On 30 January 2012 20:25, Jonathan Vanasco jonat...@findmeon.com wrote: You've got nginx configured to serve static files directly, right? If not, that'll really improve your system. No, at the moment Apache is set up to serve the static files directly. My set up is a little more complicated than just one Pyramid app, so when I eventually moved to the current setup, I didn't bother to reconfigure nginx. Maybe I'll do it some day... -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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.
TypeError: render_unicode() keywords must be strings
Hi, I'm running Pyramid 1.0 with the Mako templating engine via flup on a host that only provides FastCGI. I've installed everything into a virtual environment. I'm getting the following error when accessing the site: URL: redacted File '/home/redacted/venv/lib/python2.6/site-packages/weberror/errormiddleware.py', line 162 in __call__ app_iter = self.application(environ, sr_checker) File '/home/redacted/venv/lib/python2.6/site-packages/pyramid-1.0-py2.6.egg/pyramid/router.py', line 158 in __call__ response = view_callable(context, request) File '/home/redacted/venv/lib/python2.6/site-packages/pyramid-1.0-py2.6.egg/pyramid/config.py', line 2839 in _rendered_view context) File '/home/redacted/venv/lib/python2.6/site-packages/pyramid-1.0-py2.6.egg/pyramid/renderers.py', line 294 in render_view request=request) File '/home/redacted/venv/lib/python2.6/site-packages/pyramid-1.0-py2.6.egg/pyramid/renderers.py', line 322 in render_to_response result = self.render(value, system_values, request=request) File '/home/redacted/venv/lib/python2.6/site-packages/pyramid-1.0-py2.6.egg/pyramid/renderers.py', line 318 in render result = renderer(value, system_values) File '/home/redacted/venv/lib/python2.6/site-packages/pyramid-1.0-py2.6.egg/pyramid/mako_templating.py', line 131 in __call__ result = template.render_unicode(**system) TypeError: render_unicode() keywords must be strings I know what the error says, but I've gone through my code and I've stripped out every single last unicode string I could find, and I still get this error. I don't get it when running locally on paster, and I don't get it on my development server running Apache/mod_wsgi. I really don't know where else to look, as the exception occurs before my code starts running. Any help would be appreciated, and if you need more information, please let me know. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: Applying changes to the database schema – SQLAlchemy
On 30 August 2011 07:30, cd34 mcd...@gmail.com wrote: You might want to take a look at http://code.google.com/p/sqlalchemy-migrate/ which does a pretty good job handling schema transitions like that. I've used SQLAlchemy Migrate in a project of mine, and it's quite magic. Also, you don't have to use their versioning stuff and migration script if you don't want. My app is intended for end-users, and I didn't want them to have to run the script to upgrade their databases, so I wrote my own (simple) versioning, and then I just run some upgrade functions that use the migrate.changeset module before the database is loaded. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: Help with Authentication and Authorization
On 11 July 2011 21:54, Chris McDonough chr...@plope.com wrote: I don't really know if there's an example of actually storing permissions, users, and groups in a database somewhere TBH. The tutorial code stores users and groups in a modle scope global. The task would be to replace the code that uses that module scope global with code that uses a database table. I've just spent the better part of the weekend scouring the docs for some mention or example of how to do auth (both authentication and authorisation) from the database, and gave up and decided to roll my own, because I can't see how to do it from the DB. Which leads me to a question: Why is this so common? Every tutorial I've seen on auth only shows hard-coded groups and permissions, none deal with pulling stuff out of the database. Some don't even bother with dynamic users. I'd bet that 90% of auth implementations use the db, so I'm mystified why I never see an example of it. Not to moan at you guys, I love Pyramid, but it's a deficiency I see in the documentation, and not only in Pyramid. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: issue to deploy pylons application under mod_wsgi
On 9 June 2011 09:49, Haulyn Jason wrote: application = loadapp('config:/var/www/domix.us/development.ini') application = ErrorMiddleware(application, debug=True) Why are you adding in the error middleware? Pylons already has error middleware built in. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: pyscss renderer
On 7 May 2011 19:33, BadKnees knegla...@gmail.com wrote: Sorry, the renderer should look like this. We need to open the file in the _render function. Otherwise it wont be read everytime. Actually, you can use f.seek(0) to get the file pointer back to the beginning of the file. Of course this is in a web app, where each request is a full iteration of the application, so I'm not sure that f.seek(0) would be of much use. It depends on how you're using it. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: First pyramid impressions
On 8 March 2011 07:28, mjmein mjmeint...@gmail.com wrote: Wouldn't it help if there was a big where to start/first steps section on the front page of the Pyramid website - similar to http://docs.djangoproject.com/en/1.2/. This could just link to the relevant cookbooks/tutorials. I think the problem currently is that people start by going into the main documentation, and then get overwhelmed. I agree, I also was rather overwhelmed when I went to the documentation the first time. I can also echo the abstract sentiment, I have found some of the documentation to be rather vague in it's explanation. (Of course now when I try to find some of that vague, abstract documentation that I remember seeing and struggling to understand in a practical sense, I can't find it.) -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: Caching recommendations for Pylons
Hi Doug, On 7 July 2010 22:35, writeson wrote: I know, I know, I have a lot of questions about caching, I guess the documentation I've read, and been pointed to before, hasn't helped me understand how to use it or best practices. I'm not going answer your questions individually, I'm rather going explain what we cache at my work. I work for one of the bigger sites in South Africa, so we need to (obviously) make sure that our application is as fast as possible. So far, our biggest bottleneck has been our database, so we've been trying to cache all our database queries. We've created a central module where we put a bunch of list functions (get a list of users, for example) that query the database, and then we cache all of those functions. We're using memcache (via Beaker) for our caching, so it's available to all instances of the application running across a number of servers. Our caching looks something like this: from pylons import cache def get_users(): def fetch_users(): return Session.query(User).all() data_cache = cache.get_cache(u'Data') return data_cache.get_value(key=u'Users', createfunc=fetch_users, expiretime=default_timeout) default_timeout is a value that is loaded from config. We have that, plus, short_timeout and long_timeout. Things that are liable to change often use the short_timeout, things that change often but are not needed to be up-to-date all the time use default_timeout and things that almost never change use the long_timeout. With this, we can call get_users() from anywhere in our application, and it will return the cached list of users. It's not very complicated, doesn't use regions and things, but it works well for us because it's behind the scenes and we don't have to worry about when, where, regions, etc. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: Struggling with Authkit Authentication
On 2 June 2010 21:11, daniel daniel...@orange.fr wrote: I'm trying getting familiar with Authkit Authentication system used within a Pylons website project. I went through the Authkit documentation and followed the Pylons book recommandations (chapter 18). http://www.letsyouandhimfight.com/2009/10/28/pylons-opinion-dont-use-authkit/ (Disclaimer: That's not my blog) -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: MySQL has gone away....
On 3 May 2010 20:46, Charlie Meyer cemey...@gmail.com wrote: I have deployed a pylons application using mod_wsgi on Apache and everything seems to work ok, but after a few hours (18-24ish), the app crashes on every request with the error WebApp Error: sqlalchemy.exc.OperationalError: (OperationalError) (2006, 'MySQL server has gone away'). It is confusing because the MySQL server is definitely still live (I can login to it using the cmd line with no issues), and restarting it does not fix the problem. Only restarting apache resolves the issue. The logs don't provide any further insight into what is going on, so I am a bit perplexed as to what the problem could be. I'm debating switching my production setup to have apache proxy to a paste server, but I would rather fix what is broken than change my entire setup. I had this exact same problem a few years ago. The only solution I could find was to put a try: except: early on in my line of execution (like in BaseController.__call__) and run the query again. From the extensive scouring of the Internet, it seems to be a known problem. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: Very simple theming in Pylons
After having a look at theming in Pylons, yesterday I decided to try to see if I could load the theme name from the database. Once again, I blogged about it: http://blog.saturnlaboratories.co.za/2010/01/06/database_configured_theming_in_pylons.html -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-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.
Very simple theming in Pylons
Hi folks, I know some folks have looked for a way to create themes in Pylons apps, and I myself have too, and after a little investigation today, I came up with a very simple method to achieve theming. For those who are interested, I blogged about it: http://blog.saturnlaboratories.co.za/2010/01/05/very_simple_theming_in_pylons.html Hope this helps someone else! -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) -- 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: pylonshq.com down?
2009/10/15 mickgardner mickgard...@gmail.com: Seems to still be downor perhaps down againnot sure which. me five. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Problems setting custom 404 page
Hi folks, I'm trying to set a custom 404 page for my Pylons app. I'm running my app through Apache2 and mod_wsgi (2.0). In my vhost configuration, I have the ErrorDocument for 404 set, and I've even edited my middleware.py to redirect 404s to my 404 page. When I run my app via paster, it works a charm. When I run the app on our dev server (via Apache2/mod_wsgi), I get an unstyled page that says 404 Not Found at the top, and The resource could not be found. underneath it. As far as I can tell, this is not the Apache 404 page. Anyone run into this before? Any ideas? Need more info? -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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 setting custom 404 page
2009/10/15 Arun Tomar tomar.a...@gmail.com: in my experience nginx and mod_wsgi works best and the performance is also better than apache+mod_wsgi. by the way which OS are you using. I don't think I'll be able to change that. This is for the company I work for, not myself. We're running Linux. another step is to look into the log files of Apache as to what error it throws, whether it's not able to find the custom 404 file or it's serving from it's cache. I don't see anything in the error logs. I see the access log shows the 404, but I'm not sure why Apache isn't showing the custom 404 page if it sees the error. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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 setting custom 404 page
Ok, now I feel like a right royal idiot. In my configuration file, I had full_stack set to false. As soon as I set it to true, my 404 started working. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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: cron Paster Command
2009/9/19 Mark Hildreth mark.k.hildr...@gmail.com: http://blog.saturnlaboratories.co.za/2009/09/18/cron_jobs_and_pylons_applications.html Sorry about the funky link, but Mark's got the right one there. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
cron Paster Command
Hi guys, I've recently been investigating how to run cron jobs for my Pylons applications, and followed the example I found on the wiki by creating a paster command. I've blogged about it, and uploaded the script to my blog. http://is.gd/3qpl6 One of the cool things about it (if I may brag a little!) is that you don't have to do much to get it up and running. The command class will find all your controllers, and will run a cron command if it exists in your controller. Constructive criticism is welcome! -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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: Using Multiple Databases (SQLALCHEMY)
2009/8/1 RossC sendrossem...@gmail.com: I've followed the instructions about adding databases and using binds instead of bind to the SA Session; However and this is the bit that I'm missing, how do I associate a table def / Model with that second Session connection? and indeed how do I connect using the DB details selected from the central Database? Can this be done using SA? or do I have to use the DB Engine API? While I haven't done dynamic database connections, I have written a Pylons app that connects to 3 different databases using SQLAlchemy. I had to use 3 different Session and metadata objects. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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: superwiki?
Hi Richard, 2009/7/8 오현성 chamda...@gmail.com: Thanks for your reply. I'll see how I get on with gradually adding features from MoinMoin, but it may be a while before I produce anything close to a fully functional wiki. I've got some code that does the basics of a MediaWiki-like syntax, you're welcome to use it if you want. You can get it from here: http://openpm-org.svn.sourceforge.net/viewvc/openpm-org/trunk/projecthq/lib/wiki.py?view=markup -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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/CMF on top of Pylons
2009/3/22 AD.: On Mar 22, 10:29 pm, Raoul Snyman raoul.sny...@gmail.com wrote: I agree with askel. I use Drupal as my CMS for sites that I work on. It may be PHP, but it's extremely powerful and extensible. Besides, if you wanted something as powerful and extensible as Drupal, you'd probably want to write it from scratch in Python, rather than using a framework like Pylons. As awesome as Pylons is, it would restrict the extensibility of the CMS. Could you explain that last statement a bit further? I suspect I'm naively missing something about Pylons extensibility (or lack thereof) :) Note: I said that Pylons would restrict the extensibility of said CMS, not that Pylons itself is not extensible. Pylons is an MVC framework, that means that you have clearly defined models, views, and controllers. Drupal, on the other hand has HTML (view) code littered all over it's modules (controllers) and has no models. Pylons depends on it's fairly fixed MVC structure, and fairly fixed directory structure, for it's mapping and layout of the application. Sure you could probably hack the Pylons code to change the required directory structure, but then you'd have a problem each and every time Pylons releases a new version and you want to upgrade your version of Pylons. Drupal on the other hand doesn't have a fixed structure further than all module-related code must be in the module's directory and it has no module templates. Drupal has a much flatter, informal structure. My point is not that you can't write a CMS in Pylons, nor that Pylons is limited. My point is that if you want to write a Drupal in Python, I don't think you're going to be able to do it in Pylons. They just work totally differently. (My apologies if I'm not being clear, I wrote most of this on Sunday night at 22:00, and the rest on Monday morning.) -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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/CMF on top of Pylons
2009/3/23 Dalius Dobravolskas dal...@sandbox.lt: Raoul Snyman wrote: My point is not that you can't write a CMS in Pylons, nor that Pylons is limited. My point is that if you want to write a Drupal in Python, I don't think you're going to be able to do it in Pylons. They just work totally differently. Could you be more specific what's impossible with Pylons? While your arguments about MVC part of Pylons looks valid they are not! There are number of discussions in this group about custom layouts (whatever you mean by that). Pylons is really flexible framework. As well you do not even mention WSGI part of Pylons (I guess that's because you don't understand this part). Please don't insult me by saying I don't understand WSGI. You don't know what I know or understand. Secondly, I never said it's impossible to write a CMS in Pylons, I just said that I think that Pylons is unsuited to develop a Drupal-style CMS in. Thirdly, I never said that Pylons is not flexible. Once again, I said that I think that Pylons is unsuitable for a Drupal-like CMS. OK. Most probably I can't write Drupal in Pylons, but I can write CMS. Actually I have written working CMS prototype in Pylons. See my comments above. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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/CMF on top of Pylons
2009/3/23 Wyatt Baldwin wyatt.lee.bald...@gmail.com: And I should mention that this is what Drupal has done with their module system. I'm not convinced yet that it's impossible or even particularly hard to do something functionally equivalent with Pylons, Django, etc. I can see doing what Drupal did in Python, and probably quite easily at that, but I still doubt you'd be able to do exactly what Drupal did in Pylons... Pylon's structure would get in the way. Please once again note, I'm not saying that you cannot build a CMS in Pylons. I'd *love* to see a Drupyl ;-) especially using WSGI to get it right... that would be awesome. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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/CMF on top of Pylons
2009/3/21 askel: If you need CMS why not use what was specifically designed that way? I believe people who seek out-of-box CMS should not look at Pylons because they dont need its power of not being a CMS. I agree with askel. I use Drupal as my CMS for sites that I work on. It may be PHP, but it's extremely powerful and extensible. Besides, if you wanted something as powerful and extensible as Drupal, you'd probably want to write it from scratch in Python, rather than using a framework like Pylons. As awesome as Pylons is, it would restrict the extensibility of the CMS. You want a CMS? Use Drupal. You want to develop a web application? Use Pylons. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons vs Tomcat+GWT
On Mon, Feb 2, 2009 at 2:28 PM, Tycon adie...@gmail.com wrote: sure but without client side code, it will have to reload a new page in response for each user interaction Says who? -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ 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 with AuthKit (was: Django or Pylons - comparison details)
Hi James, On Wed, Dec 10, 2008 at 7:05 PM, James Gardner [EMAIL PROTECTED] wrote: a) the author or authkit is never around I am occasionally ;-) b) authkit is way over complicated Agreed, but authentication and authorisation *is* complicated and there are lots of different use cases. c) autukit sucks in other ways d) all of the above. ??? Sorry, I quoted someone else, and I didn't clarify to say that I don't agree with him 100%. Faux pas on my part there, I didn't intend to be insulting. What I tried to convey was that AuthKit doesn't fit *my* needs. AuthKit can help with all these things apart from Customisable table names but it doesn't provide a GUI admin system which seems to be what you are after? Not at all. If I wanted automagic GUIs, I'd have chosen Django, with all it's terrible ideas ;-). What I wanted was a auth+auth layer that worked with my table names, and worked *with* me. When I looked at AuthKit when I was starting my project about 6 months ago, it *felt* it it was working *against* me. That's not really true is it? Have you seen this: http://authkit.org/svn/AuthKit/trunk/authkit/permissions.py There are permissions for all sorts of things to do with roles, groups, IP addresses, time of day etc etc. The permissions system is designed in such a way that you can create your own permissions too if the defaults don't fit your needs. The problem I encountered with AuthKit when I looked at it, was that it seemed too manual. I didn't want manual, I wanted automagic. I didn't want to have to specify users or groups in my code, it needed to happen from information in the database. AuthKit has obviously progressed since then, and it looks like some of what I wanted has been developed, but when I looked at it, it didn't fullfil my needs. One of my other problems was that the documentation was rather confusing. It didn't show me what I presumed 90% of developers would want, that being to be able to use data from a database to drive the permissions system. The documentation when I last looked at it was heavily in favour of the more manual way of doing things, with hard-coded users and and groups, and very little (in fact, I didn't see any) of the documentation discussed using SQLAlchemy models for users, groups (or roles) and permissions. In fact, getting AuthKit to interface with SQLAlchemy might help to remove the hard-coded table names (which was a show-stopper for me). Perhaps one of the things you can look at some time is sprucing up the documentation to show how to use SQLAlchemy models to pull users, groups and permissions with AuthKit. I'm sure a lot of folks would appreciate it, and more folks would be encouraged to use AuthKit rather than write their own homegrown system. I hope this clears things up. I was in no way wanting to put down your effort into AuthKit. As an open source developer myself, I know how often it can be a thankless task when your code is still in it's early phases and people are demanding something you can't deliver. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Having some trouble upgrading to Pylons 0.9.7
Hi all, I'm attempting to upgrade my Pylons app to 0.9.7, but I can't seem to get past the 302 you will now be redirected problem. What I did was I created a totally new Pylons app, and then I started moving my controllers and models and things across. I'm not sure if this is the best way, but I figured it was most probably the easiest. I also read through the What's new in 0.9.7 document and the Upgrading document on the wiki, and followed directions as much as I could. I've left map.minimize on False, and I added the extra lines in my routes.py file as per the documentation. I also made sure that my middleware.py file had the necessary lines. I also modified base.py and the BaseController class, because my authentication system checks for a valid user in the __before__ function. Now the problem comes in that when I hit the main page, my default controller sees that there's no user logged in and tries to redirect me to the login page. Except it just sits there saying 302 Found The resource was found at http://localhost:5000/member/login/; you should be redirected automatically. and never redirects me. routes.py: http://codepad.org/d4lpLxas middleware.py: http://codepad.org/kdnRbRpl base.py: http://codepad.org/qIvkBnxK Any idea what am I doing wrong? -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Having some trouble upgrading to Pylons 0.9.7
On Wed, Nov 19, 2008 at 7:05 PM, Mike Orr [EMAIL PROTECTED] wrote: Looking at your modules, I didn't know Routes had an .append_slash option but that could be throwing it off. There's no reason to put slashes at the end of URLs except to make it look like a directory to the user, but even then it's not necessary (/messages and /messages/1234 work fine). I prefer ending urls with / :-D You can turn on route debugging to see if it gives any clues. Add this to development.ini: === [logger_routes] level = DEBUG handlers = qualname = routes.middleware === Thanks to the above bit of extra debugging, I found out what my problem was... in my routing.py (which I erroneously called routes.py earlier) I had the following lines: map.connect('/', controller='dashboard', action='index', id=None) map.connect('/{controller}/{action}', id=None) map.connect('/{controller}/{action}/{id}') I had to change them to this: map.connect('/', controller='dashboard', action='index', id=None) map.connect('/{controller}/{action}/', id=None) map.connect('/{controller}/{action}/{id}/') Notice the appended slash? -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: mod_wsgi can't find my project
On Sep 4, 12:18 pm, Dalius Dobravolskas [EMAIL PROTECTED] wrote: Install you application: python setup.py develop OR python setup.py install Now I feel like a real idiot! Thanks Dalius, that was the problem. In moving my project to the dev server I forgot to do that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Paste make-config can't find the ini template file
On Thu, Aug 21, 2008 at 11:44 AM, Raoul Snyman [EMAIL PROTECTED] wrote: I did this, but when I ran paster make-config projectname config.ini, I got the following message: No paste_deploy_config.ini_tmpl found Hmph. Found out why it couldn't find it... I had somehow managed to add a space at the end of the file name... argh. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Paste make-config can't find the ini template file
I'm running through the deployment process in order to write installation documentation and to make sure it works as advertised. As per the Packging and Deployment page on the wiki (http:// wiki.pylonshq.com/display/pylonsdocs/Packaging+and+Deployment), I apparently need to create the paste_deploy_config.ini_tmpl file in my .egg-info directory. I did this, but when I ran paster make-config projectname config.ini, I got the following message: No paste_deploy_config.ini_tmpl found I checked my .egg-info directory, and sure enough, it's there. Is my file perhaps in the wrong location? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Problem with installation on linux/suse
On Tue, Jul 22, 2008 at 9:04 PM, mario ruggier [EMAIL PROTECTED] wrote: OK, i made /usr/local/lib/python2.5/site-packages/ez-hack.pth : import site; site.addsitedir('/usr/local/lib/python2.5/site-packages') Ane the error is a: RuntimeError: maximum recursion depth exceeded Yes. From within that directory you're importing that directory - that explains the recursion. If you're getting this error I'd say means that you're using the right Python and it's looking in the right place. Are you running easy_install as root? -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: How to update data with sqlalchemy
On Tue, Jul 15, 2008 at 7:12 PM, JOLINY [EMAIL PROTECTED] wrote: Since i develope my application with pylons ,i have this question. when i want to do the update action to database. If you read the Pylons documentation[1], specifically the QuickWiki tutorial[2], you'd understand how this works. You might find the Using SQLAlchemy with Pylons[3] section quite interesting. There's plenty info there. [1] http://wiki.pylonshq.com/display/pylonsdocs/Home [2] http://wiki.pylonshq.com/display/pylonsdocs/QuickWiki+Tutorial [3] http://wiki.pylonshq.com/display/pylonsdocs/Using+SQLAlchemy+with+Pylons -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Ide
On Thu, Jun 19, 2008 at 10:26 AM, Antonio Beamud Montero [EMAIL PROTECTED] wrote: What Ide I can use with pylons I use Quanta+ (in the kdewebdev package in Kubuntu) with it's project system. Works well. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: How did you begin your fun with Pylons?
I will have to agree with the sentiments already voiced here. The documentation is very sparse, and it relies on the user having a good understanding of MVC frameworks (like RoR and CakePHP). Having actually attempted to write my own MVC framework in PHP (and then abandoning it due to limitations of PHP), I can say I have a good understanding of these frameworks, and that helped me understand Pylons. Let me also mention, to put things into perspective, that CakePHP's documentation is not very helpful either. They have an API, and they have a tutorial that doesn't go beyond the basics. I also understand the viewpoint of the developers, Mike and Ben and others, that they don't have a lot of time for documentation. I have a few open source projects of my own (one of which is using Pylons - thanks for a great framework!), and getting round to writing documentation is just something that I often don't have time for. To those who complain: Please try to be part of the solution: if you've done something that you can't find in the wiki, add a page and document what you did. Also, if you're having trouble understanding how Pylons works, I recommend reading through CakePHP's tutorial. It covers the same concepts used here. To the developers: Please don't moan back at your community about how they're not doing anything. Even if you can't get round to writing up documentation, rather say, We're very sorry, but we just haven't had time. - it's a much nicer response (and it puts you in a better light) than, Well, why don't you write some? To both sides: Pointing fingers, blaming others, and generally moaning does not help anyone, much less yourself. Great communities only arise out of people who are prepared to give more than they take. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: How did you begin your fun with Pylons?
I never said the community wasn't doing anything. I understand perfectly if somebody feels they don't know a subject well enough to write about it; I do that myself. Or if they just don't have an inclination to, that's fine too. And f somebody thinks the documentation is spotty and has been needed for months, I agree with them. What I was specifically complaining about was the attitude that free software developers owe something to somebody, that they have an obligation to make everything polished right now. If you want me to be obligated to you, I'll send you my hourly rates. Otherwise, we're all volunteers. Mike, please don't be so defensive. I was not accusing you of anything, and I was not telling you to be obligated to me at all. To be perfectly honest, I don't need your help. But this is the exact response I was talking about. Instead of being gracious about something, some developers become defensive and then attack back. And Mike, this is not a personal attack on you, this is a trend I have seen in a number of projects. CakePHP (since I've mentioned them before) do the same thing. When someone is critical about their documentation, they also do the defend and attack response (I've probably done the same with my projects as well). Mike, I agree with you that as free software developers we don't owe anything to anybody. However, I do think that it's a bit silly to contribute something to the community, and then not expect criticism. The issue is not *what* you say, but rather *how* you say it. -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: Controller Newbie Question
On Tue, Apr 8, 2008 at 6:39 PM, Christoph Haas [EMAIL PROTECTED] wrote: Your class variables are not saved between HTTP requests. If you want data to persist you either need to save it in into a database (hint: model) or into the session (cookie based session). Just to further explain what Christoph has said, since I had the same misconception as Dave when I started writing web apps... In the traditional software model, once an object is created within the application, it remains there until either it is destroyed or the application is closed. In Web Apps, this is not the case. In essence, each and every page that you go to is a single execution of your application... from startup to shutdown. This means that while the page is loading your object is valid, but as soon as the page has finished loading, your object has been destroyed. So any variables you set in your controller are not available on the next page or function execution. As Christoph also said, the way to make data persist between different pages is either via database storage, or via the session list object in your controller. In Dave's case, he most probably wants to use the session list object. Here's an example: if 'message' not in session: session['message'] = 'This is a message' session.save() -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: [EMAIL PROTECTED] Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---