[web2py] Re: nice wysiwyg editor

2012-03-03 Thread LightDot
I have used wymeditor for quite a few projects and it's really great. It produces excellent code. I see refinerycms customized the interface quite a bit. Crude old fashioned pop-up windows are my biggest gripe with wymeditor's default design. On Sunday, March 4, 2012 5:48:04 AM UTC+1, Massimo

[web2py] Alphabetical Pagination

2012-03-03 Thread Praveen Bhat
Hello, I have a Listings page for Businesses and I want a Alphabetical pagination/menu like in the attached screenshot. Any help will be appreciated. Regards Praveen <>

[web2py] Re: 404 on 'list index out of range' errors?

2012-03-03 Thread HittingSmoke
Thanks. The technical aspects go a bit above my head but this is a good post for me to bookmark and use as a jumping off point for some reading. After switching out .first() but before adding the 404 redirect I was getting a ' 'NoneType' object has no attribute 'title'' error. The error ticke

Re: [web2py] Re: 404 on 'list index out of range' errors?

2012-03-03 Thread HittingSmoke
I tried this change and it returns a new error: ' 'NoneType' object has no attribute 'title''. The blow example fixed it up though. Thanks. On Saturday, March 3, 2012 7:57:45 PM UTC-8, rochacbruno wrote: > > > > On Sun, Mar 4, 2012 at 12:55 AM, HittingSmoke wrote: > >> def view(): >> postid =

[web2py] Re: Change redirect if Delete is checked on update form

2012-03-03 Thread HittingSmoke
Perfect! delete_this_record did the trick. Thank you. I also wasn't aware of response.toolbar(), thanks. I tried it out just for academic purposes and I'll remember it for the future. On Saturday, March 3, 2012 3:25:09 PM UTC-8, Anthony wrote: > > One more try -- see if request.vars.delete_this_

[web2py] Difference between storing session in memcache v/s DB

2012-03-03 Thread Sushant Taneja
Hi, I am creating an application for deployment on GAE. I would like to know the advantages and disadvantages of storing sessions in memcache v/s google datastore. Thanks, Sushant

[web2py] Re: nice wysiwyg editor

2012-03-03 Thread Anthony
http://www.wymeditor.org/ On Saturday, March 3, 2012 11:48:04 PM UTC-5, Massimo Di Pierro wrote: > > > http://demo.refinerycms.com/javascripts/wymeditor/jquery.refinery.wymeditor.js > > try here > > http://demo.refinerycms.com/ >

[web2py] Re: 404 on 'list index out of range' errors?

2012-03-03 Thread Anthony
> > def view(): > postid = request.args(0) > post = db(db.blogPost.id == postid).select()[0] > When the postid doesn't exist, the above select will return an empty Rows object, so subscripting it with [0] results in the IndexError. The web2py framework has no way of knowing that this pa

Re: [web2py] Re: 404 on 'list index out of range' errors?

2012-03-03 Thread Bruno Rocha
On Sun, Mar 4, 2012 at 12:55 AM, HittingSmoke wrote: > def view(): > postid = request.args(0) *or redirect(URL('default', 'index'))* > post = db(db.blogPost.id == postid).select()*.first()* > db.blogComment.post.default = postid > commentForm = SQLFORM(db.blogComment) > if comm

[web2py] Re: 404 on 'list index out of range' errors?

2012-03-03 Thread HittingSmoke
My view function is as such: def view(): postid = request.args(0) post = db(db.blogPost.id == postid).select()[0] db.blogComment.post.default = postid commentForm = SQLFORM(db.blogComment) if commentForm.process().accepted: response.flash = 'Comment accepted' elif c

Re: [web2py] Re: web2py[:]

2012-03-03 Thread Bruno Rocha
On Sun, Mar 4, 2012 at 12:37 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Thank you Bruno. I agree with Anthony. this is a amazing work. I will > mention it during the pycon talk. > > Who did the logo? I really like it. > I created the logo *web2py[:]*, So it will be understood o

[web2py] Re: web2py[:]

2012-03-03 Thread Massimo Di Pierro
Thank you Bruno. I agree with Anthony. this is a amazing work. I will mention it during the pycon talk. Who did the logo? I really like it. On Saturday, 3 March 2012 17:58:04 UTC-6, Anthony wrote: > > Amazing work! On behalf of the web2py community, thank you, Bruno. > > Anthony > > On Saturda

[web2py] Re: Eclipse highlighting errors in my web2py app

