[web2py] Re: Logic outside function problem.

2010-09-05 Thread annet
Weheh, Thanks for your reply. > Ah, I see. You want it inline, outside the functions. First of all, > the 2 lines session.id and session.name at the very top will probably > cause trouble all by themselves. Why don't you delete them? I deleted them, and that solved the problem. > I suppose the

[web2py] Re: Help needed with upload files & their manipulation [closed]

2010-09-05 Thread weheh
Works now. Thanks. I still need to get the knack of this. I hope practice makes perfect. On Sep 5, 11:39 pm, mdipierro wrote: > replace > >   stream=TAG(stream).flatten() # THIS IS WHERE THE PROBLEM IS > > with > >   import cStringIO >   stream=cStringIO.StringIO(TAG(stream).flatten()) > > On Sep

[web2py] Re: Help needed with upload files & their manipulation

2010-09-05 Thread mdipierro
replace stream=TAG(stream).flatten() # THIS IS WHERE THE PROBLEM IS with import cStringIO stream=cStringIO.StringIO(TAG(stream).flatten()) On Sep 5, 10:29 pm, weheh wrote: > I need to upload a file to uploads, process it, and store the > processed result in a new folder/file. > > # I've

[web2py] Help needed with upload files & their manipulation

2010-09-05 Thread weheh
I need to upload a file to uploads, process it, and store the processed result in a new folder/file. # I've defined the following two models db.define_table('infile', Field('parent',db.parent), Field('name','upload',autodelete=True,uploadseparate=True)) db.define_table('outfile', Field('pare

[web2py] Re: Thank You Massimo and all others

2010-09-05 Thread Richard
when I wrote that post there wasn't a central source of documentation but later the online book came out so I crossed that point out and added a link. I have added brackets to try and make my intention more clear. On Sep 6, 5:07 am, bally boy wrote: > Yes it is definitely real productive. By the

[web2py] Re: TAGs

2010-09-05 Thread weheh
I'm in the process of copying markdown_serializer to modules and modifying it to treat tags differently. I don't anticipate running into troubles importing from there and then callying my_serializer, do you? On Sep 5, 6:51 pm, mdipierro wrote: > html = TAG('xxxyyy') > for item in html.components:

[web2py] Re: Where to suggest edits for new book? [Closed]

2010-09-05 Thread weheh
Got it to work. Problem was that Firebug was taking up my whole window and the login wasn't displaying, or something like that. On Sep 5, 8:36 pm, Anthony wrote: > Google login works fine for me. Actually, it works too well -- I seem > to be able to edit pages without ever having requested Editor

[web2py] Re: change Auth.change_password

2010-09-05 Thread mdipierro
This is a bug. Thanks Jose. Now fixed in trunk. please try it. On Sep 5, 8:07 pm, Jose wrote: > I have a legacy database, which we have created the tables to use > Auth. > > We have inserted in auth_user all users through a process, for most > know the email, so we have set an empty string, and w

[web2py] change Auth.change_password

2010-09-05 Thread Jose
I have a legacy database, which we have created the tables to use Auth. We have inserted in auth_user all users through a process, for most know the email, so we have set an empty string, and we validate the user by username. In those days we had a situation where I've gone literally mad. I find

[web2py] Re: Problem with checkboxes widget

2010-09-05 Thread Fran
On Sep 6, 12:10 am, mdipierro wrote: > What is the definition for the field in question? Probably you have > type='string' but it should be type='list:integer' You're right, I did, wasn't aware about this new field type having been introduced. I'm still seeing the exact same issues with the chec

[web2py] Re: Where to suggest edits for new book?

2010-09-05 Thread Anthony
Google login works fine for me. Actually, it works too well -- I seem to be able to edit pages without ever having requested Editor status from Massimo. So, it looks like anyone with a Google, Yahoo, etc. account can edit the book at will -- is that how it's supposed to work? (Note, I didn't actual

[web2py] Re: Web2py Full Text Search Options

2010-09-05 Thread Anthony
On Sep 5, 7:12 pm, mdipierro wrote: > You use a relational database an you do not have too much data > (~1) records you can do > > db(db.mytable.myfield.contains('text')).select() This just does a basic search using the SQL "LIKE" operator, right? So no real search engine features like word s

