Re: Javascript library
cropr wrote: - after that I tested jQuery, fast and concise but does not have UI widgets on its own. If you don't need widgets , this is the very good choice. The UI addon is a less quality than jquery, without a good rich text editor. So I looked around for more I think expecting a WYSIWYG editor and general-purpose library to be the same thing isn't really important. It'd be better to choose these entirely separately. (I have read that TinyMCE has started trying to use libraries like jquery internally, but found that it didn't really make any big difference in the code size -- WYSIWYG code is very different in scope than typical libraries) - Yui is bigger than jQuery, but not bloated as extjs. Good documentation. For me the biggest asset of YUI is the hosting service. It offloads my small webserver at home. I did not experience any issues with the rich text editor FYI, google is hosting libraries like jquery (e.g., http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js) -- Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.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: DistributionNotFound When Deploying App to GAE
Hi! Have your added yout buttons app to python path? In paste-deploy.py sys.path.insert(0, os.path.join(here, src, button)) -- []' - Walter waltercruz.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
authkit and redirect?
Hello. I am serving my app using apache, supporting both http and https. I am using authkit for login, and in the login screen generating function, I am trying to redirect to a https connection if the page is accessed via plain http. My function looks like this: def make_login_page(): # ensure that we serve only https if request.scheme != 'https': h.redirect_to(h.url_for('cust_home', request)) return render('/login.mako') The call to url_for correctly generates the url, however, the server generates this error (http status 500): [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] mod_wsgi (pid=4871): Exception occurred within WSGI script '/var/www/b2b.wsgi'. [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] Traceback (most recent call last): [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/Paste-1.4.2-py2.5.egg/paste/translogger.py, line 67, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] return self.application(environ, replacement_start_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/Paste-1.4.2-py2.5.egg/paste/cascade.py, line 92, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] return self.apps[-1](environ, start_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/Paste-1.4.2-py2.5.egg/paste/registry.py, line 340, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] app_iter = self.application(environ, start_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/Paste-1.4.2-py2.5.egg/paste/recursive.py, line 80, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] return self.application(environ, start_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/Paste-1.4.2-py2.5.egg/paste/errordocument.py, line 185, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] app_iter = self.application(environ, change_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/ __init__.py, line 290, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] return self.app(environ, start_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/ cookie.py, line 352, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] return self.app(environ, cookie_setting_start_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/ multi.py, line 67, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] result = check() [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/ multi.py, line 59, in check [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] return binding(environ, logging_start_response) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/AuthKit-0.4.0-py2.5.egg/authkit/authenticate/ form.py, line 81, in __call__ [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] content = self.template() % action [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /var/www/ b2b/b2b/lib/cust_db.py, line 70, in make_login_page [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] h.redirect_to(h.url_for('cust_home', request)) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/Routes-1.7.1-py2.5.egg/routes/util.py, line 221, in redirect_to [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] return config.redirect(target) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] File /usr/lib/ python2.5/site-packages/Pylons-0.9.6.1-py2.5.egg/pylons/wsgiapp.py, line 67, in redirect_to [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] raise httpexceptions.HTTPFound(url) [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] HTTPFound: 302 Found [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] The resource was found at [Mon Nov 10 16:29:12 2008] [error] [client 127.0.0.1] https://localhost/cust_home Any help on how to make authkit handle the redirect is greatly appreciated! thanks, Vijay --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
pylonsbook source
Hi all! Where can I find the pylonsbook sourcecode? -- []' - Walter waltercruz.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
newb: Correct way to set a SQLalchemy 'relation'
Hi List, I'm stumbling slightly blind and just wanted to check if there is a smarter way of doing what I'm doing. I'm using declarative classes to make the DB, and example class below: class ArkContact(Base): all contacts __tablename__ = 'contacts' id = Column(Integer, primary_key=True) project_id = Column(Integer, ForeignKey('projects.id')) client_id = Column(Integer, ForeignKey('clients.id')) firstname = Column(String) lastname = Column(String) email1 = Column(String) email2 = Column(String) workphone = Column(Integer) mobile = Column(Integer) project = relation(ArkProject, backref=backref('contacts', order_by=func.lower(firstname)), cascade='all, delete') client = relation(ArkClient, backref=backref('contacts', order_by=func.lower(firstname)), cascade='all, delete') def __init__(self): self.firstname = '' self.lastname = '' self.email1 = '' self.email2 = '' self.workphone = '' self.mobile = '' In one of my controllers, I've created an ArkContact as above, and need to set the 'client' and 'project' attributes. Currently I'm doing it like this: contact=ArkContact() contact.client=Session.query(ArkClient).filter(ArkClient.client=='clientName ').first() Session.add(contact) Session.commit() This does seem to work, but I just wanted to know if this is the 'correct' way of doing things, it seems a little strange to me. Many thanks for any assistance. Jules --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
mod_wsgi and virtualenv
Hi, I'm trying to deploy a Pylons app via mod_wsgi (Apache). That works so far. But I want to use a virtualenv directory and can't find any documentation on it. I found something for workingenv but don't know how to translate that to virtualenv. http://code.google.com/p/modwsgi/wiki/VirtualEnvironments said something about WSGIPythonHome but that can't be defined per virtual host. So I would have to use the very same virtualenv directory for all deployed applications (which is pretty absurd). I also found http://pypi.python.org/pypi/virtualenv#using-virtualenv-without-bin-python but that just prints these lines into Apache's error.log: [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] mod_wsgi (pid=26216): Target WSGI script '/etc/apache2/screenshots.debian.net.wsgi' cannot be loaded as Python module. [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] mod_wsgi (pid=26216): Exception occurred processing WSGI script '/etc/apache2/screenshots.debian.net.wsgi'. [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] Traceback (most recent call last): [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] File /etc/apache2/screenshots.debian.net.wsgi, line 8, in module [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] execfile(activate_this, dict(__file__=activate_this)) [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] File /home/debshots/bin/activate, line 4 [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] deactivate () { [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] ^ [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] SyntaxError: invalid syntax Seems like it can't run virtualenv's 'activate' script like that. :( Any ideas? Kindly Christoph signature.asc Description: This is a digitally signed message part.
Re: DistributionNotFound When Deploying App to GAE
On Mon, Nov 10, 2008 at 7:39 AM, campos [EMAIL PROTECTED] wrote: Hi, I'm just following http://code.google.com/p/appengine-monkey/wiki/Pylons to create a pylons featured GAE application. One thing I changed is that I specified the pylons version to 0.9.6.2 because pylons==0.9.7 requires webob==0.9.4, but latest GAE only provides webob==0.9.0, there's a conflict on the version. I noticed that last night. My solution was to delete WebOb in the SDK, but of course you can't do that on the server. So I think it's actually importing the older WebOb. That's compatible enough that it's working in my application, but it needs to be addressed. The proper strategy is to put its directory at the front of sys.path before webob is imported, but I think the log message said webob was already imported at the midpoint of paste-deploy.py. I left it at that to figure out later. So I used pylons 0.9.6.2, and modified setup.py to set the pylons=0.9.6.2 to pylons==0.9.6.2 so as not to get the latest pylons version. Then everything works fine on my local machine. But when I upload the app onto GAE, there's an error. I have not tried 0.9.6.2 on App Engine, so while it probably works as well as 0.9.7rc2, I don't know for sure. You do need to install your application via python setup.py develop or adding its directory to sys.path, as Walter suggested. The instructions in the HOWTO actually have you do it both ways, which is redundant but makes sure it gets found one way or the other. There are problems with zip imports I'm still unravelling, so for now make sure all your eggs are installed as directories. -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: DistributionNotFound When Deploying App to GAE
Thanks s much! Got it solved! As Walter said, I need to add that path. On Nov 11, 5:31 am, Mike Orr [EMAIL PROTECTED] wrote: On Mon, Nov 10, 2008 at 7:39 AM, campos [EMAIL PROTECTED] wrote: Hi, I'm just followinghttp://code.google.com/p/appengine-monkey/wiki/Pylons to create a pylons featured GAE application. One thing I changed is that I specified the pylons version to 0.9.6.2 because pylons==0.9.7 requires webob==0.9.4, but latest GAE only provides webob==0.9.0, there's a conflict on the version. I noticed that last night. My solution was to delete WebOb in the SDK, but of course you can't do that on the server. So I think it's actually importing the older WebOb. That's compatible enough that it's working in my application, but it needs to be addressed. The proper strategy is to put its directory at the front of sys.path before webob is imported, but I think the log message said webob was already imported at the midpoint of paste-deploy.py. I left it at that to figure out later. So I used pylons 0.9.6.2, and modified setup.py to set the pylons=0.9.6.2 to pylons==0.9.6.2 so as not to get the latest pylons version. Then everything works fine on my local machine. But when I upload the app onto GAE, there's an error. I have not tried 0.9.6.2 on App Engine, so while it probably works as well as 0.9.7rc2, I don't know for sure. You do need to install your application via python setup.py develop or adding its directory to sys.path, as Walter suggested. The instructions in the HOWTO actually have you do it both ways, which is redundant but makes sure it gets found one way or the other. There are problems with zip imports I'm still unravelling, so for now make sure all your eggs are installed as directories. -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: mod_wsgi and virtualenv
On Nov 10, 11:15 pm, Christoph Haas [EMAIL PROTECTED] wrote: Hi, I'm trying to deploy a Pylons app via mod_wsgi (Apache). That works so far. But I want to use a virtualenv directory and can't find any documentation on it. I found something for workingenv but don't know how to translate that to virtualenv. http://code.google.com/p/modwsgi/wiki/VirtualEnvironmentssaid something about WSGIPythonHome but that can't be defined per virtual host. So I would have to use the very same virtualenv directory for all deployed applications (which is pretty absurd). Did you read that document completely or did you just scan it and try and cherry pick out of it what you thought may work? The mod_wsgi document explains that WSGIPythonHome is for linking mod_wsgi against virgin Python virtual environment so that site- packages in system wide Python is ignored. As also described, additional virtual environment directories are then applied to embedded mode or daemon mode processes using WSGIPythonPath or python- path option to WSGIDaemonProcess directive as appropriate. If running multiple VirtualHosts in embedded mode, then use site.addsitedir() instead as described. Otherwise, delegate each VirtualHost to its own daemon process and use python-path option for that daemon process group instead. I also foundhttp://pypi.python.org/pypi/virtualenv#using-virtualenv-without-bin-p... but that just prints these lines into Apache's error.log: The virtualenv document talks about 'activate_this.py' not 'activate' in that section. The mod_wsgi document also says not to use the activate_this.py script included in virtualenv 1.3 anyway. You might want to read both the mod_wsgi and virtualenv document again, as well as reading other documentation on the mod_wsgi site if you don't understand the difference between embedded mode and daemon mode. Graham [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] mod_wsgi (pid=26216): Target WSGI script '/etc/apache2/screenshots.debian.net.wsgi' cannot be loaded as Python module. [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] mod_wsgi (pid=26216): Exception occurred processing WSGI script '/etc/apache2/screenshots.debian.net.wsgi'. [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] Traceback (most recent call last): [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] File /etc/apache2/screenshots.debian.net.wsgi, line 8, in module [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] execfile(activate_this, dict(__file__=activate_this)) [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] File /home/debshots/bin/activate, line 4 [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] deactivate () { [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] ^ [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] SyntaxError: invalid syntax Seems like it can't run virtualenv's 'activate' script like that. :( Any ideas? Kindly Christoph signature.asc 1KViewDownload --~--~-~--~~~---~--~~ 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: go-pylons.py broken on Python 2.6 in Windows?
Of course I should not have even mentioned the operating system that shall not be named, at least if I wanted any replies. In any case, I'm sailing along just fine after setting up Python 2.6 and then virtualenv 1.3. Still, I thought it noteworthy for the careful reviewing of 0.9.7rc3 before it goes final, that the current go-pylons script linked near the top of the how-to page appears to be a no-go on Windows under Python 2.6. Oh wait, here's the same issue being discussed on the python- virtualenv Google Group, and possibly not even OS-specific. http://groups.google.com/group/python-virtualenv/browse_thread/thread/ffa736e7a0a9146d Cheers. On Nov 9, 4:12 pm, Eric Ongerth [EMAIL PROTECTED] wrote: Forgive me, I'm running Windows XP at the moment, my Xubuntu-fied laptop was recently stolen. I've cleaned up my windows environment, removed Python 2.5 and everything associated with it, then installed Python 2.6. I then used ez_setup.py to get setuptools 0.6c9. I downloaded go-pylons.py fromhttp://www.pylonshq.com/download/0.9.7/go-pylons.py. At this point I should have been properly prepared to run the following command. Instead, note what happened: New python executable in sandbox\Scripts\python.exe Installing setuptools... Complete output from command sandbox\Scripts\python.exe -c #!python \\\Bootstrap setuptoo... --always-copy -U setuptools: 'import site' failed; use -v for traceback Traceback (most recent call last): File string, line 50, in module File H:\Python26\lib\os.py, line 63, in module import ntpath as path File H:\Python26\lib\ntpath.py, line 11, in module import genericpath ImportError: No module named genericpath ...Installing setuptools...done. ... right. So it would appear that go-pylons.py is not ready for Python 2.6 at this point, at least on Windows. Am I missing something? Or should I just stick with 2.5 for 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---