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

2011-03-10 Thread Norbert Klamann
""" a) I don't think DAL has SQL view... If someone can correct me on this affirmation... """ I speculate that the query Object comes close, but I do not knwo how to reference it in a validator. """ c) I Think that your table company is not necessary if there is always only one person for one

Re: [web2py] Re: Lacking nginx deployment guide

2011-03-10 Thread Vasile Ermicioi
yes, a guide for nginx + uwsgi will be great

[web2py] Re: Operational Error

2011-03-10 Thread pbreit
I'm not sure the exact problem. Did it show you what line of code caused the error? I would suggest starting over and just putting this at the bottom of db.py (starting at about line 80). This worked OK for me. db.define_table('estudantes', Field('nome'), Field('pais'), Field('nasc

[web2py] Re: web2py in the Pypi

2011-03-10 Thread pbreit
Weird. The version is listed as 1.95.6 when we are only at 1.93.2. Best to get it from here: http://web2py.com/examples/default/download

[web2py] Operational Error

2011-03-10 Thread Eduardo
Hello, I generated a new simple app through "New Simple Application" and then changed its db.py to the following: db = DAL('sqlite://MyDB.sqlite') db.define_table('estudantes', # DADOS PESSOAIS Field('Nome', 'string'), Field('Pais', 'string'), Field('Nascimento', 'date'),

[web2py] web2py in the Pypi

2011-03-10 Thread contatogilson...@gmail.com
The web2py in the Pypi is old. When go to update? Need to help? _ *Gilson Filho* *Web Developer http://gilsondev.com*

[web2py] Re: make validator accept empty fields

2011-03-10 Thread Eduardo
Thank you, DenesL. Eduardo On Mar 10, 4:14 pm, DenesL wrote: > ...requires=IS_EMPTY_OR(IS_EMAIL(...)) > > Seehttp://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

[web2py] Re: How to implement 3rd party authentication on a site with twitter and facebook without going the Janrain route?

2011-03-10 Thread Massimo Di Pierro
Use gluon/contrib/login_methods/extended_login_form.py to have more than one form in one page then you should be able to use gluon/contrib/login_methods/oauth20_account.py gluon/contrib/login_methods/oauth10a_account.py to login with twitter and facebook respectively. Mind that if the same user

[web2py] Re: Groups and Roles using LDAP

2011-03-10 Thread Massimo Di Pierro
to use ldap login with MS Active Directory:: from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth( mode='ad', server='my.domain.controller', base_dn='ou=Users,dc=domain,dc=com')) to use ldap login with Notes Domin

Re: [web2py] Re: greetings from PyCon

2011-03-10 Thread Martín Mulone
Great!. Congratulations! I'm too far from there :( 2011/3/10 Anthony > 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 -- but no one seemed to notice > or

Re: [web2py] How to implement unique click on web2py

2011-03-10 Thread Jonathan Lundell
On Mar 10, 2011, at 3:09 PM, Tito Garrido wrote: > I'm wondering what is the best implementation for a "unique click" counting > in web2py... somehow I need to capture the ip address of the client and store > it on a table, I guess... So I'd like a piece of your knowledge on this :-) The request

[web2py] How to implement 3rd party authentication on a site with twitter and facebook without going the Janrain route?

2011-03-10 Thread Pystar
I would like to know how to implement 3rd party authentication using Twitter and Facebook without going the Janrain route because of certain constraints they have like cost and number of unique users. I would really appreciate if I can be pointed to 3rd party python libraries etc. thanks

[web2py] How to implement unique click on web2py

2011-03-10 Thread Tito Garrido
Hi folks, I'm wondering what is the best implementation for a "unique click" counting in web2py... somehow I need to capture the ip address of the client and store it on a table, I guess... So I'd like a piece of your knowledge on this :-) Thanks! Tito -- Linux User #387870 .

[web2py] Groups and Roles using LDAP

2011-03-10 Thread Ialejandro
Hi! I have this question, how could I use LDAP auth and use roles. So I need to take the users from an active directory (microsoft exchange) and they must have a role. How could I do that?? I need 2 basic roles, Boss, User (boss can create, delete) and have access to every controller in the app, w

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

2011-03-10 Thread pbreit
Where do you see that snippet of code? You've got a few problems. You need to return the form in the dict: def display_manual_form(): form = SQLFORM(db.person) if form.accepts(request.vars, formname='test'): response.flash = 'form accepted' elif form.errors: response.flash

Re: [web2py] Re: problem with type Int

2011-03-10 Thread Jonathan Lundell
On Mar 10, 2011, at 2:18 PM, LightOfMooN wrote: > > because it's not beautiful ;) Well, the field you're using in the database doesn't have a beautiful constraint... > > On 11 мар, 03:16, Jonathan Lundell wrote: >> On Mar 10, 2011, at 11:57 AM, LightOfMooN wrote: >> >> >> >>> the same resu

[web2py] Re: problem with type Int

2011-03-10 Thread LightOfMooN
because it's not beautiful ;) On 11 мар, 03:16, Jonathan Lundell wrote: > On Mar 10, 2011, at 11:57 AM, LightOfMooN wrote: > > > > > the same result.. > > > so my validate for value is: > > isinstance(value, int) and -2147483649 > > It works fine, but... it's not good... > > Why not? You shouldn'

Re: [web2py] Re: problem with type Int

2011-03-10 Thread Jonathan Lundell
On Mar 10, 2011, at 11:57 AM, LightOfMooN wrote: > > the same result.. > > so my validate for value is: > isinstance(value, int) and -2147483649 > It works fine, but... it's not good... Why not? You shouldn't be relying on sizeof(int). > > On 10 мар, 23:32, Martín Mulone wrote: >> Better use

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

2011-03-10 Thread DenesL
The form.accepts in the controller checks the fields using their validators. The error messages you have to handle yourself in your custom form. For an example see: http://web2py.com/book/default/chapter/07#Hide-Errors On Mar 10, 4:33 pm, Pystar wrote: > So how do I design my forms manually an

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

2011-03-10 Thread Pystar
So how do I design my forms manually and still have it display error messages and use validators? On Mar 10, 10:25 pm, DenesL wrote: > Because the code to show those errors is in the form created by > SQLFORM and that form is neither being returned nor displayed in the > view. > > On Mar 10, 4:00

[web2py] Re: Lacking nginx deployment guide

2011-03-10 Thread minux
pbreit, thanks your concise guide http://web2pyslices.com/main/slices/take_slice/110 I could set up cherokee+uwsgi. However, I don't like Windowish attitude that treats users as dumbs (like, "this settings are not meant to be changed by you"...etc) and commercialized self-promoting approach of ch

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

2011-03-10 Thread DenesL
Because the code to show those errors is in the form created by SQLFORM and that form is neither being returned nor displayed in the view. On Mar 10, 4:00 pm, Pystar wrote: > tried this snippet of code from the web2py book, but it doesnt work > the way I feel it should > > def display_manual_for

[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

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

2011-03-10 Thread mikech
Thanks great find!

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

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

[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] [tip] Head JS script loader

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

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

[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

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

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

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

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

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

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. > >

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

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

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.

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

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.

[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

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

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

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

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

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

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

[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: 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: 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: 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: 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(.

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

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

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

[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] javascript/jquery advice

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

[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

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

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

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

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

  1   2   >