Re: [web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-07 Thread Mike Veltman
> On Tuesday, June 7, 2011 2:26:45 AM UTC-4, Gwayne aka Mike Veltman wrote: > > > On Monday, June 6, 2011 9:15:27 PM UTC-4, Gwayne aka Mike Veltman wrote: > > > > And that was it... > > > > > > > > Thank you very much. Mmmm, this should go in the book.. > > > > > > There's also this method of pre

[web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread cjrh
On Jun 7, 10:16 pm, Massimo Di Pierro wrote: > - explicitly closing all open files (should make it work in Pypy), > thanks Caleb Just everyone, please note: that was a large change (>80KB diff) affecting tiny parts of many files, so you should test your apps before immediately upgrading any produ

[web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread cjrh
On Jun 7, 10:38 pm, danto wrote: > Traceback (most recent call last): >   File "/home/danto/web2py/gluon/restricted.py", line 184, in restricted >     passed to RestrictedError to identify where the error occurred. >   File "/home/danto/web2py/applications/admin/models/access.py", line > 2, in >

[web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread cjrh
On Jun 7, 10:38 pm, danto wrote: > I tried to upgrade from the web interface at my local installation and seem > to break something, raising me an error. I found this in the admin app error > log: > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > > Traceback (most recent call last): >   File "/home/danto/web

[web2py] Re: CRUD with custom links

2011-06-07 Thread Massimo Di Pierro
this should work: ids = [1, 2, 3, 4, 5] db.myTable.id.represent = lambda id: A(id, _href=URL('viewDetail', args=id)) form = crud.select(db.myTable, db.myTable.id.belongs(ids), _id='myid', _class='smarttable') On Jun 7, 8:14 pm, DJ wrote: > Hi Massimo, > > Here's a snippet of my code: > > ids = [

[web2py] Re: CRUD with custom links

2011-06-07 Thread DJ
Hi Massimo, Here's a snippet of my code: ids = [1, 2, 3, 4, 5] # I tried something like this but it does not work # db.myTable.id.represent = lambda value: A(myID, _href=URL (r=request, c='default', f='viewDetail', args=myID)) form = crud.select(db.myTable, db.myTable.id.belongs(ids), _id='myid

[web2py] Re: CRUD with custom links

2011-06-07 Thread Massimo Di Pierro
Please give us an example and we can show you a concrete solution. On Jun 7, 7:51 pm, DJ wrote: > Hi there, > > What is the easiest way to generate customized links on the output of a CRUD > select? I want to be able to specify the column and my URL with arguments. > > -Sebastian

[web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread Massimo Di Pierro
I am not much of a windows user. I would like to understand what can go wrong with the solution in trunk? On Jun 7, 7:01 pm, Pierre Thibault wrote: > 2011/6/7 Massimo Di Pierro > > > What do you propose? I do not like it very much either. > > > On Jun 7, 3:33 pm, Pierre Thibault wrote: > > > 20

[web2py] CRUD with custom links

2011-06-07 Thread DJ
Hi there, What is the easiest way to generate customized links on the output of a CRUD select? I want to be able to specify the column and my URL with arguments. -Sebastian

Re: [web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread Pierre Thibault
2011/6/7 Massimo Di Pierro > What do you propose? I do not like it very much either. > > On Jun 7, 3:33 pm, Pierre Thibault wrote: > > 2011/6/7 Massimo Di Pierro > > > > > - auto import should work on windows (now on windows ignore will > > > ignore case by default) > > > > I don't like this so

[web2py] Re: Query DB from a python script

2011-06-07 Thread Massimo Di Pierro
make sure you have the most recent web2py On Jun 7, 5:22 pm, chewbacca wrote: > Hello all. > > I am using web2py to generate a form and save the information in a DB. > User puts the information on the form and the information gets saved > in the DB sqlite. > I want to be able query the DB and get

[web2py] Re: Query DB from a python script

2011-06-07 Thread Massimo Di Pierro
Try this from gluon import DAL db=DAL('sqlite://fw.db',folder='applications/app/ databases',auto_import=True) rows = db(db.fw).select() dest_ip_string ='%s' % rows[1].dst_ip On Jun 7, 5:22 pm, chewbacca wrote: > Hello all. > > I am using web2py to generate a form and save the information in a D

[web2py] Query DB from a python script

2011-06-07 Thread chewbacca
Hello all. I am using web2py to generate a form and save the information in a DB. User puts the information on the form and the information gets saved in the DB sqlite. I want to be able query the DB and get the information the from the user input. = file DB.PY looks like this: ..

Re: [web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread Stifan Kristi
good job, everyone, hope web2py improve day by day, thank you so much. \(^o^)/

[web2py] Re: Optimising web2py for GAE

2011-06-07 Thread howesc
i assert that there is something hidden in your code base that is causing the slow response - what is in your models? are they taking a long time to load? i have had problems where i was doing things in models (initializing global variables) that caused my app to start hanging when i was doing

[web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread Massimo Di Pierro
What do you propose? I do not like it very much either. On Jun 7, 3:33 pm, Pierre Thibault wrote: > 2011/6/7 Massimo Di Pierro > > > - auto import should work on windows (now on windows ignore will > > ignore case by default) > > I don't like this solution. > > -- > > A+ > > - > Pier

Re: [web2py] Re: SQL help

2011-06-07 Thread DJ
Thanks all. I was looking for the SQL IN operator in web2py. It is called "belongs" as marin and pbreit mentioned.

[web2py] Re: Authentication using xmlrpc

2011-06-07 Thread Anthony
Have you seen this section in the book: http://web2py.com/book/default/chapter/09#Services-and-Authentication On Tuesday, June 7, 2011 4:25:16 PM UTC-4, Abhishek Gupta wrote: > Hello, > > I have an application in web2py. To create the command line interface of > the gui (web-interface), I want

Re: [web2py] web2py 1.96.4 is OUT

2011-06-07 Thread danto
2011/6/7 danto > 2011/6/7 Massimo Di Pierro > >> Many big fixes compared with 1.96.3. In particular: >> >> - explicitly closing all open files (should make it work in Pypy), >> thanks Caleb >> - even better security in uuid (thanks Jonathan and David) >> - template decoupled from web2py, thanks

[web2py] A simple app with Google Maps API

2011-06-07 Thread Relsi Hur
Hello guys, Last year I made ​​a small application to start my studies in web2py, with the help of Massimo I did deploy in the Google App Engine [1]. Now I realize that not released the code, then, for those who want to use for their studies, or implement in any app, the code is available on gith

Re: [web2py] web2py 1.96.4 is OUT

2011-06-07 Thread danto
2011/6/7 Massimo Di Pierro > Many big fixes compared with 1.96.3. In particular: > > - explicitly closing all open files (should make it work in Pypy), > thanks Caleb > - even better security in uuid (thanks Jonathan and David) > - template decoupled from web2py, thanks Ryan > - fixed a typo on O

Re: [web2py] web2py 1.96.4 is OUT

2011-06-07 Thread Pierre Thibault
2011/6/7 Massimo Di Pierro > - auto import should work on windows (now on windows ignore will > ignore case by default) > I don't like this solution. -- A+ - Pierre My blog and profile (http://pierrethibault.posterous.com) YouTube page (http

[web2py] Authentication using xmlrpc

2011-06-07 Thread Abhishek Gupta
Hello, I have an application in web2py. To create the command line interface of the gui (web-interface), I want to use xmlrpc service. For example if I have following function : @auth.requires_login def example(): temp = request.args[0] //do something on temp return dict(temp=temp)

[web2py] web2py 1.96.4 is OUT

2011-06-07 Thread Massimo Di Pierro
Many big fixes compared with 1.96.3. In particular: - explicitly closing all open files (should make it work in Pypy), thanks Caleb - even better security in uuid (thanks Jonathan and David) - template decoupled from web2py, thanks Ryan - fixed a typo on Oracle nested selects - better support for

[web2py] Re: Draw Tabs with one form

2011-06-07 Thread pbreit
You could have a look at Jquery UI tabs: http://jqueryui.com/demos/tabs/

[web2py] Re: search text inside html - using html.elements find

2011-06-07 Thread Massimo Di Pierro
You will need to encode utff8 and I am not sure how to encode utf8 in regex. On Jun 7, 11:46 am, pubu wrote: > Hi, > i am trying to search inside html data, which i get from DB(sqllite). > > Everythink works well, but if i try to search for 'äöü', i get no > match. > >    #before ö -> ö >     dat

[web2py] search text inside html - using html.elements find

2011-06-07 Thread pubu
Hi, i am trying to search inside html data, which i get from DB(sqllite). Everythink works well, but if i try to search for 'äöü', i get no match. #before ö -> ö data = 'persönliche bitte' # data from db created with wysiwyg editor html = TAG(data) #after ö -> ? el_list = html

[web2py] Re: Using web2py's view/template engine in a standalone application

2011-06-07 Thread Ryan Seto
For future reference, this has been resolved with revision a1619d2857e5 in the mercurial repository. As mentioned before, simply include just the gluon/template.py file from web2py, then use it similar to the following example. example.py ~ from template import render renderedText = render(

[web2py] Re: request.is_local

2011-06-07 Thread LightOfMooN
thank you On 7 июн, 19:50, Anthony wrote: > Note, you can probably even use an auth decorator, similar to checking for > ajax-loaded components via request.cid > (seehttp://www.web2py.com/book/default/chapter/13#Trapped-Ajax-Links). > > @auth.requires(request.env.http_web2py_component_location)

Re: [web2py] Draw Tabs with one form

2011-06-07 Thread Stifan Kristi
had you already normalize your database table? On Tue, Jun 7, 2011 at 9:03 PM, Neveen Adel wrote: > Hello, > > > I have table has 30 field, so for readability i want to using tabs > and each tab include 10 fields and allow the user to switch between > them and at the end there is one "save" but

[web2py] Re: BUG?: Funny Bug with LOAD;

2011-06-07 Thread selecta
if this is fixed properly it could also fix http://code.google.com/p/web2py/issues/detail?id=271 :D On Jun 4, 2:19 am, "Sebastian E. Ovide" wrote: > tracked inhttp://code.google.com/p/web2py/issues/detail?id=285 > > On Sat, Jun 4, 2011 at 12:53 AM, Massimo Di Pierro < > > > > > > massimo.dipie..

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-07 Thread Pierre Thibault
2011/6/7 Alessandro Iob > I have fixed the problem adding the following code in one of my models: > > import os > os.environ['PYTHONCASEOK'] = '1' > > It makes ignore path case on operating systems with case-insensitive > file-systems (namely Win32 and OS/X with the default fs). > > Do you think

[web2py] Re: How to start web2py server permanently

2011-06-07 Thread mattgorecki
If you are running Ubuntu (or using the Upstart init daemon) you can create an Upstart conf file in /etc/init/ like so: # tldisplayclient - start web2py web server description "start web2py web server" start on startup exec sudo -u /usr/bin/python /opt/display/web2py.py -i -a "" Matt On Jun 7,

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-07 Thread Alessandro Iob
I have fixed the problem adding the following code in one of my models: import os os.environ['PYTHONCASEOK'] = '1' It makes ignore path case on operating systems with case-insensitive file-systems (namely Win32 and OS/X with the default fs). Do you think it should be added, with a proper os t

[web2py] Re: How to not show the "delete file" checkbox

2011-06-07 Thread villas
As Anthony said, to avoid showing the delete checkbox just do something like this: Field('pic', 'upload', requires=IS_IMAGE()), On Jun 6, 6:31 pm, Richard Vézina wrote: > I understand your need!! > > I just don't know neither how to do it... It was the only piece of the book > I come up with af

[web2py] Draw Tabs with one form

2011-06-07 Thread Neveen Adel
Hello, I have table has 30 field, so for readability i want to using tabs and each tab include 10 fields and allow the user to switch between them and at the end there is one "save" button for all tabs that will insert a new record. How can i do that?? Thanks in Advance

[web2py] Re: request.is_local

2011-06-07 Thread Anthony
Note, you can probably even use an auth decorator, similar to checking for ajax-loaded components via request.cid (see http://www.web2py.com/book/default/chapter/13#Trapped-Ajax-Links). @auth.requires(request.env.http_web2py_component_location) def some_block(): Also, note that testing for

Re: [web2py] small bug in 1.96.3

2011-06-07 Thread danto
2011/6/7 Gabriele Alberti > Hello, > it seems in latest web2py version, gluon/utils.py, line 93, logging is > used with no import .. > > Regards, > > G. > I think they already know about it. At this moment, solution is just do an 'import logging' in that 'except'

[web2py] small bug in 1.96.3

2011-06-07 Thread Gabriele Alberti
Hello, it seems in latest web2py version, gluon/utils.py, line 93, logging is used with no import .. Regards, G.

Re: [web2py] Re: SyntaxError: Object exists and cannot be redefined: lunid

2011-06-07 Thread Anthony
On Tuesday, June 7, 2011 2:26:45 AM UTC-4, Gwayne aka Mike Veltman wrote: > > > On Monday, June 6, 2011 9:15:27 PM UTC-4, Gwayne aka Mike Veltman wrote: > > > And that was it... > > > > > > Thank you very much. Mmmm, this should go in the book.. > > > > There's also this method of pre-populating

[web2py] Re: request.is_local

2011-06-07 Thread Anthony
I don't think calls to LOAD are local requests (even with ajax=False) -- the call to LOAD simply passes the original request environment to the component controller action. What you need is a way to determine if a request has come in via a call to LOAD. In that case, request.env should include

[web2py] Re: How to start web2py server permanently

2011-06-07 Thread selecta
if you want to make sure that web2py starts again shortly after a crash you can use this script http://www.web2pyslices.com/main/slices/take_slice/97 On Jun 6, 6:47 pm, Pradeesh wrote: > I have installed web2py on a remote opensuse server 10.3 and I am > using a Putty to start the web2py server.

[web2py] Earn $1000-$2500 per month

2011-06-07 Thread roseanje...@rediffmail.com
Earn $1000-$2500 per month If you Register your name You Get Sign-up bonus $5 AND Get $.20 cent for each referral. Further details http://www.earnbyforex.com/index.php?id=35678365 ***

[web2py] Re: request.is_local

2011-06-07 Thread LightOfMooN
ajax=True ofcourse doesn't work, because it's loads after response page. [0][0] is to unwrap loaded content On 7 июн, 13:43, pbreit wrote: > Does it work if ajxa=True? What are the [0][0] for?

[web2py] Re: request.is_local

2011-06-07 Thread pbreit
Does it work if ajxa=True? What are the [0][0] for?

[web2py] Counter based on fields being true or false.

2011-06-07 Thread annet
In db.py I have the following table: db.define_table('function', Field('company_id',db.company,default='',notnull=True,writable=False,readable=False), Field('home',type='boolean',default=True,writable=False), Field('logo',type='boolean',default=False), Field('tagline',type='boolean',