2012-03-03 Thread Marcelo Zamperetti
Thanks. I updated and using this code disappeared with the errors on 'FORM' and 'INPUT'. 'db', 'request', 'session', 'response' still with error. On Mar 3, 8:20 pm, Anthony wrote: > Which version of web2py are you using? If the latest (1.99.6), you should > be able to do: > > if 0: >     from glu

Re: [web2py] Re: Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2012-03-03 Thread Bruce Wade
You installed the tk library correct? On Ubuntu I had the same issue, it looks like we are missing a package. On Sat, Mar 3, 2012 at 1:11 PM, Richard Vézina wrote: > Ok, after reboot it keeps complain, but web2py welcome app finally load in > Firefox as Bruno report. > > :) > > Richard > > > On S

[web2py] Re: web2py / Apache2 configuration

2012-03-03 Thread Serpent_Guard
Yeah, I suppose I could just specify the host and scheme inline, thanks for the tip. The emails are generated using a view template, which the mailer routine (called from cron every minute) retrieves with a call to response.render(). They're then posted to a PHP webservice which does the actua

[web2py] multiple, variable number of uploads

2012-03-03 Thread VP
Is there a way to do multiple uploads in web2py? For example, I have an upload field that would allows users to upload one file, or two files, or three files, etc. Is there an easy way to do this? Thanks.

[web2py] Re: web2py[:]

2012-03-03 Thread Anthony
Amazing work! On behalf of the web2py community, thank you, Bruno. Anthony On Saturday, March 3, 2012 6:27:28 PM UTC-5, rochacbruno wrote: > > > Hi, > > The new web2py[:] is alive! > > There are still some minor css issues and content organization to solve, I > hope to have it all done by the we

[web2py] Re: web2py / Apache2 configuration

2012-03-03 Thread Anthony
How are the emails being sent? Note, you can also do URL(..., scheme='http', host='www.mysite.com'). Anthony On Saturday, March 3, 2012 6:23:48 PM UTC-5, Serpent_Guard wrote: > > I'm a bit of a novice when it comes to configuring apache. I followed the > instructions > here

Re: [web2py] 404 on 'list index out of range' errors?

2012-03-03 Thread Bruno Rocha
usually it can be done with: def show_post(): post_id = request.args(0) or redirect(URL('default', '')) On Sat, Mar 3, 2012 at 6:04 PM, HittingSmoke wrote: > I'm learning Python and web2py together (I know, not recommended but > I'm having fun) by writing a small and simple blog. > > I've

[web2py] Re: 404 on 'list index out of range' errors?

2012-03-03 Thread Anthony
Sounds like an error in your code -- I assume you have a URL arg (or var) being used to index a list, and you're going beyond the length of the list. That's not a 404 error. If you want, you can explicitly raise a 404 error in that case, but your code will have to check the id value and make sur

[web2py] web2py[:]

2012-03-03 Thread Bruno Rocha
Hi, The new web2py[:] is alive! There are still some minor css issues and content organization to solve, I hope to have it all done by the weekend. All members have been migrated from the old site to the new one, so if you want to login to the new site, user facebook, google or click in "lost pa

[web2py] Re: Change redirect if Delete is checked on update form

2012-03-03 Thread Anthony
One more try -- see if request.vars.delete_this_record works. If not, add request.toolbar() to the page and inspect request.vars to see all the variable names (don't do a redirect). Anthony On Saturday, March 3, 2012 3:52:50 PM UTC-5, HittingSmoke wrote: > > Somehow it's still not catching it.

[web2py] web2py / Apache2 configuration

2012-03-03 Thread Serpent_Guard
I'm a bit of a novice when it comes to configuring apache. I followed the instructions hereto install web2py on an EC2 instance, and it works great. Unfortunately, it seems web2py still thinks it's at http://127.0.0.1:8000/

[web2py] Re: Eclipse highlighting errors in my web2py app

2012-03-03 Thread Anthony
Which version of web2py are you using? If the latest (1.99.6), you should be able to do: if 0: from gluon import * That imports the entire API, including dummy request, response, session, cache, and T objects. Does that remove the errors? Anthony On Saturday, March 3, 2012 4:42:43 PM UTC-

[web2py] Re: Help with Cron

2012-03-03 Thread Serpent_Guard
Thanks for the pointer, I don't think soft cron will be ideal, but I did manage to get external cron working, so all's well. On Saturday, March 3, 2012 10:52:25 AM UTC-7, Serpent_Guard wrote: > > I've been developing a web2py app under Mac OS X, which utilizes the > built-in cron. It's been wor

[web2py] Eclipse highlighting errors in my web2py app

2012-03-03 Thread Marcelo Zamperetti
I'm trying to use Eclipse + Pydev to develop a web2py application. On my controller, Eclipse highlights as errors all the stuff that I'm using from web2py, like 'request', 'session', 'db', 'FORM', 'INPUT' and so on. I did a good deal of searching, but didn't find any real solution. What seems to be

Re: [web2py] Re: Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2012-03-03 Thread Richard Vézina
Ok, after reboot it keeps complain, but web2py welcome app finally load in Firefox as Bruno report. :) Richard On Sat, Mar 3, 2012 at 4:00 PM, Richard Vézina wrote: > I just update my home desktop with Oneiric Oceilot and get the problem : > > Firefox keep waiting for rocket or I don't know whi

