[web2py] Re: problem with type Int

2011-03-10 Thread LightOfMooN
Yes, ofc controller/function: prop = db(db.properties.id==request.args(0)).select().first() value=request.vars.myvar try: value = int(value) except: pass if value!=prop.value and type(value)==int: try: db(db.properties.id==request.args(0)).update(value=value) except:

[web2py] Re: Cron not running/starting on windows

2011-03-10 Thread Andrew Buchan
I put the script statements in a function in the controller and it works fine. The Task Manager doesn't show any python.exe processes when web2py is running as a service. @ Brian, apparently cron should work https://groups.google.com/forum/#!searchin/web2py/cron$20windows/web2py/id9p6-2h8gw/sOeGt

[web2py] Re: greetings from PyCon

2011-03-10 Thread Mengu
was it recorded? if so, it would be really interesting to watch it. On Mar 10, 7:28 am, Anthony wrote: > I think it went very well from the audience perspective as well. Massimo's > computer was set on Chicago time (Atlanta is an hour later), so he > accidentally gave us our break an hour late --

Re: [web2py] Re: greetings from PyCon

2011-03-10 Thread Jason (spot) Brower
I agree. I would love to see the work. On Thu, Mar 10, 2011 at 11:09 AM, Mengu wrote: > was it recorded? if so, it would be really interesting to watch it. > > On Mar 10, 7:28 am, Anthony wrote: > > I think it went very well from the audience perspective as well. > Massimo's > > computer was se

[web2py] Re: advanced form question

2011-03-10 Thread DenesL
I knew I had seen slices about this too... http://web2pyslices.com/main/default/search?query=cascad&criteria=title On Mar 10, 2:43 am, Manuele Pesenti wrote: > Il 09/03/2011 04:44, DenesL ha scritto:> That is called cascaded fields. > > One example:http://groups.google.com/group/web2py/msg/b2d5

[web2py] Re: greetings from PyCon

2011-03-10 Thread DenesL
Well done! I wish I could have been there.

[web2py] Show in select list a field of another table

2011-03-10 Thread Norbert Klamann
Hello all, I want to shoe in the select list a field from another table and don't know how to do it. I want to show a select list for persons with their name and the name of the company to which they belong Consider the following model db.define_table('document', Field('name'), Field('f

Re: [web2py] Re: greetings from PyCon

2011-03-10 Thread Ovidio Marinho
Thank's Anthony, Web2py is a vulcan. 2011/3/10 DenesL > > Well done! > I wish I could have been there. > -- Ovidio Marinho Falcao Neto ovidio...@gmail.com Tecnologia da Informaçao Casa Civil do Governador 83 3214 7885 - 88269088

[web2py] Re: problem with type Int

2011-03-10 Thread villas
Why don't you try testing the value of 'value' in your code by using a print statement to the console? At least that's what I usually do. You would ideally provide the entire controller function because your code does not explain itself very well to me (although it may be obvious to others!). On

[web2py] Re: Cant make a simple database

2011-03-10 Thread villas
I prefer to use singular names too, but I see it is clearly a good idea to use plural ones as these seldom conflict. How about 'request', 'requisition', 'purchase_order'. I sometimes make up a word like 'porder'. On Mar 10, 7:48 am, pbreit wrote: > I'm so bummed I can't use the table name "orde

[web2py] Re: very slow pageload time (20+ secs)

2011-03-10 Thread villas
I often start by looking at Firebug. You can see all the requests being loaded under the 'Net' tab. Occasionally I've noticed it is a request for a large image, an advert banner, Google Analytics or similar which is slow and not my code, so it is good to begin by excluding that possibility. On

Re: [web2py] Lacking nginx deployment guide

2011-03-10 Thread Michele Alzetta
On Thu, Mar 10, 2011 at 12:09 AM, minux wrote: > > Cutting the long story short, I really appreciate it if someone could > point me to a complete guide for nginx deployment, or writhe one :) > I have web2py on a linode.com VPS deployed on nginx with ssl access so I can have access to administrat

[web2py] Re: Dotcloud hosting great tutorial but stuck

