Re: [web2py] Re: How to start web2py server permanently

2011-06-07 Thread pradeesh narayan
Thank you Rahul... Its worked fine. Thanks once again for your help. On Tue, Jun 7, 2011 at 7:12 AM, Rahul rahul.dhak...@gmail.com wrote: Alternately, you can use the nohup command if you have shell access. Like nohup python web2py.py - a'recycle' -i ip of your site -p port This will

Re: [web2py] Re: How to start web2py server permanently

2011-06-07 Thread Manuele Pesenti
On 07/06/2011 08:00, pradeesh narayan wrote: Thank you Rahul... Its worked fine. Thanks once again for your help. you got another chance here http://www.web2py.com/book/default/chapter/11#Start-as-Linux-Daemon Manuele

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

2011-06-07 Thread Mike Veltman
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 a form field: http://web2py.com/book/default/chapter/07#Pre-populating-the-form Yes I know,

[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),

[web2py] Re: request.is_local

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

[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 pbreitenb...@gmail.com wrote: Does it work if ajxa=True? What are the [0][0] for?

[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: 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 pradeeshnara...@gmail.com wrote: I have installed web2py on a remote opensuse server 10.3 and I am using a Putty to

[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

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 a form field:

[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] small bug in 1.96.3

2011-06-07 Thread danto
2011/6/7 Gabriele Alberti gabriele.albe...@gmail.com 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] 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

[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: 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 ml.richard.vez...@gmail.com wrote: I understand your need!! I just don't know neither how to do it... It was the only piece of the

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

[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 system user /usr/bin/python /opt/display/web2py.py -i ip address -a

Re: [web2py] Re: web2py 1.96.1 is OUT

2011-06-07 Thread Pierre Thibault
2011/6/7 Alessandro Iob alessandro@gmail.com 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).

[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 sebastian.ov...@gmail.com wrote: tracked inhttp://code.google.com/p/web2py/issues/detail?id=285 On Sat, Jun 4, 2011 at 12:53 AM, Massimo Di Pierro

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 nevo.a...@gmail.com 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

[web2py] Re: request.is_local

2011-06-07 Thread LightOfMooN
thank you On 7 июн, 19:50, Anthony abasta...@gmail.com 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).

[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] 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 ö - ouml; data = 'apersouml;nliche bitte/a' # data from db created with wysiwyg editor html = TAG(data) #after ouml; - ?

[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 p.dirck...@googlemail.com 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.    

[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] 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] 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

Re: [web2py] web2py 1.96.4 is OUT

2011-06-07 Thread Pierre Thibault
2011/6/7 Massimo Di Pierro massimo.dipie...@gmail.com - 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

Re: [web2py] web2py 1.96.4 is OUT

2011-06-07 Thread danto
2011/6/7 Massimo Di Pierro massimo.dipie...@gmail.com 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

[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

Re: [web2py] web2py 1.96.4 is OUT

2011-06-07 Thread danto
2011/6/7 danto web2py.n...@gmail.com 2011/6/7 Massimo Di Pierro massimo.dipie...@gmail.com 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) -

[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 to

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: 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 pierre.thibau...@gmail.com wrote: 2011/6/7 Massimo Di Pierro massimo.dipie...@gmail.com - auto import should work on windows (now on windows ignore will ignore case by default) I don't like this

[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

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] 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:

[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 rru...@gmail.com wrote: Hello all. I am using web2py to generate a form and save the

[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 rru...@gmail.com 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

Re: [web2py] Re: web2py 1.96.4 is OUT

2011-06-07 Thread Pierre Thibault
2011/6/7 Massimo Di Pierro massimo.dipie...@gmail.com What do you propose? I do not like it very much either. On Jun 7, 3:33 pm, Pierre Thibault pierre.thibau...@gmail.com wrote: 2011/6/7 Massimo Di Pierro massimo.dipie...@gmail.com - auto import should work on windows (now on windows

[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

[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 pierre.thibau...@gmail.com wrote: 2011/6/7 Massimo Di Pierro massimo.dipie...@gmail.com What do you propose? I do not like it very much either. On

[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 sebastianjaya...@gmail.com 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.

[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),

[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 sebastianjaya...@gmail.com wrote: Hi Massimo, Here's a snippet