[web2py] 404 on 'list index out of range' errors?

2012-03-03 Thread HittingSmoke
I'm learning Python and web2py together (I know, not recommended but I'm having fun) by writing a small and simple blog. I've run into a problem with 404s. When my app tries to pull up an invalid blog ID I get a 'list index out of range' error ticket. Ideally these should be 404 pages. Same goes f

Re: [web2py] Re: Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2012-03-03 Thread Richard Vézina
I just update my home desktop with Oneiric Oceilot and get the problem : Firefox keep waiting for rocket or I don't know which background process to complete... Here what I got in terminal : Version 1.99.6 (2012-03-02 16:43:58) stable Database drivers available: SQLite3, pymysql, pg8000, IMAP St

[web2py] Re: Change redirect if Delete is checked on update form

2012-03-03 Thread HittingSmoke
Somehow it's still not catching it. I edited the function a bit to make sure it wasn't just an issue with my URL syntax but I'm still being redirected to the nonexistent post view page: def edit(): postid = request.args(0) post = db(db.blogPost.id == postid).select()[0] editBlog = SQL

[web2py] Re: Legacy databases

2012-03-03 Thread Alan Etkin
If web2py uses pymysql, then it should not work with version 3: (pymysql) Requirements Python 2.4 or higher http://www.python.org/ 2.6 is the primary test environment. MySQL 4.1 or higher protocol41 support, experimental 4.0 support With some modifications, it

Re: [web2py] Re: Change redirect if Delete is checked on update form

2012-03-03 Thread Bruno Rocha
Sorry, the correct is delete_record def edit(): postid = request.args(0) post = db(db.blogPost.id == postid).select()[0] editBlog = SQLFORM(db.blogPost, post, deletable=True) if editBlog.process().accepted: if request.vars.*delete_record:* re

[web2py] Re: Change redirect if Delete is checked on update form

2012-03-03 Thread HittingSmoke
I'm having a problem, probably due to my noobishness. This is my edit function: def edit(): postid = request.args(0) post = db(db.blogPost.id == postid).select()[0] editBlog = SQLFORM(db.blogPost, post, deletable=True) if editBlog.process().accepted: if request.vars.delete:

[web2py] Re: web2py 1.99.6 backward compatibility issues with LOAD

2012-03-03 Thread Massimo Di Pierro
With the current trunk (1.99.7?) you can set content='' have have the message invisible. or content=None and in that case you have to make your own target div. On Saturday, 3 March 2012 12:01:25 UTC-6, Alan Etkin wrote: > > OK. So now, if I want to avoid the default "...loading" message in an >

[web2py] Re: Help with Cron

2012-03-03 Thread Alan Etkin
"... but note that soft cron is not enabled by default in the standard wsgihandler.py file provided with web2py ..." Maybe you could check the above (as I think that default cron method is soft in the server) if you haven't. Also, I belive that tasks are triggered after client requests if you are u

[web2py] Re: CRUD / SQLFORM.grid permissions

2012-03-03 Thread Oli
try this: # model db.define_table('adress', Field('name'), Field('email'), Field('created_by', db.auth_user, default=auth.user_id)) # controller def index(): """ example action using the internationalization operator T and flash rendered by

[web2py] Re: Change redirect if Delete is checked on update form

2012-03-03 Thread HittingSmoke
Wow... I was really overthinking that. Still trying to transition from Javascript to this. Thanks! On Mar 3, 12:25 am, Bruno Rocha wrote: > if form.process().accepted: >     if request.vars.delete: >         redirect(URL('index')) > > On Sat, Mar 3, 2012 at 4:41 AM, HittingSmoke wrote: > > I cr

[web2py] Re: web2py 1.99.6 backward compatibility issues with LOAD

2012-03-03 Thread Alan Etkin
OK. So now, if I want to avoid the default "...loading" message in an extra tag I can call LOAD() with content=None I'll try something else so when calling the function the content=None is guessed. On Mar 3, 2:32 pm, Massimo Di Pierro wrote: > Not your fault. I should have checked. The problem i

[web2py] Help with Cron

