Re: [web2py] Re: bootstrap in trunk

2012-04-21 Thread Johann Spies
On 20 April 2012 22:28, Massimo Di Pierro wrote: > Do you use a custom search_menu or do you call it explicitly? Yes the API > for this thing have changed (for the better). This was clearly marked in > the book as an experimental feature. If you show us your code, I can tell > you now to adapt it.

[web2py] Bootstrap modal and AJAX

2012-04-21 Thread Annet
I have two functions: def eventList(): response.view='calendar/eventList.html' rows=db(...).select() return dict(rows=rows) def event(): response.view='calendar/event.html' row=db(db.EventList.id==request.args(0)).select(db.EventList.ALL).first() return dict(row=row) I

[web2py] Re: computed field

2012-04-21 Thread Annet
Thank you both for your replies. I'll give your solutions a try and see which one best suits my needs. Kind regards, Annet

[web2py] how can one replace an element in html?

2012-04-21 Thread simon
I have some html in which I want to replace some tags. I can change the attributes of a tag using elements but I cannot see any way to actually replace the tag. I want something similar to this code (which does not work but shows what I am trying to do) taghtml=TAG(html) pagebreaks=taghtml.elem

Re: [web2py] Re: What would be the best way to generate a summary of the 'count(*) 'of all my database table columns?

2012-04-21 Thread Cody Goodman
Well I tried that, and it gave me: In [2] : db(db.legacy_db.table).select() Traceback (most recent call last): File "/opt/web-apps/web2py/gluon/contrib/shell.py", line 233, in run exec compiled in statement_module.__dict__ File "", line 1, in File "/opt/web-apps/web2py/gluon/dal.py", li

[web2py] Re: Cannot insert specific key into table

2012-04-21 Thread haggis
Moved my application to a brand new web2py (latest stable) folder but it still doesn't work. I'm wondering about that because I used "active_event" all the time. If I have to use another name for that key, then I have to rewrite some code. That would be ok - but as long as I don't know why this

[web2py] HTML Tamplate conversion into web2py

2012-04-21 Thread Vibhor Purandare
How to convert html tamplate in web2py??

[web2py] Re: Unexpected exception

