[web2py] Need help with selecting multiple rows into a single row

2012-01-20 Thread Adi
I am trying to export all rows from two tables, (e.g. purchase orders, and items) into a csv file, but if possible would like to export a single row per each purchase order (with belonging items divided into separate columns of the same row). I'm using MySQL, if it makes the difference. I read

[web2py] CUSTOMIZE SQLFORM.grid

2012-01-20 Thread cyber
I need not VIEW / EDIT / DELETE records in selected db table. I want user to be redirected to another page after clicking some link. But I have no ideas of how to customise grid. Is it possible to add some additional link to each record in SQLFORM.GRID?

[web2py] Re: Sending simplified email from web2py

2012-01-20 Thread pbreit
Should work fine. What does your code look like? http://web2py.com/books/default/chapter/29/8#Simple-text-email

Re: [web2py] PSTV [Paradigm Shift Television] Powered by Inclusion

2012-01-20 Thread Andrew Evans
Yes was made by me and a partner/friend of mine and ty On Fri, Jan 20, 2012 at 8:52 PM, Bruno Rocha wrote: > looks very nice on mobile! congrats! > > > On Sat, Jan 21, 2012 at 12:42 AM, Andrew Evans > wrote: > >> Wondering if this site can be included in the powered by web2py >> >> www.paradi

Re: [web2py] PSTV [Paradigm Shift Television] Powered by Inclusion

2012-01-20 Thread Bruno Rocha
looks very nice on mobile! congrats! On Sat, Jan 21, 2012 at 12:42 AM, Andrew Evans wrote: > Wondering if this site can be included in the powered by web2py > > www.paradigmshift.tv > > *cheers > > Andrew > -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Re: PSTV [Paradigm Shift Television] Powered by Inclusion

2012-01-20 Thread Anthony
Just added it. Very nice. :-) Anthony On Friday, January 20, 2012 9:42:48 PM UTC-5, Andrew wrote: > > Wondering if this site can be included in the powered by web2py > > www.paradigmshift.tv > > *cheers > > Andrew >

[web2py] Re: PSTV [Paradigm Shift Television] Powered by Inclusion

2012-01-20 Thread Massimo Di Pierro
It indeed appears to be web2py powered. Did you make it? On Jan 20, 8:42 pm, Andrew Evans wrote: > Wondering if this site can be included in the powered by web2py > > www.paradigmshift.tv > > *cheers > > Andrew

[web2py] Re: passing navigational links in the header and ajax woes

2012-01-20 Thread Massimo Di Pierro
There is nothing wrong in the /1/2/3 but I do not see where you use that in the code. I see a lot of repeated and un-necessary selects. I suspect you can simplify your code a lot. Can you explain in words what you want to achieve? On Jan 19, 10:53 pm, web-dev-m wrote: > Currently, in my applic

Re: [web2py] Re: Is it me or what?

2012-01-20 Thread Alexandre Andrade
I just cant recover my login/password and my only solution was marks ourway emails as spam, since i cant optout 2012/1/20 Farsheed Ashouri > Ourway is under development dude and it's going to be a large scale social > network system late 2012. > Check out it's blogging system for > *example*

[web2py] Re: my gae+web2py app: feed9 (like reddit)

2012-01-20 Thread Changju
Good job sungchi! On 1월2ㄴ0일, 오후8시38분, sungchi wrote: > source:https://github.com/sungchi/feed9 > link:http://www.feed9.com/(korean) > > based reddish source (now RedditClone > :https://github.com/mdipierro/web2py-appliances/tree/master/RedditClone > ) > UI :http://twitter.github.com/bootstrap/ >

[web2py] PSTV [Paradigm Shift Television] Powered by Inclusion

2012-01-20 Thread Andrew Evans
Wondering if this site can be included in the powered by web2py www.paradigmshift.tv *cheers Andrew

[web2py] Re: passing navigational links in the header and ajax woes

2012-01-20 Thread web-dev-m
To pass information from one controller to another. I assume it is poor programming practice then? I taught myself web programming on web2py, so I have never had formal training and it was the easiest way I could think of to do this. I think I have seen it in other posted examples as well. On Ja

Re: [web2py] Re: Select X random from returned list