2012-03-03 Thread Serpent_Guard
I've been developing a web2py app under Mac OS X, which utilizes the built-in cron. It's been working great. Yesterday I deployed my app to a web2py install sitting on an EC2 instance running Ubuntu. Now, cron isn't working anymore. I'm not an expert in cron syntax, so I wonder if there's s

[web2py] Re: web2py 1.99.6 backward compatibility issues with LOAD

2012-03-03 Thread Massimo Di Pierro
Not your fault. I should have checked. The problem is that when LOAD(target=None) after the patch the .. is no longer displayed. On Saturday, 3 March 2012 11:14:39 UTC-6, Alan Etkin wrote: > > Why did my patch break backwards compatibility? I think that the > problem I mentioned in other th

[web2py] Re: Web2py wiki registration broken, and other bugs

2012-03-03 Thread Serpent_Guard
> > Just IS_IN_DB. I think the only other one for which it might be relevant > is IS_IN_SET, but once you specify a specific set of items, you generally > wouldn't need to apply additional validators. Also, note that whether or > not you get the drop-down widget for IS_IN_DB and IS_IN_SET is ju

[web2py] Re: CRUD / SQLFORM.grid permissions

2012-03-03 Thread Serpent_Guard
Yeah, I saw that, I guess I'm just a bit confused on how to implement it; what I want is for each user to have CRUD permissions on a given table, but only for records they've created themselves. Not sure how to do that with groups. I have it working now with a custom DAL query, so it's not su

[web2py] Re: web2py 1.99.6 backward compatibility issues with LOAD

2012-03-03 Thread Alan Etkin
Why did my patch break backwards compatibility? I think that the problem I mentioned in other thread about the remaining "...loading" will appear again if is LOAD called with a no default target argument. On Mar 3, 3:02 am, Massimo Di Pierro wrote: > Bruno has reported a backward compatibility is

[web2py] Legacy databases

2012-03-03 Thread Ralo Tannahill
Hello all I'm new to python and web2py, and I'm evaluating them to make new developments accessing legacy databases (MSSQL 2000, MySQL 3 and MySQL 5 ). I've tried the connection strings shown in the web2py book, but I can connect only to MySQL 5. - The error connecting to MySQL 3 is "access den

Re: [web2py] Re: unicode problem in args?

2012-03-03 Thread Jonathan Lundell
On Mar 3, 2012, at 8:39 AM, Anthony wrote: > (BTW, the thinking behind the raw args option is that you could parse the raw > args string into request.args early in your model processing, using whatever > rules you cared to, and then proceed as usual.) > > Makes sense. Any reason the raw_args opt

Re: [web2py] Re: unicode problem in args?

2012-03-03 Thread Anthony
> > (BTW, the thinking behind the raw args option is that you could parse the > raw args string into request.args early in your model processing, using > whatever rules you cared to, and then proceed as usual.) > Makes sense. Any reason the raw_args option shouldn't be available when using the

Re: [web2py] Re: About ldap_auth in 1.99.6

2012-03-03 Thread Massimiliano
Wow that's great!! I tested both allowed_groups and managed_groups in opendladp and it work!!! Thank you -- Massimiliano On Sat, Mar 3, 2012 at 8:57 AM, szimszon wrote: > If there is somebody using ldap_auth with AD please try to test > allowed_groups and / or manage_groups as I have no mea

Re: [web2py] Re: Error session._try_store_on_disk(request, response)

2012-03-03 Thread Anthony
> > Thank you for the hint! > > I have tried to store > > session.captcha=Recaptcha() > > > I think this statement is responsible for the error. Now I have changed > the code and the error has gone. > Hmm, I'm trying to figure out how that would trigger an error in dal.py.

[web2py] Re: Trunk from GIT?

2012-03-03 Thread pbreit
Looks like it's still at: git clone https://github.com/mdipierro/web2py.git But I think eventually it's moving to: git clone https://github.com/web2py/web2py.git Personally, I wouldn't mess with github at this point. Pretty much all you need to know is hg clone, hg pull and hg update.

[web2py] Trunk from GIT?

2012-03-03 Thread lyn2py
Hi guys, Probably a dumb question to most, but I couldn't figure how: How do I retrieve the trunk version using GIT? Must I use HG to retrieve the trunk version? Thanks!

Re: [web2py] Re: Error session._try_store_on_disk(request, response)

2012-03-03 Thread Martin Weissenboeck
Thank you for the hint! I have tried to store session.captcha=Recaptcha() I think this statement is responsible for the error. Now I have changed the code and the error has gone. 2012/3/3 Anthony > Are you trying to store a DAL object in the session? I don't think you can > do that. > >