2011-03-10 Thread stargate
The problem is when i am in the web2py directory the file wsgihandler.py doesn't exist so i can't type any of the commands when i type ls -l wsgihandler.py i get command not found same if i type the following command ln -s wsgihandler.py wsgi.py That is why i am stuck On Mar 9, 7:07 pm, Jona

[web2py] jqGrid: Pager's pgtext input textbox too wide

2011-03-10 Thread LotS
Trying to include jqGrid in a page and realized that the pager's pgtext (showing Page # of ##) is too wide and causing some of the information on the pager layer not visible. After some digging, realized that it is because of a property setting in /static/css/base.css as follow, =

[web2py] Performing database inserts with FORM( )

2011-03-10 Thread Eduardo
Hello, I understand database inserts with SQLFORM( ) and accepts( ) are automatic when input is valid. However, I need more control over the form fields and validation upon data entry, not on the model level. Those are limited when using SQLFORM. Can anyone point out a simple example of using FOR

Re: [web2py] Re: Cant make a simple database

2011-03-10 Thread Kenneth Lundström
I´m using f_ for fields and t_ for tables. The same way wizard creates those. Kenneth I prefer to use singular names too, but I see it is clearly a good idea to use plural ones as these seldom conflict. How about 'request', 'requisition', 'purchase_order'. I sometimes make up a word like 'p

Re: [web2py] Performing database inserts with FORM( )

2011-03-10 Thread Kenneth Lundström
Please explain what kind of control you need. It's much easier to help. Kenneth Hello, I understand database inserts with SQLFORM( ) and accepts( ) are automatic when input is valid. However, I need more control over the form fields and validation upon data entry, not on the model level. Thos

[web2py] Re: Cron not running/starting on windows

2011-03-10 Thread villas
If you are running from source, I believe you needed the Mark Hammond extensions to get cron working. I didn't see this mentioned in this thread so I thought I'd post it in case it helps or gives an extra clue. Regards, David On Mar 9, 11:49 am, Andrew Buchan wrote: > Hello, > > I have web2py r

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread Eduardo
I need to reorder fields and group then into tags. Also, because I'm dealing with a legacy database, I have to implement validation on new entries only, not on db.py. Please note I am just guessing FORM() and accepts() would be the best alternative. Feel free to suggest alternatives. Thanks, E

[web2py] Re: about SQLFORM

2011-03-10 Thread cyber
The code in controller: @auth.requires_login() def new(): author=auth.user.username form = SQLFORM(db.autos, fields=['num'], labels={'num':'Number'}, submit_button='GO', formstyle='divs') if form.accepts(request.vars, session): response.flash = 'It's OK!' elif form.errors:

[web2py] Re: about SQLFORM

2011-03-10 Thread cyber
The code in controller is: @auth.requires_login() def new(): form = SQLFORM(db.autos, fields=['num'], labels={'num':'Number'}, submit_button='GO', formstyle='divs') if form.accepts(request.vars, session): response.flash = 'Yoh-ho-ho!' elif form.errors: response.flash = 'Ba

Re: [web2py] Re: Dotcloud hosting great tutorial but stuck

2011-03-10 Thread Jonathan Lundell
On Mar 10, 2011, at 4:40 AM, stargate wrote: > > The problem is when i am in the web2py directory the file > wsgihandler.py doesn't exist so i can't type any of the commands when > i type > > ls -l wsgihandler.py > > i get command not found same if i type the following command > > ln -s wsgihan

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread DenesL
FYI you can turn off the automatic DB functions when using SQLFORM specifying dbio=False as a parameter in the form.accepts(...), see: http://web2py.com/book/default/chapter/07#SQLFORM-without-database-IO On Mar 10, 9:03 am, Eduardo wrote: > I need to reorder fields and group then into tags.

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread Eduardo
Thank you, DenesL; I know that. I don't see how that would help me. I do need to insert the data on the DB. Eduardo On 10 mar, 11:11, DenesL wrote: > FYI you can turn off the automatic DB functions when using SQLFORM > specifying dbio=False as a parameter in the form.accepts(...), see: > > http:

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread Anthony
I assume it would be the same as when using SQLFORM.factory -- see an example in the book here: http://web2py.com/book/default/chapter/07#SQLFORM.factory On Thursday, March 10, 2011 8:23:45 AM UTC-5, Eduardo wrote: > Hello, > > I understand database inserts with SQLFORM( ) and accepts( ) are

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread Ross Peoples
Let's not forget about SQLFORM.factory either. This lets you create a SQLFORM based on a virtual table that you create as an argument to SQLFORM.factory. For example, I used this code to provide edit capabilities when editing time clock entries for an app I'm writing. It includes form validatio