[web2py] Re: Problem loading http://groups.google.com/group/web2py

2010-09-05 Thread Anthony
On Sep 5, 2:00 am, annet wrote: > > I just had this same issue with the web2py google group, but not with > > another group that I follow. Strange. > > So had I, however, when I navigate to a bookmarked page (so to .../ > browse_thread/...) this problem doesn't > occur. Onlyhttp://groups.google.co

[web2py] Re: Web2py Full Text Search Options

2010-09-05 Thread mdipierro
You use a relational database an you do not have too much data (~1) records you can do db(db.mytable.myfield.contains('text')).select() If you have lots of data and lots of users you need something better. I have never user Xapian. Ihave heard good things about http://sphinxsearch.com/ Massi

[web2py] Re: Problem with checkboxes widget

2010-09-05 Thread mdipierro
What is the definition for the field in question? Probably you have type='string' but it should be type='list:integer' On Sep 5, 3:56 pm, Fran wrote: > I'm running latest stable release (Bzr r2247) & trying to use this for > a multiselect field: > widget = SQLFORM.widgets.checkboxes.widget > > Bu

[web2py] Re: Logic outside function problem.

2010-09-05 Thread mdipierro
This does not work because if not request.args you redirect to a url that does not have request.args and your server gets into an infinite loop. You are reinventing the wheel. Why don't you just use auth and decorate the functions that require a user? On Sep 5, 11:42 am, annet wrote: > In a cont

[web2py] Re: auth.settings.login.next is not taking affect

2010-09-05 Thread mdipierro
It is not working because you are settings auth.settings.login_next within the scope of one http request, after redirect you have another http request and everything is reset. Only session variables persist from one http request to another. You can simplify your code and do what you ask in this wa

[web2py] Re: TAGs

2010-09-05 Thread mdipierro
html = TAG('xxxyyy') for item in html.components: print item from gluon.html import markdown_serializer print html.flatten(render=markdown_serializer) On Sep 4, 11:35 pm, weheh wrote: > - How to get a list of all elements in an html string? > - How to specify my own render routine like markmin

[web2py] Re: Where to suggest edits for new book?

2010-09-05 Thread mdipierro
works for me. Is anybody else having problems? On Sep 4, 11:36 pm, weheh wrote: > Hi Massimo - I have tried logging in with my Google account but > couldn't I got a popup window that loaded a blank page, and then > nothing. I don't have accounts with the other services, so need the > Google auth.

[web2py] Web2py Full Text Search Options

2010-09-05 Thread John
Hi all. I'm newby in web2py. How to implement full text search in my web2py web application? I am a big fan of the Xapian search engine library. Any plugin, recipes suggestion ? Thanks , John

[web2py] Re: upgraded to 1.83.2 with db table file appears corrupted

2010-09-05 Thread berubejd
I realize it hasn't been a large amount of time but I haven't had any occurrence of the problem since upgrading to 1.84.0. On Sep 1, 11:34 pm, berubejd wrote: > Here are the answers to your questions in my case: > >  - I am using 1.83.2 on Windows. >  - The DB in this test is sqlite. >  - I am us

[web2py] Problem with checkboxes widget

2010-09-05 Thread Fran
I'm running latest stable release (Bzr r2247) & trying to use this for a multiselect field: widget = SQLFORM.widgets.checkboxes.widget But it's not working properly. The create form works fine - the widget appears to work fine & the database is indeed populated properly with the expected: '|8|9|7|

Re: [web2py] Re: Thank You Massimo and all others

2010-09-05 Thread bally boy
Yes it is definitely real productive. By the way just went through your blog.. what baffles me is how can this be one of the downsides:- -->online book now available here Or is it just a typo :-) Have Fun! On Sun, Sep 5, 2010 at 6:15 PM, Richard wrote: > "there wa

[web2py] Re: Logic outside function problem.

2010-09-05 Thread weheh
Ah, I see. You want it inline, outside the functions. First of all, the 2 lines session.id and session.name at the very top will probably cause trouble all by themselves. Why don't you delete them? I suppose the rest of the code should work, but perhaps you should put the rest of the code inside a

[web2py] Re: Logic outside function problem.