2012-04-21 Thread haggis
Same here with latest stable: Table: db.define_table('variable', Field('name', type='string', length=255), Field('value', type='string', length=255), format='%(name)s', primarykey=['name']) Traceback: Traceback (most recent call la

[web2py] Re: HTML Tamplate conversion into web2py

2012-04-21 Thread Anthony
I think you'll have to be more specific -- what are you trying to do? It might help if you take a look at http://web2py.com/books/default/chapter/29/5#Page-layout, as well as how the /views/layout.html and /views/default/index.html view files in the "welcome" app work. Anthony On Saturday, Ap

[web2py] Re: Cannot insert specific key into table

2012-04-21 Thread haggis
*head -> desk* I don't know why...but at any time by any case I wrote the following line into db.py: db(db.variable.name=='active_event').delete() hahaha, sorry for poluting this list! :(

[web2py] Re: Bootstrap modal and AJAX

2012-04-21 Thread Anthony
> > > {{=LOAD('calendar','eventList.load',args=int(organization.nodeID),ajax=True,target='eventlist')}} > > > The eventList view lists all the events and each event has a view details > button. > > data-target="#myModal">View Details > Have you confirmed that the Ajax request is getting sent an

Re: [web2py] Re: bootstrap in trunk

2012-04-21 Thread Massimo Di Pierro
I cannot reproduce this error. It could be a commit error. I am re-committing. massimo On Saturday, 21 April 2012 02:54:46 UTC-5, Johann Spies wrote: > > On 20 April 2012 22:28, Massimo Di Pierro wrote: > >> Do you use a custom search_menu or do you call it explicitly? Yes the API >> for this t

[web2py] Re: Unexpected exception

2012-04-21 Thread Massimo Di Pierro
I think I have a temporary fix in trunk but only works if single field primary keys. On Saturday, 21 April 2012 09:14:17 UTC-5, haggis wrote: > > Same here with latest stable: > > Table: > db.define_table('variable', > Field('name', type='string', length=255), > Fi

[web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread JoeCodeswell
This new look that Google Groups has implemented is seriously debilitating for a borderline dyslexic like me. Also the AJAX panel sizing is not working on my Chrome/WinXP system. Could this be a sign that web2py needs to eat the food it cooks and implement its own web2py-users forum? PS When

Re: [web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Bruce Wade
"WinXP system" wow, might be time to upgrade ;) On Sat, Apr 21, 2012 at 9:24 AM, JoeCodeswell wrote: > This new look that Google Groups has implemented is seriously debilitating > for a borderline dyslexic like me. > > Also the AJAX panel sizing is not working on my Chrome/WinXP system. > > Could

[web2py] Record-level access authorization question

2012-04-21 Thread Michael Ellis
Given a set of tables in strict hierarchy, e.g. organization --> site --> building --> system --> circuit where --> denotes a one-to-many relationship and each of the first 3 tables contains an email address field, "f_contact_email", that corresponds to a registered user, what's the best way to

[web2py] Re: Adding permissions upon registration

2012-04-21 Thread cyan
> > Actually, looking at the code, auth.user.id should work as well, unless > you have auth.settings.registration_requires_verification = True, in which > case, session.auth.user.id won't work either (but form.vars.id will work > in either case). > I was going to update this post to reflect th

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Annet
Hi Joe, I am experiencing scroll problems both Mac OS X Snow Leopard and Lion using Firefox or Safari. resizing the browser window makes the scroll bar behave properly. Furthermore the text editor is an annoyance, when I copy and paste the contents of an error ticket, resetting the font is jus

[web2py] Re: Continuous Integration

2012-04-21 Thread lpg
HI All I'm doing some research on Continuous Integration for web2py, and would really like someone to share their experience with this. Seems like it would be an important complement to web2py enterprise deployments. On Monday, January 18, 2010 12:39:48 PM UTC-2, Matthew wrote: > > Has anyone

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Gour
On Sat, 21 Apr 2012 09:24:32 -0700 (PDT) JoeCodeswell wrote: > Could this be a sign that web2py needs to eat the food it cooks and > implement its own web2py-users forum? I follow this group using Claws mailer which can read nntp groups - in this case this newsgroup is available via Gmane (http

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread JoeCodeswell
Dear Annet, Thanks for the reply. I am now logged in using Opera/WinXP. The left panel NOW stays closed so i think that's a Chrome problem. However, for me, there is still a readability issue and also there is the issue/benefit of eating the food you prepare. Of course Google has been a long

Re: [web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Jonathan Lundell
On Apr 21, 2012, at 9:24 AM, JoeCodeswell wrote: > This new look that Google Groups has implemented is seriously debilitating > for a borderline dyslexic like me. > > Also the AJAX panel sizing is not working on my Chrome/WinXP system. > > Could this be a sign that web2py needs to eat the food

Re: [web2py] Record-level access authorization question

2012-04-21 Thread Khalil KHAMLICHI
Create a custom field called "site" in auth_user table and when registering a new user give him his affected site, for any page user will view make sure you check for this value in you queries.

[web2py] ATTENTION before upgrading to trunk....

2012-04-21 Thread Massimo Di Pierro
There is a change in trunk. I replaced 'id' and 'reference' types from INT to BIGINT (when supported). If you have an existing table it should not cause a migration and there is an explicit check to avoid a migration that would break tables. The bottom line is hat new tables are not affected but

Re: [web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread JoeCodeswell
Dear Jonathan, Good point, lots of work - spam, etc.. I tried to find out how to revert, but when i click on the Google Groups Gear icon, where there WAS a revert option before, it has now disappeared. At least one page i went to in Google help said it is NOT possible to revert anymore. I have

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Anthony
> > PS When i tried to submit this post with a tag of "meta", Google Groups > told me "only suggested tags can be used". > We can change that -- currently only admins can add tags, but we could enable community-generated tags as well. Also, for questions (but not discussions), we already have

Re: [web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Bruce Wade
The revert to old groups was only temporary the new design is what everyone needs to use now I believe if not right now then soon it will be the only option. On Sat, Apr 21, 2012 at 10:46 AM, Anthony wrote: > PS When i tried to submit this post with a tag of "meta", Google Groups >> told me "onl

Re: [web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Jonathan Lundell
On Apr 21, 2012, at 10:44 AM, JoeCodeswell wrote: > Good point, lots of work - spam, etc.. I tried to find out how to revert, but > when i click on the Google Groups Gear icon, where there WAS a revert option > before, it has now disappeared. At least one page i went to in Google help > said it

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread JoeCodeswell
Hi Anthony, Thanks for the reply. I am glad we can make the ability to add our own tags. Maybe if the administrators added a "meta" tag, i'd be happy with taking the suggestions. Maybe I'll get used to this font. All these things happening at once, really set me off. :) At least the AJAX is wor

Re: [web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Jonathan Lundell
On Apr 21, 2012, at 10:46 AM, Anthony wrote: > PS When i tried to submit this post with a tag of "meta", Google Groups told > me "only suggested tags can be used". > > We can change that -- currently only admins can add tags, but we could enable > community-generated tags as well. > There are

[web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Carlos
Hi, My environment: latest web2py trunk, ubuntu, postgresql, nginx, uwsgi. Following are some requirements for my new potential project (where SYS is my web2py system, and CLIENT and SERVER are two completely different / independent non-web2py remote servers): (for each web services call ...)

Re: [web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread JoeCodeswell
Dear Jonathan, Thanks for the reply. When i was perusing Google Help, i saw that some still had the ability to revert and others did NOT. That was another thing that got me going on this subject. I was thinking that Google is using me as a Tester without paying me, by not letting me revert. I

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Bruce Wade
>From what you explained it sounds like you just want: 1) Independent database server 2) Web2py to handle requests via a service 3) Javascript to connect to a web2py service using ajax and or sockets If that is what you are asking it web2py can handle that simply if that is not what you are sugges

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Jonathan Lundell
On Apr 21, 2012, at 11:02 AM, Carlos wrote: > My environment: latest web2py trunk, ubuntu, postgresql, nginx, uwsgi. > > Following are some requirements for my new potential project (where SYS is my > web2py system, and CLIENT and SERVER are two completely different / > independent non-web2py re

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Carlos
Hi Bruce, Thanks, but that's not the case. My web2py system is already a complete cloud SaaS server, with a single postgresql db, multi-tenancy, multi-apps, single-sign-on, etc. And one potential customer (tenant), who will use all the other apps in the cloud, requires this new scenario/app wh

[web2py] Uploaded csv to matrix

2012-04-21 Thread Daniel Kaplan
I'm a new user of Python/web2py working on a scientific application. I've created a model of a table with a field of type 'upload' that will accept a csv file. Inside this csv file are comma separated floats, and there are several rows of numbers. Example: 100, 200, 300 1.2, 1.5, 1.6 >From

[web2py] Re: Adding permissions upon registration

2012-04-21 Thread Anthony
> > the verification email is sent before the > register_onaccept > callback, so if anything goes wrong during the callback (which I would > still consider part of the registration process), the verification email > will be sent regardless. I wonder if this would cause problem in some > appli

Re: [web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Anthony
> > That was another thing that got me going on this subject. I was thinking > that Google is using me as a Tester without paying me, by not letting me > revert. > Why should they pay you to use their free service?

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Bruce Wade
Hi Carlos, Thanks for clarifying. Do you know how can my web2py server connect remotely to a non-web2py server to execute some SQL commands? I think you need to think about this at a python level more then a web2py level. web2py uses python which means yes you can connect to whatever non-web2py

Re: [web2py] Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Bruce Wade
lol I wanted to ask that same questions very badly but held back. Also point out that I have never seen any website state they have to provide the ability to use a old design if you don't like the new design. On Sat, Apr 21, 2012 at 11:52 AM, Anthony wrote: > That was another thing that got me g

[web2py] error shown by running application

2012-04-21 Thread Sonu Srivastava
when i am running my application this error is shown...how to remove this error name 'middle_columns' is not defined

Re: [web2py] error shown by running application

2012-04-21 Thread Bruce Wade
http://docs.python.org/library/exceptions.html#exceptions.NameError On Sat, Apr 21, 2012 at 12:09 PM, Sonu Srivastava < sonu.srivast...@zero-group.com> wrote: > when i am running my application this error is shown...how to remove this > error > > name 'middle_columns' is not defined -- --

[web2py] a web2py powered shop (solution)

2012-04-21 Thread Tim Michelsen
Hello, I am thinking of a project where I need the integration of a web shop or payment functionalities. Is there such a snippet/plugin already existing? Can you point me to a website build with W2P where I could look for some inspiration? Thanks and regards, Timmie

[web2py] [BUG in w2p book] Re: a web2py powered shop (solution)

2012-04-21 Thread Tim Michelsen
Is there such a snippet/plugin already existing? BTW: the recipies on http://web2py.com/books/default/chapter/29/14?search=payment#Accepting-credit-card-payments are not working.

Multilingual Web Addresses (Was: Re: [web2py] Re: process args)

2012-04-21 Thread Ricardo Pedroso
>> # my url is looking like that "25-еннщшо ор зьлыв" > I don't think you can have those characters in a URL. And URL's should not > have spaces. I think it's already possible to have those chars in urls, even in the domain part. Does anyone here use chars in urls, outside of the ascii set? Is i

Re: [web2py] Record-level access authorization question

2012-04-21 Thread Michael Ellis
Thanks Khalil, but I'm not sure how that solves my problem. I want, if possible, to automate a filtering operation that will apply to every query and exclude records the user is not allowed to see based on where his email address appears in the organization --> site --> building hierarchy. Th

[web2py] Re: Record-level access authorization question

2012-04-21 Thread Anthony
How about using the common filter functionality: http://web2py.com/books/default/chapter/29/6#Common-filters db.define_table('t_site', Field('f_contact_email_string', type='string', label=T('Email')), Field('f_organization', type='reference t_organization', notnull = True,

Re: [web2py] Re: Record-level access authorization question

2012-04-21 Thread Michael Ellis
Awesome! Thanks Anthony, I think that's precisely the solution I was hoping existed. The login issue should not be a problem since I already have @auth.requires('login') in front of every controller function. So if I'm understanding common filters correctly, the common_filter on my t_circuits tab

[web2py] db date not required

2012-04-21 Thread BlueShadow
When I make a database table with a tate field for some reason it is always required. but I need a date field which you don't have to fill. Someone knows how this works. It would be perfect if it could have the value not known or something similar.

[web2py] Re: Image tutorial error multiple databases

2012-04-21 Thread Cody Goodman
also tried the alternate syntax for getting info from the db: In [10] : print db(db.images_db.image).select() Traceback (most recent call last): File "/home/cody/Downloads/web2py/gluon/contrib/shell.py", line 233, in run exec compiled in statement_module.__dict__ File "", line 1, in Fi

[web2py] Re: Uploaded csv to matrix

2012-04-21 Thread Massimo Di Pierro
record =db.mytable(id) originalfilename, stream = db.mytable.myfield.retrieve(record.myfield) data = stream.read() where myfield must be of upload type On Saturday, 21 April 2012 12:48:14 UTC-5, Daniel Kaplan wrote: > > > I'm a new user of Python/web2py working on a scientific application. I'v

[web2py] Re: Image tutorial error multiple databases

2012-04-21 Thread Massimo Di Pierro
The problem is that this: print db(images_db.image).select() should be print images_db(images_db.image).select() because you cannot have a query involving a table sent to database that does not have the table. You can also check with >>> 'images_db' in db.tables() False >>> 'images_db' in i

[web2py] Re: Image tutorial error multiple databases

2012-04-21 Thread Cody Goodman
it seems that the answer is to not use db(), but use: name_of_dal_object(name_of_dal_object.table).select()

[web2py] Re: db date not required

2012-04-21 Thread simon
requires=IS_EMPTY_OR(IS_DATE())) On Saturday, 21 April 2012 23:03:40 UTC+1, BlueShadow wrote: > > When I make a database table with a tate field for some reason it is > always required. but I need a date field which you don't have to fill. > Someone knows how this works. It would be perfect if it

Re: [web2py] Re: Record-level access authorization question

2012-04-21 Thread Anthony
> > def circuit_filter(query): > """ > Allow only records where auth_user matches the organization, site or > building that owns > the system that owns this circuit. > """ > eml = auth.user.email > sys = db.t_circuit.f_system > bldg = sys.f_building > si

Re: [web2py] Re: Record-level access authorization question

2012-04-21 Thread Michael Ellis
On Sat, Apr 21, 2012 at 7:31 PM, Anthony wrote: > def circuit_filter(query): >> """ >> Allow only records where auth_user matches the organization, site or >> building that owns >> the system that owns this circuit. >> """ >> eml = auth.user.email >> sys = db.t_cir

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Stefaan Himpe
This new look that Google Groups has implemented is seriously debilitating +200

Re: [web2py] Re: Record-level access authorization question

2012-04-21 Thread Anthony
> > I'm a little puzzled by the common_filter syntax. It looks a >> common_filter must be a function that takes a single argument, query, and >> returns a query that, in the book examples at least, doesn't reference the >> argument. I'm guessing that the argument is the query that would be >

Re: [web2py] [BUG in w2p book] Re: a web2py powered shop (solution)

2012-04-21 Thread Bruce Wade
http://96.126.99.73/ register use sponsor id 12. Under products is a kind of shopping card that allows you to buy projects using paypal, alipay or ucash. You can also cancel orders On Sat, Apr 21, 2012 at 12:27 PM, Tim Michelsen wrote: > Is there such a snippet/plugin already existing? >> >

Re: [web2py] [BUG in w2p book] Re: a web2py powered shop (solution)

2012-04-21 Thread Kenny Chung
Nice. Is this website urs? How can I open modal window like tos on this website? On Apr 21, 2012 6:20 PM, "Bruce Wade" wrote: > http://96.126.99.73/ register use sponsor id 12. Under products is a kind > of shopping card that allows you to buy projects using paypal, alipay or > ucash. You can als

Re: [web2py] Re: db date not required

2012-04-21 Thread Marco Mansilla
another approach might be default=request.now, writable=False, readable=False > requires=IS_EMPTY_OR(IS_DATE())) > > On Saturday, 21 April 2012 23:03:40 UTC+1, BlueShadow wrote: > > > > When I make a database table with a tate field for some reason it > > is always required. but I need a date fi

Re: [web2py] [BUG in w2p book] Re: a web2py powered shop (solution)

2012-04-21 Thread Bruce Wade
Yes I did ALL the back end development on this site. Had a frontend guy help with the graphics and front-end code. As for the modal window: http://archive.plugins.jquery.com/project/jquery-lightbox-clone-prettyPhoto http://designresourcebox.com/prettyphoto-jquery-lightbox/ On Sat, Apr 21, 2012 at

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Carlos
Thanks for your responses Bruce and Jonathan. With respect to Bruce's questions: >> Do you want to basically get a request from the client and pass that request to a server/mysql which will determine what to do with the request, return you data and that data is returned back to the client? Bas

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Bruce Wade
If you are going to have access to the database server, then why not just write the api with web2py and use web2py DAL to connect and execute commands. Otherwise you will need another RPC server or something on the database server to do mysql queries. Like this site I did: 96.126.99.73 has web2py

[web2py] Programmatically log in

2012-04-21 Thread cyan
I am trying to define a function which programmatically logs user in, e.g. def program_login: # log-in code this may be useful for some callback situations, e.g. auth.settings.verify_email_onaccept.append(program_login) in which case, user gets automatically logged in only after he/she has

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-21 Thread Carlos
Hi Bruce, It would be awesome if I could use web2py to connect to the remote MySQL server (using DAL to manipulate the database, instead of raw SQL commands), I really hope so, but I still can't confirm this, until maybe Monday or Tuesday when I will have more information about this. I'll like

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-21 Thread Massimo Di Pierro
+1000 On Saturday, 21 April 2012 19:11:37 UTC-5, stefaan wrote: > > > > This new look that Google Groups has implemented is seriously > > debilitating > > +200 > > >