[web2py] javascript/jquery advice

2011-03-10 Thread Johann Spies
I am starting to learn javascript and am thinking of using more jquery and jquery UI and ajax elements in my applications and would appreciate on how to approach it: 1. Starting with javascript tutorials (e.g. from developer.mozilla.org) and move on to jquery tutorials and later on to how web2py

[web2py] Components and session: forbidden?

2011-03-10 Thread carlo
I tried to set a session in a component "post.load" and I receive a "RestrictedError" Ticket. Why you can not have a new session set in a component? Thank you carlo

[web2py] Re: about SQLFORM

2011-03-10 Thread DenesL
After an insert, form.vars.id will have the new record's id. But to avoid another DB access you can make the changes before the record is written using the onvalidation parameter in the accepts. @auth.requires_login() def new(): def set_name(form): form.vars.name=author retur

[web2py] Problem with unicode data in mssql

2011-03-10 Thread Skiros
Hi everyone ! I have an application working correctly with version 1.87.3 of web2py and SQL Server 2000. The database has a collation Modern_Spanish_CI_AS. My problems start when upgrade to version 1.93.2. In my code have originally: db = SQLDB('mssql2://User:Password@MyServer/MyDataBase', pool_

[web2py] Re: plugin_wiki: KeyError: 'active'

2011-03-10 Thread Massimo Di Pierro
This was fixed yesterday night. On Mar 9, 9:27 pm, Anthony wrote: > Yes, this error occurred during the PyCon tutorial this morning. Massimo > used his Emacs foo to fix the problem on the spot in about 30 seconds and > then proceeded with his example without skipping a beat. I think he's > planni

[web2py] Re: Components and session: forbidden?

2011-03-10 Thread carlo
sorry my fault. You can have: session.mysession=total you can not have: session.mysession=tot1+tot2+tot3 On 10 Mar, 15:42, carlo wrote: > I tried to set a session in a component "post.load" and I receive a > "RestrictedError" Ticket. > > Why you can not have a new session set in a component?

Re: [web2py] Re: [tip] Head JS script loader

2011-03-10 Thread Bruno Rocha
I dont know, I never used these other libs, I am using head.js and it seems very good. 2011/3/9 Carlos > Hi Bruno, > > How does HeadJs compare with RequireJs and LabJs?. > > http://requirejs.org/ > > http://labjs.com/ > > Thanks, > >Carlos > >

[web2py] Is a UNION query possible with DAL ?

2011-03-10 Thread Norbert Klamann
I look for something like select a,b,c from table1 union select a,b,c from table2 I also tried to combine 2 distinct 'Rows' objects and dal.Sets (with the same structure) , but both don't support this operation. Norbert

[web2py] encoding problem

2011-03-10 Thread Eduardo
Hi, I modified the insert( ) function of appadmin.py from the example app by passing a dict to the labels attribute of SQLFORM( ) - in other words: appadmin.py > insert( ) > SQLFORM(.. labels=dict) The labels, with Portuguese characters, are not correctly encoded on the final result. Note th

[web2py] Suggested functionality extention for SQLTABLE

2011-03-10 Thread Andrew Buchan
Hello, I wasn't happy with two things about SQLTABLE : A) How you are obliged to show the id field if you want linkto functionality. Not only do I not always want the user to see that id field (they may use a different identifier, or it may simply confuse them), I would also rather be able to lab

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread DenesL
On Mar 10, 9:14 am, Eduardo wrote: > Thank you, DenesL; I know that. I don't see how that would help me. I > do need to insert the data on the DB. > > Eduardo > > On 10 mar, 11:11, DenesL wrote: > > > FYI you can turn off the automatic DB functions when using SQLFORM > > specifying dbio=False a

Re: [web2py] Re: Cron not running/starting on windows

2011-03-10 Thread Andrew Buchan
Thanks, I think the pywin32 extensions are needed to run web2py from source on windows full stop. Either way, I have them installed. I'm working around this issue using cURL and a scheduled task, which actually suits my fine for now. On Thu, Mar 10, 2011 at 1:57 PM, villas wrote: > If you are r

[web2py] Re: javascript/jquery advice

2011-03-10 Thread Ross Peoples
I would read a few short tutorials on JavaScript before jumping into jQuery. It is important to understand things like dictionaries, as nearly every jQuery UI component requires you to pass a dictionary of arguments. Working with jQuery is much different than working with regular JavaScript, so

[web2py] javascript/jquery advice

2011-03-10 Thread pbreit
Start with th Ajax chapter in the web2py book.

[web2py] Re: filtering selection list

2011-03-10 Thread Massimo Di Pierro
Two things: 1) do not do: t_list = gdb(gdb.select(gdb.t_table.code, gdb.t_table.name)) Field('t', requires = [IS_NOT_EMPTY(), IS_IN_SET(t_list)]) instead fo Field('t', requires = IS_IN_DB(gdb,'t_table.code','%(name)s')) 2) for v you can do Field('v', requires = IS_IN_DB(gdb(query),'v_table.cod

[web2py] Re: Dotcloud hosting great tutorial but stuck

2011-03-10 Thread pbreit
For dot cloud you need to be using the web2py source code, not the Mac download. You should be able to type "ls -al" in any terminal window. If not, you have big problems. That's ELL ESS space dash A ELL You can develop on the Mac download but you ar going to need to first deploy web2py from th

Re: [web2py] Re: Cant make a simple database

2011-03-10 Thread pbreit
Yeah I saw that. What are people's thoughts on that? It seems like clutter to me but can definitely mak things easier in places.

[web2py] Re: Show in select list a field of another table

2011-03-10 Thread Massimo Di Pierro
You need to change the order db.define_table('person', Field('name',readable=False), Field('company',db.company,label='Firma',readable=False), Field('role',label='Rolle',readable=False), ) db.define_table('company', Field('name', readable=False), ) db.define_table('document', F

Re: [web2py] Attempting to view error in application causes an error in the admin application

2011-03-10 Thread Jonathan Lundell
On Mar 10, 2011, at 7:47 AM, Ross Peoples wrote: > I just updated to the latest trunk and I am now having problems view errors > in my application, as clicking on a ticket creates another ticket, but in the > admin application this time. I opened the latest error in the > applications/admin/erro

[web2py] Re: ('active') when running plugin_wiki

2011-03-10 Thread Massimo Di Pierro
fixed now On Mar 9, 8:15 pm, villas wrote: > Yes, plugin_wiki is broken because the field active was deleted. I > already reported this and I hope Massimo will fix it soon. > > On Mar 9, 11:24 pm, mat -- wrote: > > > > > > > > > Hi > > > I downloaded latest version of Web2py and plugin_wiki. > >

[web2py] Re: conditionally include in view

2011-03-10 Thread Massimo Di Pierro
correct On Mar 9, 5:14 pm, ron_m wrote: > I use this in a portion of the views coded for what I am working on and it > works for me. I just ran the page with the test true and again with the test > false and I get the include file content inside the {{if condition:}} branch > if the condition is

Re: [web2py] Lacking nginx deployment guide

2011-03-10 Thread pbreit
Probably good to have nginx instructions since that seems to be the fashionabl web server right now. I'm a bit annoyed by Cherokee's lack of reliable file-based configuration as well as it's lame new marketplace. However, don't you have to run nginx behind apache or another server?

[web2py] Re: encoding problem

2011-03-10 Thread Massimo Di Pierro
How did you edit using utf8 or did you insert latin-1 chars? On Mar 10, 9:44 am, Eduardo wrote: > Hi, > > I modified the insert( ) function of appadmin.py from the example app > by passing a dict to the labels attribute of SQLFORM( ) - in other > words: > > appadmin.py > insert( ) > SQLFORM(.

[web2py] Re: plugin_wiki: KeyError: 'active'

2011-03-10 Thread villas
On Mar 10, 3:06 pm, Massimo Di Pierro wrote: > This was fixed yesterday night. Don't you still need to add 'is_active' to the model 'plugin_wiki_page' ??

[web2py] Re: Suggested functionality extention for SQLTABLE

2011-03-10 Thread Massimo Di Pierro
Can you please email this to me as a patch? diff original modified > sqltable.patch On Mar 10, 9:47 am, Andrew Buchan wrote: > Hello, > > I wasn't happy with two things about SQLTABLE : > > A) How you are obliged to show the id field if you want linkto > functionality. Not only do I not always

[web2py] Re: Is a UNION query possible with DAL ?

2011-03-10 Thread Massimo Di Pierro
Not yet. Will look into it. On Mar 10, 9:28 am, Norbert Klamann wrote: > I look for something like > >  select a,b,c from table1 > union > select a,b,c from table2 > > I also tried to combine 2 distinct 'Rows' objects and dal.Sets (with the > same structure) , but both don't support this operatio

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread Eduardo
OK, let's try SQLFORM.factory without diverting from my original purpose: if I use SQLFORM.factory to generate the form, should I use the following to make the inserts? form = SQLFORM.factory() # Field( )s go here if form.accepts(request.vars): db.table.insert(**db.table._filter_fields(for

[web2py] Re: Performing database inserts with FORM( )

2011-03-10 Thread Anthony
On Thursday, March 10, 2011 11:23:43 AM UTC-5, Eduardo wrote: > > OK, let's try SQLFORM.factory without diverting from my original > purpose: if I use SQLFORM.factory to generate the form, should I use > the following to make the inserts? > > form = SQLFORM.factory() # Field( )s go here >

Re: [web2py] Re: Show in select list a field of another table

2011-03-10 Thread Richard Vézina
No he wants also to make a cross table requires or represent... I am working on something for him... I almost finish, I would like criticism when I post my solution... Richard On Thu, Mar 10, 2011 at 11:14 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > You need to change the order

[web2py] howto publish own podcast with web2py?

2011-03-10 Thread plavcik
Hello, I'm creating own podcast and like to publish relevant feed in web2py. Could you point me to some examples (regular RSS feed for example), which can be good starting point? Thank you, Jiri

[web2py] Re: Is a UNION query possible with DAL ?

2011-03-10 Thread Massimo Di Pierro
can you open a ticket on google code about this? On Mar 10, 9:28 am, Norbert Klamann wrote: > I look for something like > >  select a,b,c from table1 > union > select a,b,c from table2 > > I also tried to combine 2 distinct 'Rows' objects and dal.Sets (with the > same structure) , but both don't

[web2py] Re: javascript/jquery advice

2011-03-10 Thread Anthony
For grid stuff, also check out Bruno's excellent PowerTable plugin: http://powertable.blouweb.com/ https://bitbucket.org/rochacbruno/powertable On Thursday, March 10, 2011 9:29:31 AM UTC-5, spyker wrote: > I am starting to learn javascript and am thinking of using more jquery and > jquery UI

[web2py] Re: encoding problem

2011-03-10 Thread Eduardo
I edited appadmin.py via Notepad++ configured to save as UTF-8 (the file itself already begins with # -*- coding: utf-8 -*-). Exactly the same way I typed the Portuguese characters on appadmin.html (which are displayed correctly). Note that appadmin.py isn't displayed correctly through the framew

[web2py] Re: Dotcloud hosting great tutorial but stuck

2011-03-10 Thread pbreit
For dot cloud you need to be using the web2py source code, not the Mac download. You should be able to type "ls -al" in any terminal window. If not, you have big problems. That's ELL ESS space dash A ELL

[web2py] list and loop problem

2011-03-10 Thread Rick
Hi, I want to print a linked list and add a "delete this item" button next to each item: [item 1][delete this item] [item 2][delete this item] [item 3][delete this item] ...but I've no clue how to write the code. The problem is to direct the second delete button to the se

Re: [web2py] Show in select list a field of another table

2011-03-10 Thread Richard Vézina
For this purpose I do a view at database level, but you can do it in web2py and use it in your requires or represent. Here is my solution : ## Model ## db.define_table('company', Field('name', readable=False)) db.define_table('person', Field('person_id','id'), Field('first_name',rea

[web2py] Re: howto publish own podcast with web2py?

2011-03-10 Thread DenesL
Have you seen this section in the manual? http://web2py.com/book/default/chapter/09#RSS On Mar 10, 10:52 am, plavcik wrote: > Hello, > > I'm creating own podcast and like to publish relevant feed in web2py. > Could you point me to some examples (regular RSS feed for example), > which can be goo

Re: [web2py] Lacking nginx deployment guide

2011-03-10 Thread pbreit
Probably good to have nginx instructions since that seems to be the fashionabl web server right now. I'm a bit annoyed by Cherokee's lack of reliable file-based configuration as well as it's lame new marketplace.

Re: [web2py] list and loop problem

2011-03-10 Thread Bruno Rocha
where do you want to output this? in to pure HTML or in a SQLTABLE? 2011/3/10 Rick > Hi, > > I want to print a linked list and add a "delete this item" button next > to each item: > > [item 1][delete this item] > [item 2][delete this item] > [item 3][delete this item] > ***

Re: [web2py] Show in select list a field of another table

2011-03-10 Thread Norbert Klamann
Hello Richard, many thanks for your work. When I think about it : The table 'person_company' could be a view, couldn't it ? But i have not understood : a) how to define a view in DAL ? b) How to use it as the 'label' Parameter for the IS_IN_DB Validator. If this would be possible the redundant

[web2py] Re: Is a UNION query possible with DAL ?

2011-03-10 Thread Norbert Klamann
For the time being the following seems(!) to work: I want to show the socument with a direct relation to a company and those documents, which belong to a person, which belongs to the company company_id is the key. r1=db((db.document.person==db.person.id) & (db.person.company == company_id

[web2py] Re: list and loop problem

2011-03-10 Thread Rick
I'd like to print the list in a html file. On Mar 10, 6:16 pm, Bruno Rocha wrote: > where do you want to output this? > > in to pure HTML or in a SQLTABLE? > > 2011/3/10 Rick > > > > > > > > > Hi, > > > I want to print a linked list and add a "delete this item" button next > > to each item: > >

[web2py] Re: problem with type Int

2011-03-10 Thread LightOfMooN
Full function is too complex. But this little shows the problem well: value=request.vars.myvar t = type(value) value = float(value) t2 = type(value) value = int(value) t3 = type(value) print value, t, t2, t3 result: 99,,, Why it makes int from 99? On 10 мар, 16:50, villa

Re: [web2py] Attempting to view error in application causes an error in the admin application

2011-03-10 Thread Ross Peoples
Massimo created a new revision (1693) in the trunk about an hour ago that reverts the changes to template.py temporarily until it gets fixed. Thanks.

Re: [web2py] Re: problem with type Int

2011-03-10 Thread Jonathan Lundell
On Mar 10, 2011, at 9:36 AM, LightOfMooN wrote: > > Full function is too complex. > But this little shows the problem well: > > value=request.vars.myvar > t = type(value) > value = float(value) > t2 = type(value) > value = int(value) > t3 = type(value) > print value, t, t2, t3 > > result: >

[web2py] Re: encoding problem

2011-03-10 Thread Eduardo
Alright, neither opening in NotePad and resaving with different encodings nor copying from one editor to another worked. Opening on NotePad++, however, and copying/pasting to a new file on the same editor, then saving as UTF-8 solved the problem. Eduardo On 10 mar, 13:23, Massimo Di Pierro wrot

Re: [web2py] Lacking nginx deployment guide

2011-03-10 Thread Norbert Klamann
However, don't you have to run nginx behind apache or another server? No, ngingx is a fine fromtend

[web2py] Re: Problem with unicode data in mssql

2011-03-10 Thread Ross Peoples
I noticed that you use mssql2:// in there. I don't know if it will help, or make things worse, but try just mssql:// instead of mssql2://, as that adapter is still in development and is not yet supposed to be backwards compatible. I have to use MSSQL2000 for an application I'm developing, and t

Re: [web2py] Show in select list a field of another table

2011-03-10 Thread Richard Vézina
Ok, a) I don't think DAL has SQL view... If someone can correct me on this affirmation... b) Label is a way to give different name to a field... It is not useful for what you expect. You want to use the value of record instead of it id as a representation of this record into a dropbox (requires)

[web2py] Re: javascript/jquery advice

2011-03-10 Thread Ross Peoples
I tried using DataTables a year or two ago for a project, but I ended up needing to use jqgrid because with DataTables, you had to load all of your table entries into the HTML at once. When you have 30 items or so, this isn't a big deal, but I had to deal with about 10,000 records, so loading a

Re: [web2py] Re: Dotcloud hosting great tutorial but stuck

2011-03-10 Thread ron_m
Type in the terminal window echo $PATH upper lower case is important. It should have /bin between colon characters somewhere or try /bin/ls as a command. Either you PATH environment is messed up or some important command files are missing from the /bin directory.

Re: [web2py] Re: javascript/jquery advice

2011-03-10 Thread Richard Vézina
There is server-side processing available with DataTables... But PowerTables is not implementing it. >From Datatables doc and forum, no server-side processing is needed below 5000 rows after it is suggested to pass to server-side processing. I found that the initialisation of datatables could imp

[web2py] make validator accept empty fields

2011-03-10 Thread Eduardo
Hello, I need to validate a field as e-mail but I also would like to accept it if it is left empty; the following: db.table.field.requires = IS_EMAIL(error_message=T('Not a valid e-mail address!')) flashes the error message for invalid e-mail when the field is left empty. How can I fix that? T

Re: [web2py] Show in select list a field of another table

2011-03-10 Thread Richard Vézina
On Thu, Mar 10, 2011 at 12:55 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Ok, > > a) I don't think DAL has SQL view... If someone can correct me on this > affirmation... > > b) Label is a way to give different name to a field... It is not useful for > what you expect. You want to us

Re: [web2py] Lacking nginx deployment guide

2011-03-10 Thread pbreit
OK, good to know. I think I might try it out. If so, I'll publish my fabfile.

Re: [web2py] problem with type Int

2011-03-10 Thread Martín Mulone
Better use: if isinstance(value, int): instead of if type(value)==int: 2011/3/9 LightOfMooN > value=request.vars.myvar > > try: >value = int(value) > except: >pass > > if type(value)==int: >insert() > > it rises > (current transaction is aborted, > commands ignored until end

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Richard Vézina
Thanks to share Bruno Richard On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha wrote: > Head JS script loader > > With Head JS your scripts load like images - completely separated from the > page rendering process. The page is ready sooner. Always. This is guaranteed > even with a single combined J

Re: [web2py] Re: ('active') when running plugin_wiki

2011-03-10 Thread mat --
It works now. Thanks! On Thu, Mar 10, 2011 at 6:10 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > fixed now > > On Mar 9, 8:15 pm, villas wrote: > > Yes, plugin_wiki is broken because the field active was deleted. I > > already reported this and I hope Massimo will fix it soon. > >

[web2py] How to validate/notify this simple form with db

2011-03-10 Thread Jamboo
http://www.pastie.org/1656418 I have a form, and when I fill out the fields required, it gets pushed to the db no problem. The issue is that I want it to have a notification where if a field is empty it makes that red rectangle appear to alert the user to fill in the field properly. I thought ho

[web2py] Re: make validator accept empty fields

2011-03-10 Thread DenesL
...requires=IS_EMPTY_OR(IS_EMAIL(...)) See http://web2py.com/book/default/chapter/07#Validators On Mar 10, 1:21 pm, Eduardo wrote: > Hello, > > I need to validate a field as e-mail but I also would like to accept > it if it is left empty; the following: > > db.table.field.requires = IS_EMAIL(e

[web2py] Re: list and loop problem

2011-03-10 Thread Rick
I meant that I'd like to print on a html _page_. On Mar 10, 6:34 pm, Rick wrote: > I'd like to print the list in a html file. > > On Mar 10, 6:16 pm, Bruno Rocha wrote: > > > > > > > > > where do you want to output this? > > > in to pure HTML or in a SQLTABLE? > > > 2011/3/10 Rick > > > > Hi, >

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Martín Mulone
Very interesting 2011/3/10 Richard Vézina > Thanks to share Bruno > > Richard > > > On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha wrote: > >> Head JS script loader >> >> With Head JS your scripts load like images - completely separated from the >> page rendering process. The page is ready sooner

[web2py] Re: How to validate/notify this simple form with db

2011-03-10 Thread DenesL
You are not using the form generated by SQLFORM in your view, which has the code to show the errors. To fix, in the controller: return dict(form=form) and in the view just have: {{=form}} On Mar 10, 12:47 pm, Jamboo wrote: > http://www.pastie.org/1656418 > > I have a form, and when I fi

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread contatogilson...@gmail.com
That's what I was looking for! _ *Gilson Filho* *Web Developer http://gilsondev.com* 2011/3/10 Martín Mulone > Very interesting > > 2011/3/10 Richard Vézina > > Thanks to share Bruno >> >> Richard >> >> >> On Wed, Mar 9, 2011 at 9:09 PM, Bruno Rocha

[web2py] Legacy PostgreSQL Database using case sensitive table and field names

2011-03-10 Thread Ross Peoples
I have a legacy PostgreSQL database that has its tables and field names created using a case-sensitive means. Whenever I try to do a select(), it returns no rows, and an insert() fails. This is the error that web2py gives: ProgrammingError: relation "globalsettings_id_seq" does not exist LINE 1:

[web2py] Re: list and loop problem

2011-03-10 Thread DenesL
You can create two actions, one to show the items and the other one to delete them one by one via request.args[0]: # list of items with delete link def show_items(): rr=db(db.item.id>0).select() return dict(items=TABLE(*[ ( TD(r.name), TD(A('delete this item',_href=URL(c=request.contr

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Martín Mulone
I'm thinking... this can be go very well with web2py. For example this come to my mind... in web2py response.scripts.insert(0,URL('static','js/jquery.js')) response.scripts.insert(1,URL('static','js/calendar.js')) render as head.js("/path/to/jquery.js", "/path/to/calendar.js"); in web2py resp

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread contatogilson...@gmail.com
Very good! _ *Gilson Filho* *Web Developer http://gilsondev.com*

[web2py] Re: problem with type Int

2011-03-10 Thread LightOfMooN
the same result.. so my validate for value is: isinstance(value, int) and -2147483649 wrote: > Better use: > > if isinstance(value, int): > > instead of > > if type(value)==int: > > 2011/3/9 LightOfMooN > > > > > > > > > > > value=request.vars.myvar > > > try: > >    value = int(value) > > except

Re: [web2py] Legacy PostgreSQL Database using case sensitive table and field names

2011-03-10 Thread Richard Vézina
remove the " from web2py model and add the sequence name that postgres create by default with a different name then web2py expect like this : db.define_table('GlobalSettings', Field('settingName', length=255, unique=True), Field('settingValue', 'text'), Field('settingID', 'id'), se

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread Bruno Rocha
That is exactly what I am trying do to here... 2011/3/10 Martín Mulone > I'm thinking... this can be go very well with web2py. > > For example this come to my mind... > > in web2py > response.scripts.insert(0,URL('static','js/jquery.js')) > response.scripts.insert(1,URL('static','js/calendar.js'

[web2py] Re: Lacking nginx deployment guide

2011-03-10 Thread minux
I have used nginx + fcgi for php (before moving to php5-fmp, which is more robust), however, I really lack technical talent to implement the same for web2py, given the nginx.conf that you kindly shared. So I would be grateful if you write up a complete guide, when you have time. Cheers I would l

Re: [web2py] [tip] Head JS script loader

2011-03-10 Thread mikech
Thanks great find!

[web2py] Why doesnt this code snippet from the web2py book work

2011-03-10 Thread Pystar
tried this snippet of code from the web2py book, but it doesnt work the way I feel it should def display_manual_form(): form = SQLFORM(db.person) if form.accepts(request.vars, formname='test'): response.flash = 'form accepted' elif form.errors: response.flash = 'form has err

  1   2   >