2010-09-05 Thread weheh
What does it do? On Sep 5, 12:42 pm, annet wrote: > In a controller outside all functions I have this code: > > session.id > session.name > > if not request.args: >     redirect(URL(r=request,c='default',f='error')) > else: >     if not session.id or session.id!=request.args[0]: >         session

[web2py] Logic outside function problem.

2010-09-05 Thread annet
In a controller outside all functions I have this code: session.id session.name if not request.args: redirect(URL(r=request,c='default',f='error')) else: if not session.id or session.id!=request.args[0]: session.id=request.args[0] row=db(db.user.id==session.id).select(db.u

[web2py] Re: Scaffolding app with Twitter OAuth1.0a auth

2010-09-05 Thread Yannick
Hello Thanks for the note. I was using the Simple Authentication on my application to send tweets. I just noticed that twitter no longer support it. I guess I have to switch to Twitter oAuth API. I was wondering because it looks like to send tweet, each user of my application should get a CLIENT_I

[web2py] Re: Can't send tweet from my application

2010-09-05 Thread Yannick
Thanks for the note and the link. Yes you right that's the reason why. Twitter is no longer supporting Basic Authentication. We need to use OAuth. I just read this post: http://groups.google.com/group/web2py/browse_thread/thread/56e916dc8784e20a/ea6392970ae4cceb?lnk=gst&q=oAuth+twitter#ea6392970ae4

[web2py] Re: icon in menu[close]

2010-09-05 Thread Frank
if I change to(TAG[''](IMG(_src=URL(request.application,'static','home.png')),'title')), it's ok. Frank

[web2py] auth.settings.login.next is not taking affect

2010-09-05 Thread david.waldrop
I have an application that uses the built in auth components. Users can come to the site wither by hitting the root url, or via a link that has been emailed which contains a specific community. What I want to happen is the following: 1) if a user enters www.myapp.com they get the default splash

[web2py] Re: icon in menu

2010-09-05 Thread Frank
thanks for your feedback,it's 6 to 6, it is nothing wrong with ]. please refer to my reply to annet, it should be web2py related. thanks again, Frank

[web2py] Re: Thank You Massimo and all others

2010-09-05 Thread Richard
"there was Massimo standing alone holding the flag" haha, glad you tried it out anyway. I was also surprised how productive web2py is and yet how much criticism it gets. http://blog.sitescraper.net/2010/06/web2py-flexible-python-web-framework.html On Sep 4, 5:22 am, bally boy wrote: > Hi guys.

[web2py] Re: How to include the record_id of the in crud.message

2010-09-05 Thread weheh
This is from a Massimo answer in another thread: form=crud.create(db.table,onaccept=lambda form: do_something_with(form.vars.id)) On Sep 5, 6:52 am, Johann Spies wrote: > I want the id of the just record inserted with crud.create to be shown > in the message but I don't know how to ask crud for

Re: [web2py] Re: icon in menu

2010-09-05 Thread Mohamed Zenadi
In fact there is an extra ] if you count them ^_^ On Sun, Sep 5, 2010 at 2:03 PM, Frank wrote: > thanks for your feedback, you are absolutely right because web2pyis python > based. please refer to my message replying to annet, it shoulb be web2py > related. please advise what I have to deal with

[web2py] Re: icon in menu

2010-09-05 Thread Frank
thanks for your feedback, you are absolutely right because web2pyis python based. please refer to my message replying to annet, it shoulb be web2py related. please advise what I have to deal with the problem, thanks you. Frank

[web2py] Re: icon in menu

2010-09-05 Thread Frank
thanks for your feedback, after remove the comma, still get same error, Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 184, in restricted ccode = compile2(code,layer) File "C:\web2py\gluon\restricted.py", line 171, in compile2 return compile(code.rstrip()

[web2py] How to include the record_id of the in crud.message

2010-09-05 Thread Johann Spies
I want the id of the just record inserted with crud.create to be shown in the message but I don't know how to ask crud for the id. How can it be done? Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                          

[web2py] Re: icon in menu

2010-09-05 Thread Vidul Petrov
It's a Python homework, not web2py issue. On Sep 4, 5:48 pm, Frank wrote: > hi, > > I have code, >         response.menu_index = [ > > [TAG[''](IMG(_src=URL(request.application,'static','home.png'),'title'), > False, > URL(request.application,'default','facepda'), >              [ >