2012-01-20 Thread Bruce Wade
Ok thanks Massimo. On Fri, Jan 20, 2012 at 5:09 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > yes. :-) > > On Jan 20, 5:48 pm, Bruce Wade wrote: > > Would this be the best approach: > > todays_ids = set(used_ad_ids) > > unseen_ads_query = self.db(~self.db.ads.id.be

[web2py] Re: Select X random from returned list

2012-01-20 Thread Massimo Di Pierro
yes. :-) On Jan 20, 5:48 pm, Bruce Wade wrote: > Would this be the best approach: >         todays_ids = set(used_ad_ids) >         unseen_ads_query = self.db(~self.db.ads.id.belongs(todays_ids)) >         unseen_ads_query = unseen_ads_query(self.db.ads.points >= 0) >         unseen_ads_query = u

[web2py] Re: Select X random from returned list

2012-01-20 Thread Bruce Wade
Would this be the best approach: todays_ids = set(used_ad_ids) unseen_ads_query = self.db(~self.db.ads.id.belongs(todays_ids)) unseen_ads_query = unseen_ads_query(self.db.ads.points >= 0) unseen_ads_query = unseen_ads_query(self.db.ads.viewable == True) unsee

[web2py] Select X random from returned list

2012-01-20 Thread Bruce Wade
Hi, I have selected a list of objects from the database, which is working. Now I would like to select 5 random rows from the list and ideally only hit the database once to get them 5 random rows. todays_ids = set(used_ad_ids) unseen_ads_query = self.db(~self.db.ads.id.belongs(toda

[web2py] Re: writable depending on another field

2012-01-20 Thread Massimo Di Pierro
It does not work because this db.t.f1 is a field (a column) not a value (true or false). I guess what you want is make the second field readable or writable depending on which record you are looking at. For example it makes no sense if you are inserting a new record, should the second field be ed

[web2py] Re: cPickle TypeError

2012-01-20 Thread Bruce Wade
Never mind I found my problem, I was using "load" instead of "load*s*" On Fri, Jan 20, 2012 at 2:48 PM, Bruce Wade wrote: > Hi I am trying to use cPickle to store data in the database when I try to > load the pickle data later I am getting the following error: > > Traceback (most recent call las

[web2py] writable depending on another field

2012-01-20 Thread Martin Weissenboeck
Hi, I want to have a model like db.define_table("t", Field('f1', 'boolean'), Field('f2', 'boolean', writable = db.t.f1), ) Of course, this does not work, but how could it be written? Regards, Martin

[web2py] Re: Need help with drag-n-drop using jQuery

2012-01-20 Thread Chris May
Hello, Frank, Welcome to web2py! I am also relatively new to web application development. I threw your code into a new application, and I get very fast responses, usually in a fraction of a second. I don't know exactly why I have a dramatic difference in speed, but I do notice one thing that mi

[web2py] cPickle TypeError

2012-01-20 Thread Bruce Wade
Hi I am trying to use cPickle to store data in the database when I try to load the pickle data later I am getting the following error: Traceback (most recent call last): File "/home/bruce/Development/bossteam_dev/projects/yaw/gluon/restricted.py", line 204, in restricted exec ccode in enviro

[web2py] Book typo

2012-01-20 Thread Johann Spies
db(db.dog).select(dictinct = db.dog.name[:3]) should be db(db.dog).select(distinct = db.dog.name[:3]) Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Query not in

2012-01-20 Thread Bruce Wade
Thanks Anthony, that was exactly what I was looking for. On Fri, Jan 20, 2012 at 1:33 PM, Anthony wrote: > How about: > > db(~db.table.id.belongs([2, 10, 5, 8])).select() > > Anthony > > On Friday, January 20, 2012 4:23:03 PM UTC-5, Detectedstealth wrote: >> >> Hi, >> >> How can I make web2py qu

[web2py] Re: Query not in

2012-01-20 Thread Anthony
How about: db(~db.table.id.belongs([2, 10, 5, 8])).select() Anthony On Friday, January 20, 2012 4:23:03 PM UTC-5, Detectedstealth wrote: > > Hi, > > How can I make web2py query for all results that are not in a list of ids? > > IE: > > dont_want_ids_to_be_returned = ['2','10','5','8'] > > db(db.

[web2py] Query not in

2012-01-20 Thread Bruce Wade
Hi, How can I make web2py query for all results that are not in a list of ids? IE: dont_want_ids_to_be_returned = ['2','10','5','8'] db(db.table.ids_not_in(dont_want_ids_to_be_returned)).select() I want the select to return everything except the records with the ids found in dont_want_ids_to_b

[web2py] Re: new book now available in HTML (english, japanese, italian)

2012-01-20 Thread peter
The html Peter On Jan 20, 2:33 pm, Massimo Di Pierro wrote: > talking about the html or the pdf or the printed one? > > On Jan 20, 4:14 am, peter wrote: > > > > > > > > > The book is great, but to my mind there is too big a margin over the > > left. This is an issue because it is hard to maximis

Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-20 Thread Jim Steil
Massimo Just did a fresh - hg clone https://code.google.com/p/web2py ...added my app to that installation and am seeing the same traceback I was getting yesterday. Traceback(most recent call last): File"C:\Deleteme\web2py\gluon\restricted.py",line204,inrestricted execccodeinenvironment

Re: [web2py] Re: Problem with .smartgrid on tables with links

2012-01-20 Thread Jim Steil
Massimo I think I'm having trouble getting the latest from the trunk. Here is what I'm seeing when I do a pull and then update: I don't know enough about mercurial to know why this is. I'm going to do a fresh install from trunk and see what happens. -Jim On 1/20/2012 12:19 PM, Massimo

[web2py] Re: Too many redirects when trying to use interactive demo

2012-01-20 Thread Floyd
I had the same problem. It was related to someggino blocchino the session. It never authenticated. Are you cookies enabled? Bye Giovanni

[web2py] Re: Too many redirects when trying to use interactive demo

2012-01-20 Thread Floyd
I had the same problem. It was related to someggino blocchino the session. It never authenticated. Are you cookies enabled? Bye Giovanni

[web2py] Selectively passing fields for db update

2012-01-20 Thread Yarin
I have a db update method that can update several images- however, at any given time I will only need to update 1 of the 3 images. a) Is there a way for me to pass in only the image I want updated without having to write the update method out 3 times- i.e. can I pass a pre-defined dictionary of ar

[web2py] Re: Problem with DB2 and text field type when accessing db2 using ODBC ...

2012-01-20 Thread David Marko
Hi Omi, I have read your blog post already. The reason I have asked is that this is existing app, I have switched from PostgreSQL to DB2 (both db on the HW) and app seems to be slower now. I thought it could be the issue with ODBC as I expect it generaly slower than native driver.

[web2py] Re: Problem with DB2 and text field type when accessing db2 using ODBC ...

2012-01-20 Thread Omi Chiba
Also, you can refer my blog post. http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html On Jan 20, 1:47 am, David Marko wrote: > Thank you !!! This setting s in db2cli.ini is really working for me without > any further chnage in web2py tables. Nice. > > Also how do you a

[web2py] Re: Problem with DB2 and text field type when accessing db2 using ODBC ...

2012-01-20 Thread Paolo Caruccio
I use pyodbc (http://code.google.com/p/pyodbc/) and my connection string is: db = DAL('db2://DSN=MYDATABASE;UID=userid;PWD=password') For other details you could read this thread https://groups.google.com/d/topic/web2py/HMVE9S2a6sQ/discussion

[web2py] Re: Problem with .smartgrid on tables with links

2012-01-20 Thread Massimo Di Pierro
can you check if trunk fixed it? On Jan 19, 10:45 am, Jim Steil wrote: > Hi > > Just updated to the latest trunk this morning and now my smartgrids > aren't working where the table being used has links. > > Here is what I'm getting: > > Traceback(most recent call last): >    File"C:\dev\web2py\gl

[web2py] Re: passing navigational links in the header and ajax woes

2012-01-20 Thread Cliff
> Currently, in my application, I am passing navigational links in the > header, such as /app/controller/view/1/2/3 > > Where 1/2/3 are things the controller and view use to set the correct > page. Why are you doing this? On Jan 19, 11:53 pm, web-dev-m wrote: > Currently, in my application, I am

[web2py] Re: new user startup error question

2012-01-20 Thread Cliff
Sounds like your default browser is not defined. I'm not a RedHattie, so I can't tell you how to do that. You can probably start Web2py from the command line, something like: python web2py.py -a 'your password' -i 127.0.0.1 -p 8000 Look in the ref manual for more info: http://web2py.com/books/de

[web2py] Re: Global Variables

2012-01-20 Thread Anthony
On Friday, January 20, 2012 11:59:54 AM UTC-5, Noob wrote: > > How i create my own's globals variables? What do you mean? Anything you define in a model will be available in (a) all subsequent model files (they are executed alphabetically), (b) the controller, and (c) the view. Is that what you

[web2py] Global Variables

2012-01-20 Thread Noob
How i create my own's globals variables?

[web2py] Sending simplified email from web2py

2012-01-20 Thread LightDot
Is it possible to send a completely simplified email with web2py gluon.tools.Mail class? I'm using my own SMTP and the procedure itself works fine, I can send emails to myself, etc. but the email content produced is giving me problems. No matter how plainly are my messages constructed, Mail cla

[web2py] Re: error importing custom modules into controller

2012-01-20 Thread monotasker
In case anyone else runs into a similar problem, it turns out that I was handling DAL and Crud improperly in the modules I was trying to import. For db, I added this in db.py right after the initial definition of db: current.db = db Then in my model, in any function that used db, I could just r

[web2py] Re: Too many redirects when trying to use interactive demo

2012-01-20 Thread Gerd
In my office i'm also on a proxy (here i get the error), at home it works perfectly regards Gerd

[web2py] Re: export to csv - no header row

2012-01-20 Thread Adi
Forgive me, I'm still new to python and web2py... Any recommended way how to insert/replace the first row with custom headers before or after export? thanks, Adi

Re: [web2py] Re: Too many redirects when trying to use interactive demo

2012-01-20 Thread Candido Vieira da Silva Neto
I'm having the same problem: Chrome 16.0.912.75 m Windows XP SP3 Note: I'm connecting through a proxy on work. On Fri, Jan 20, 2012 at 12:42 PM, Michael Aye wrote: > The same. Note that what I see in the browser is > .../demo_admin/ is immediately linked to > .../demo_admin/default/site > whic

[web2py] Re: Too many redirects when trying to use interactive demo

2012-01-20 Thread Michael Aye
The same. Note that what I see in the browser is .../demo_admin/ is immediately linked to .../demo_admin/default/site which then blinks several times back and forth with .../demo_admin/default/index?send=%2Fdemo_admin%2Fdefault%2Fsite until the browser gives up. No luck with the trace of our IT gu

[web2py] Re: Too many redirects when trying to use interactive demo

2012-01-20 Thread Massimo Di Pierro
I still cannot reproduce it. :-( What if you go directly to: http://web2py.com/demo_admin/default/site ? On Jan 20, 8:11 am, Michael Aye wrote: > Did empty the cache, no change. > Steps to reproduce are simple: > type web2py.com in browser's location bar. > Click on link for interactive demo:

[web2py] new user startup error question

2012-01-20 Thread robert schaefer
Hi, I am using RedHat Linux Ver 5.0., python 2.6.2 I downloaded the source and started the server with the command "python web2py.py" and got the message: Starting browser... Error showing url: There was an error launching default action command associated with this location. How seriou

[web2py] Re: Need help with drag-n-drop using jQuery

2012-01-20 Thread Frank Hall
The best I can come up with so far is my use of a generic view (I'm just getting into this web app stuff). I suspect that I need to elaborate index.html. Sound right? Here's my code: Control -- dispatch_board.py and default.py #--

[web2py] Re: my gae+web2py app: feed9 (like reddit)

2012-01-20 Thread Anthony
Very nice. I like the use of jQuery Mobile for mobile devices (works well on my Android). Just added to the Poweredby list. Anthony On Friday, January 20, 2012 6:38:40 AM UTC-5, sungchi wrote: > > source: https://github.com/sungchi/feed9 > link: http://www.feed9.com/ (korean) > > based reddish

[web2py] Re: my gae+web2py app: feed9 (like reddit)

2012-01-20 Thread Massimo Di Pierro
:-) On Jan 20, 5:38 am, sungchi wrote: > source:https://github.com/sungchi/feed9 > link:http://www.feed9.com/(korean) > > based reddish source (now RedditClone > :https://github.com/mdipierro/web2py-appliances/tree/master/RedditClone > ) > UI :http://twitter.github.com/bootstrap/ > > Well .. Jus

[web2py] Re: new book now available in HTML (english, japanese, italian)

2012-01-20 Thread Massimo Di Pierro
talking about the html or the pdf or the printed one? On Jan 20, 4:14 am, peter wrote: > The book is great, but to my mind there is too big a margin over the > left. This is an issue because it is hard to maximise the font size > and keep everything on the screen. Could the margin not be reduced

[web2py] Re: Too many redirects when trying to use interactive demo

2012-01-20 Thread Michael Aye
Did empty the cache, no change. Steps to reproduce are simple: type web2py.com in browser's location bar. Click on link for interactive demo: interactive demo Michael

[web2py] Re: Web2py auth and Qooxdoo

2012-01-20 Thread Phyo Arkar
To keep it simple. How can i login (without using form) to web2py Auth via AJAX? Thanks Phyo. On Fri, Jan 20, 2012 at 7:45 PM, Phyo Arkar wrote: > hello web2py. > > I am trying to get auth working with qooxdoo , can i know how should i > login using ajax and (ofcoz use session) of webpy? > >

[web2py] Re: Book-bug

2012-01-20 Thread Johann Spies
Apologies. I was wrong. I did a db.table.truncate in stead of db.table.truncate() The book is correct. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

[web2py] Book-bug

2012-01-20 Thread Johann Spies
The statement in the book "*You can truncate the table, i.e., delete all records and reset the counter of the id*." is not correct. The id-counter does not get reset during truncate. That is the case with Postgresql. I have not tested that on other databases. Regards Johann -- Because experie

[web2py] Web2py auth and Qooxdoo

2012-01-20 Thread Phyo Arkar
hello web2py. I am trying to get auth working with qooxdoo , can i know how should i login using ajax and (ofcoz use session) of webpy? Thanks Phyo.

[web2py] uuid-references and ondelete

2012-01-20 Thread Johann Spies
I suppose that when the book refers to references it always means a reference to the other record's id. How do I implement ondelete when using uuid references as foreign keys and not the id? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise y

[web2py] Re: Rackspace install.

2012-01-20 Thread Simon Ashley
Thanks, the job has been let and is under way ... On Jan 20, 8:42 pm, Simon Ashley wrote: > Have totally run out of time, and have posted on expect4solutions a > job for someone to complete an install/ fresh install on rackspace. > Postgres / apache (or equivalent). > Need a turnaround in the nex

[web2py] my gae+web2py app: feed9 (like reddit)

2012-01-20 Thread sungchi
source: https://github.com/sungchi/feed9 link: http://www.feed9.com/ (korean) based reddish source (now RedditClone : https://github.com/mdipierro/web2py-appliances/tree/master/RedditClone ) UI : http://twitter.github.com/bootstrap/ Well .. Just think like Reddit Thank you

[web2py] Re: sqlhtml unicode error

2012-01-20 Thread Alan Etkin
The book states (2.4.1) "... By design, web2py uses UTF8 encoded strings internally. ..." So I guess that the text returned by the server should be encoded to UTF-8 in order to avoid string handling errors when rendering for browser output. On 19 ene, 14:44, Alan Etkin wrote: > The text encoding

[web2py] Re: HOWTO: getting web2py to run on Android mobile devices

2012-01-20 Thread fpp
More on Jota : * Website : http://sites.google.com/site/aquamarinepandora/home/jota-text-editor * the author explains how to create and contribute syntax files, maybe someone can look into that ? * the (very customizable) toolbar, although it takes up some screen space, is a life-saver on device

[web2py] Re: HOWTO: getting web2py to run on Android mobile devices

2012-01-20 Thread fpp
Thanks, Vinicius. Here is another tip for those who are going to use SL4A to edit files directly on their device : ... do yourself a favour and install the "Jota text editor" from the Market, right now... It's not only free, but also ad-free and even open-source... and very well done ! Unfort

[web2py] Rackspace install.

2012-01-20 Thread Simon Ashley
Have totally run out of time, and have posted on expect4solutions a job for someone to complete an install/ fresh install on rackspace. Postgres / apache (or equivalent). Need a turnaround in the next 36 hours as required for Monday. Contact me privately. TIA,

[web2py] Re: new book now available in HTML (english, japanese, italian)

2012-01-20 Thread peter
The book is great, but to my mind there is too big a margin over the left. This is an issue because it is hard to maximise the font size and keep everything on the screen. Could the margin not be reduced to one quarter of its size? Thanks Peter On Jan 19, 8:29 am, Stefan Scholl wrote: > Stefan Sc