Re: [web2py] Re: unicode problem in args?

2012-03-03 Thread Jonathan Lundell
On Mar 3, 2012, at 8:12 AM, Anthony wrote: > On Saturday, March 3, 2012 11:04:35 AM UTC-5, elffikk wrote: > thank you Anthony to pointing to a solution, > but I was hoping to get a response to that > http://groups.google.com/group/web2py/browse_thread/thread/917edfcd78f2ae9f/6ee5531b64583573?lnk=g

Re: [web2py] Re: unicode problem in args?

2012-03-03 Thread Anthony
On Saturday, March 3, 2012 11:04:35 AM UTC-5, elffikk wrote: > > thank you Anthony to pointing to a solution, > but I was hoping to get a response to that > > http://groups.google.com/group/web2py/browse_thread/thread/917edfcd78f2ae9f/6ee5531b64583573?lnk=gst&q=unicode+args#6ee5531b64583573 > Not

Re: [web2py] Re: unicode problem in args?

2012-03-03 Thread Vasile Ermicioi
thank you Anthony to pointing to a solution, but I was hoping to get a response to that http://groups.google.com/group/web2py/browse_thread/thread/917edfcd78f2ae9f/6ee5531b64583573?lnk=gst&q=unicode+args#6ee5531b64583573

Re: [web2py] Unable to stream to ios devices

2012-03-03 Thread Rajesh Subramanian
Thanks for the help Bruno. But after setting - response.headers['Connection'] = 'keep-alive' the header now shows: Connection: keep-alive, close I am running web2py with wsgi and apache. thanks, -rajesh On Friday, March 2, 2012 1:50:39 PM UTC-8, rochacbruno wrote: > > > > On Fri, Mar 2, 2012 a

[web2py] unicode problem in args?

2012-03-03 Thread elffikk
hi, I have such a problem this url works (unicode in vars http://localhost:8000/myapp/default/show/products?q=M%C4%83rimea but this doesn't (unicode in args) http://localhost:8000/myapp/default/show/products/s-M%C4%83rimea any ideas?

[web2py] Re: Error session._try_store_on_disk(request, response)

2012-03-03 Thread Anthony
Are you trying to store a DAL object in the session? I don't think you can do that. Anthony On Saturday, March 3, 2012 6:17:01 AM UTC-5, mweissen wrote: > > Hi, I have got the following "Internal error": > > Traceback (most recent call last): > > > File "/home/mweissen/webapps/w2p/web2py/gluon

[web2py] Re: Trying to limit the amount of HTML cruft in controllers

2012-03-03 Thread Anthony
On Saturday, March 3, 2012 6:59:40 AM UTC-5, fabien wrote: > > Thanks, SQLFORM.factory() in the controller + form.custom.widget.* in > the view seems to do what I want indeed. The name mislead me into > believing it did even more magic, not less, so I overlooked it. > > I can't figure out how to

[web2py] Semantic app

2012-03-03 Thread Martinho Galiano Alvar
Hello! A colleague of mine have created a biomedical ontology with Protege that has swrl rules and all the information of the patients' study stored into the ontology itself. I'm new to all this (both Protege and Web2py xD) and I would like to know if it's possible using the semantic plugin a

[web2py] Re: Trying to limit the amount of HTML cruft in controllers

2012-03-03 Thread fabien
Thanks, SQLFORM.factory() in the controller + form.custom.widget.* in the view seems to do what I want indeed. The name mislead me into believing it did even more magic, not less, so I overlooked it. I can't figure out how to create submit button widget(s) from SQLFORM.factory, though.

[web2py] Error session._try_store_on_disk(request, response)

2012-03-03 Thread Martin Weissenboeck
Hi, I have got the following "Internal error": Traceback (most recent call last): File "/home/mweissen/webapps/w2p/web2py/gluon/main.py", line 528, in wsgibase session._try_store_on_disk(request, response) File "/home/mweissen/webapps/w2p/web2py/gluon/globals.py", line 594, in _try_sto

Re: [web2py] web2py 1.99.6 backward compatibility issues with LOAD

2012-03-03 Thread Ovidio Marinho
Massimo, not would be good for more tests are performed when they reach 2.0 hasmore stability. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 -

Re: [web2py] Change redirect if Delete is checked on update form

2012-03-03 Thread Bruno Rocha
if form.process().accepted: if request.vars.delete: redirect(URL('index')) On Sat, Mar 3, 2012 at 4:41 AM, HittingSmoke wrote: > I created a very simple blog and when done editing a post, I am > redirected to the updated post. > > This works great unless I'm deleting a post, in which