[web2py] Re: session[id]

2013-01-03 Thread Annet
Massimo, Thanks for your reply. It is not clear to me what you are storing in session. I have a table 'node' and tables which reference this table by 'nodeID'. Nodes have accounts, depending on the kind of account their web site has menu items linking to web pages. All these pages extend a

Re: [web2py] Re: web2py and redis queue

2013-01-03 Thread Niphlod
good then, I'll wait for it and will help with tests, if you want. On Wednesday, January 2, 2013 11:34:20 PM UTC+1, rochacbruno wrote: yes, but for me it is not a problem since all my functions lives in modules. But, I have one solution for this problem, I created a plugin_rq.py which is

[web2py] different form of registration based on

2013-01-03 Thread yashar
i have two different set of users to register, employees and employers. their common fields are , username, email, active, password but the rest of the fields are different, how should i create register form for each one? is this possible to do something like this somewhere in registration

[web2py] Re: SQLFORM widget support for wider range of input types

2013-01-03 Thread Alan Etkin
El domingo, 30 de diciembre de 2012 18:18:12 UTC-3, Massimo Di Pierro escribió: Seems like a good idea. What do other think? If the difference is only in the type, could we simply override the value of type using a class variable and use the widget method of the base class I belive the

[web2py] db.xx.insert not working inside scheduler

2013-01-03 Thread António Ramos
Hello i have this inside my function that is called by the scheduler task import timedate myfunc(): ... now=datetime.datetime.now() db.log.insert(desc='some test',data=now) ... but the record is not inserted in the database why? --

Re: [web2py] Interesting - Brython (python to javascript)

2013-01-03 Thread Arnon Marcus
The JavaScript generated, is very far from idiomatic... I wouldn't envy the poor guy who would have to debug this... The description doesn't even talk about the many problems of JavaScript, and says nothing about the shortcomings of foreign language traspilation. In short, a very amature looking

Re: [web2py] Re: register user agreement. How to?

2013-01-03 Thread António Ramos
hello i have Field('confirm_agreement', 'boolean',default=False, requires=IS_NOT_EMPTY(error_message=Por favor aceite o acordo de utilização),label=A('Acordo de utilização', _href=URL('acordo'))) in my A helper i cannot add another paramenter like in bootstrap for example data-content=testing

[web2py] Re: GAE + Cloud SQL: Tickets

2013-01-03 Thread Felipe Meirelles
Massimo, just figured it out: Using App Engine + Lazy Tables results on _get_table() in restricted.py line 77 returning None as the tablename all the times. So I tried to set lazy_tables = False, then the table is found, but when table.insert(ticket_id=ticket_id,

[web2py] Re: db.xx.insert not working inside scheduler

2013-01-03 Thread Leonel Câmara
You're missing a: db.commit() --

[web2py] Re: GAE + Cloud SQL: Tickets

2013-01-03 Thread Felipe Meirelles
Just added a self.db.commit() after the insert command, and it worked as spected, but the load() function cant retrieve the ticket data... I've tried to inspect the select stmt with _select(), but it dosent returns the SQL. Any ideas? On Thursday, January 3, 2013 11:07:04 AM UTC-2, Felipe

[web2py] Re: GAE + Cloud SQL: Tickets

2013-01-03 Thread Felipe Meirelles
Actualy, it is displaying the SQL as: select [gluon.dal.Field object at 0x126F9290, gluon.dal.Field object at 0x126F9170, gluon.dal.Field object at 0x126F9190, gluon.dal.Field object at 0x126F9210] where Query [(ticket_id =

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Arnon Marcus
An example of something you NEED phpPGadmin/PgAdminIII is multi-field uniqueness: Lets say you have a table, with 3 fields - first-name, a last-name and email. You want a uniqueness to be enforced in the database, for the combination of first and last name. I don't know of a way to do this

[web2py] Re: GAE + Cloud SQL: Tickets

2013-01-03 Thread Felipe Meirelles
Well, the problem is when the ticket is saved, self.db points to DAL uri=google:sql://**:novello-solutionworkshop:novello-solutionworkshop/novello_test but when load() is called, it points to DAL uri=gae. Where the admin application DAL is defined? On Thursday, January 3, 2013 11:47:38 AM

Re: [web2py] Re: db.xx.insert not working inside scheduler

2013-01-03 Thread António Ramos
Ok solved 2013/1/3 Leonel Câmara leonelcam...@gmail.com You're missing a: db.commit() -- --

Re: [web2py] Re: register user agreement. How to?

2013-01-03 Thread Anthony
A('Acordo de utilização', _href=URL('acordo'), **{'_data-content': 'testing' }) This is explained at the end of this sectionhttp://web2py.com/books/default/chapter/29/05#HTML-helpersof the book. Anthony On Thursday, January 3, 2013 7:51:06 AM UTC-5, Ramos wrote: hello i have

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Richard Vézina
See below answer... On Sun, Dec 30, 2012 at 3:55 PM, Arnon Marcus a.m.mar...@gmail.com wrote: 10x for the info. Is there any benefit for using the server vs. the desktop flavor? About pgAdmin, I don't really understand what you mean. We have been using posgreSQL with web2py in production

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Richard Vézina
See below On Thu, Jan 3, 2013 at 9:10 AM, Arnon Marcus a.m.mar...@gmail.com wrote: An example of something you NEED phpPGadmin/PgAdminIII is multi-field uniqueness: Lets say you have a table, with 3 fields - first-name, a last-name and email. You want a uniqueness to be enforced in the

Re: [web2py] Re: register user agreement. How to?

2013-01-03 Thread Niphlod
this is somewhat the 15th time it comes up. Do we have to start a FAQ somewhere or simply pin a thread named if you have problems with data-attributes and web2py's templates ? Any other ideas to make this concept stick in old (and new) users brains :-P ? On Thursday, January 3, 2013

[web2py] error when logging in using site domain

2013-01-03 Thread dr_eeves
Hi, I have been developing a web application using web2py. Most of the development has been done using the included development text editor (which has been great to use!). I'm required to use https when using the Administrative interface through my hosting provider. I get around this for now

[web2py] Import models data to modules

2013-01-03 Thread Daniel Correia
Hello! I have some variables in models which I'd like to import to the modules. How to do it? --

Re: [web2py] Import models data to modules

2013-01-03 Thread Bruno Rocha
in models: myvar = 1 from gluon import current current.myvar = myvar On a module from gluon import current print current.myvar On Thu, Jan 3, 2013 at 10:54 AM, Daniel Correia danielcr...@gmail.comwrote: Hello! I have some variables in models which I'd like to import to the modules. How

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Richard Vézina
I will be out of the office for the next two weeks, so it may be possible that answer to next questions will be delayed... Richard On Thu, Jan 3, 2013 at 10:29 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: See below On Thu, Jan 3, 2013 at 9:10 AM, Arnon Marcus a.m.mar...@gmail.com

[web2py] Re: session[id]

2013-01-03 Thread Derek
It seems to me that you are storing data in the session which should actually be linked to the auth_user table. On Thursday, January 3, 2013 1:39:10 AM UTC-7, Annet wrote: Massimo, Thanks for your reply. It is not clear to me what you are storing in session. I have a table 'node' and

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Richard Vézina
I just try my script with ubuntu 12.10 server and it seems to work just as well with it. When I come back I will update the script, name and description. Richard On Thu, Jan 3, 2013 at 11:53 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: I will be out of the office for the next two

Re: [web2py] Import models data to modules

2013-01-03 Thread Daniel Correia
Thanks for replying! It works! On Thursday, 3 January 2013 15:58:54 UTC, rochacbruno wrote: in models: myvar = 1 from gluon import current current.myvar = myvar On a module from gluon import current print current.myvar On Thu, Jan 3, 2013 at 10:54 AM, Daniel Correia

[web2py] web2py application cookbook - reporting recipe

2013-01-03 Thread António Ramos
hello i was reading the book and using the code for the label/badge generation i got an error on *speaker_badges.py* Traceback (most recent call last): File C:\web2pyGit\web2py\gluon\restricted.py, line 212, in restricted exec ccode in environment File

[web2py] any publications or sites on Using SQL in Web2py

2013-01-03 Thread Paul Rykiel
Hello, Are there any reference guides to build SQL statements in Web2py? --

[web2py] Re: any publications or sites on Using SQL in Web2py

2013-01-03 Thread Jim S
There is a section in the book on it... http://web2py.com/books/default/chapter/29/06#Raw-SQL -Jim On Thursday, January 3, 2013 2:14:05 PM UTC-6, Paul Rykiel wrote: Hello, Are there any reference guides to build SQL statements in Web2py? --

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Arnon Marcus
Also, hosting a staging/prod server on your own dev computer is kind of use less you will run 2 VMs at the same time on the same machine (one for the prod/staging VM and one for your Dev machine), and you will get in trouble with memory soon. If you don't have a really prod server, for example

[web2py] Re: any publications or sites on Using SQL in Web2py

2013-01-03 Thread Paul Rykiel
I must of missed this ...thank you! I think this will do the trick. I hate writing SQL in general, but as long as I know what to do I am good to go. Thanks, On Thursday, January 3, 2013 2:22:06 PM UTC-6, Jim S wrote: There is a section in the book on it...

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Arnon Marcus
And you are rigth that is not really supported with DAL, but you can use your imagination... You could use db.table.field.compute to compute a new concatenated column formed from you 3 field and create a validator for this column that enforce uniqueness of this field petty easy isn't it?? I

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-03 Thread Richard Vézina
I may don't understand... But I think it just a matter of DNS configuration, you just need to set a local domain name to your machine pointing on their IP address and then configure these VM as well, /etc/hostname (

[web2py] Re: any publications or sites on Using SQL in Web2py

2013-01-03 Thread Anthony
Note, if you want help generating some SQL that you will then tweak, you can use the DAL's _select(), _insert(), _update(), and _delete() methods -- all of which generate and return the relevant SQL without actually executing it. Anthony On Thursday, January 3, 2013 3:39:30 PM UTC-5, Paul

[web2py] Re: Returning a token for Android app authentication

2013-01-03 Thread Mark Li
I reviewed your code again and looked into the source code for web2py to see how web2py deals with session login cookies. For what I want to accomplish, I believe I have found a method which does not involved changing web2py source code. It's simpler and more straight forward for me to wrap my

[web2py] Re: html in session.flash?

2013-01-03 Thread JimK
Since this became pertinent to my needs recently, I made the following change to web2py.js (currently line 42) to only close the flash message when clicking on the x (span): before: doc.on('click', '.flash', function(e){var t=jQuery(this); if(t.css('top')=='0px') t.slideUp('slow'); else

[web2py] Uploading images

2013-01-03 Thread Wonton
Hello! I'm trying to implement uploading user's avatar. I've tried to follow the image blog example from the book and some of the posts related to this issue in this forum and I'm still a bit confused and I don't know if I could do certain things or how to do them. What I would like to

[web2py] Re: different form of registration based on

2013-01-03 Thread Massimo Di Pierro
I suggest you have one table for the common field and then two reference tables, one for each type of user, with the additional fields. Else you can put both sets of fields in the same auth_user table and use them conditionally. It may seem like a waste of space but you gain in performance and

[web2py] Re: GAE + Cloud SQL: Tickets

2013-01-03 Thread Massimo Di Pierro
I am not sure I understand the context here. Why do you have two dal uri? What load function? On Thursday, 3 January 2013 08:31:45 UTC-6, Felipe Meirelles wrote: Well, the problem is when the ticket is saved, self.db points to DAL

Re: [web2py] Import models data to modules

2013-01-03 Thread Massimo Di Pierro
Yes but in model from gluon import current print current.myvar # never use correct at top-levet On Thursday, 3 January 2013 09:58:54 UTC-6, rochacbruno wrote: in models: myvar = 1 from gluon import current current.myvar = myvar On a module from gluon import current print

[web2py] Re: web2py application cookbook - reporting recipe

2013-01-03 Thread Massimo Di Pierro
Open a ticket about this. We can fix add a copy method to the row object. On Thursday, 3 January 2013 12:15:18 UTC-6, Ramos wrote: hello i was reading the book and using the code for the label/badge generation i got an error on *speaker_badges.py* Traceback (most recent call last):

[web2py] Re: different form of registration based on

2013-01-03 Thread yashar
thanks, i think that i should use auth.register.on_success and auth.register.on_validation methods for your first advice. --

Re: [web2py] Re: web2py application cookbook - reporting recipe

2013-01-03 Thread António Ramos
http://code.google.com/p/web2py/issues/detail?id=1255 2013/1/3 Massimo Di Pierro massimo.dipie...@gmail.com Open a ticket about this. We can fix add a copy method to the row object. On Thursday, 3 January 2013 12:15:18 UTC-6, Ramos wrote: hello i was reading the book and using the code

Re: [web2py] Update codemirror to V3 on admin

2013-01-03 Thread Mariano Reingart
On Thu, Jan 3, 2013 at 5:54 AM, Roberto Perdomo roberto...@gmail.com wrote: Hi, I have changed the edit.html from admin to get work codemirror 3. In some changes, I include closetag.js to autocomplete html tags and works fine. Please check if all works fine and consider the update. PS:

[web2py] Re: import numpy and scipy slows function return

2013-01-03 Thread Pearu Peterson
Hi, I am just another user experiencing exactly the same problem: importing scipy is so slow that so far I have gotten only 504-Gateway Timeout errors at the scipy import statements. In my case scipy is imported from a python module under application modules directory. Both `import

[web2py] Re: nothing happens after custom form submission

2013-01-03 Thread howesc
i don't see a {{=form.custom.begin}} in your view. this is required to output the hidden fields that web2py uses to validate the form submission. On Wednesday, January 2, 2013 8:03:47 AM UTC-8, ajith c t wrote: This is my form and controller function. My problem is nothing happens

[web2py] Re: import numpy and scipy slows function return --- possible solution

2013-01-03 Thread Pearu Peterson
Problem solved! From a hint in http://mail.scipy.org/pipermail/scipy-user/2011-November/031014.html I added the following line WSGIApplicationGroup %{GLOBAL} to apache2/conf/httpd.conf file, restarted apache, and now scipy.optimize import is as fast as from a command line. HTH, Pearu On

[web2py] Re: nothing happens after custom form submission

2013-01-03 Thread Anthony
form.custom.end is what includes the hidden fields, and that has been included in the code. Anthony On Thursday, January 3, 2013 6:59:20 PM UTC-5, howesc wrote: i don't see a {{=form.custom.begin}} in your view. this is required to output the hidden fields that web2py uses to validate the

Re: [web2py] Update codemirror to V3 on admin

2013-01-03 Thread Roberto Perdomo
2013/1/3 Mariano Reingart reing...@gmail.com On Thu, Jan 3, 2013 at 5:54 AM, Roberto Perdomo roberto...@gmail.com wrote: Hi, I have changed the edit.html from admin to get work codemirror 3. In some changes, I include closetag.js to autocomplete html tags and works fine. Please

[web2py] error in mysql ?

2013-01-03 Thread samuel bonilla
this is the error class '_mysql_exceptions.IntegrityError' (1452, 'Cannot add or update a child row: a foreign key constraint fails (`samuel$otra`.`article_category`, CONSTRAINT `article_category_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `article_category` (`id`) ON DELETE CASCADE)') help

Re: [web2py] How to restrict choices in an OPTIONS widget based on values in that row or the default value

2013-01-03 Thread Calvin
Thanks Vinicius. I adopted your suggestion, although I really like the idea of defining all the widgets at the model level and this approach does not conform to it. If say the constraint on continent was made on another table and selected prior to this form, i.e. we know what it is before the

[web2py] Re: Uploading images

2013-01-03 Thread Massimo Di Pierro
You can do row.update(avatar=db.tablename.avatar.store(request.post_vars['upload_field' ])) by why bypess form.process()? it does it for you. On Thursday, 3 January 2013 15:57:24 UTC-6, Wonton wrote: Hello! I'm trying to implement uploading user's avatar. I've tried to follow the image

Re: [web2py] Update codemirror to V3 on admin

2013-01-03 Thread Massimo Di Pierro
I'd be happy to incude this when the debugger issue is fixed. Can you and Mariano work together to fix this problem? On Thursday, 3 January 2013 19:01:48 UTC-6, Roberto Perdomo wrote: 2013/1/3 Mariano Reingart rein...@gmail.com javascript: On Thu, Jan 3, 2013 at 5:54 AM, Roberto Perdomo

[web2py] Re: error in mysql ?

2013-01-03 Thread Massimo Di Pierro
What is the cause that causes this? On Thursday, 3 January 2013 19:30:53 UTC-6, samuel bonilla wrote: this is the error class '_mysql_exceptions.IntegrityError' (1452, 'Cannot add or update a child row: a foreign key constraint fails (`samuel$otra`.`article_category`, CONSTRAINT

[web2py] Re: Returning a token for Android app authentication

2013-01-03 Thread dlypka
But are you reconnecting to the same web2py session on each request? On Thursday, January 3, 2013 3:20:01 PM UTC-6, Mark Li wrote: I reviewed your code again and looked into the source code for web2py to see how web2py deals with session login cookies. For what I want to accomplish, I

Re: [web2py] Re: Returning a token for Android app authentication

2013-01-03 Thread Alec Taylor
On Fri, Jan 4, 2013 at 2:57 PM, dlypka dly...@gmail.com wrote: But are you reconnecting to the same web2py session on each request? That's how OAuth Providers work (for the most part) Would be good if we could create an OAuth Provider in web2py though… On Thursday, January 3, 2013 3:20:01

[web2py] Re: error when logging in using site domain

2013-01-03 Thread howesc
i suspect that it is really a data problem that was somehow masked by the access method. what that error means is that there is a record that references an auth_group record with id of 1 - but that record does not exist. i would suggest you either re-create the group with ID of 1 or find all

[web2py] Re: insert image from filesystem into database on GAE

2013-01-03 Thread howesc
i don't think that GAE allows you to just read a file like that. can we first verify that GAE opens and reads data from the file? i assume this is for setting up some test data? you may have to embed the image data into your python code or do a URL fetch to get the image from a remote

[web2py] Re: Uploading images

2013-01-03 Thread Wonton
Hello Massimo! I bypass the form.proccess because this is a web service used by an iOS app. I do all frontend stuff in iOS and call this web service from the device. And regarding to change the name of the file, is it possible? kind regards! El viernes, 4 de enero de 2013 04:11:16 UTC+1,

Re: [web2py] Update codemirror to V3 on admin

2013-01-03 Thread Roberto Perdomo
Is a good idea, i see that Mariano edited the file ajax_editor.js, is a great idea integrate this to mi changes. Mariano, I open a ticket: http://code.google.com/p/web2py/issues/detail?id=1256 I fix the highlight, the search, replace and matchbrackets. 2013/1/3 Massimo Di Pierro

[web2py] REF: Change order of fields in a form??!

2013-01-03 Thread Teddy Nyambe
How do you change the order of the form after it has been created using: form = SQLFORM(db.table) Also how do you change the font of the web2py editor??? -- ... Teddy Lubasi Nyambe Opensource Zambia Lusaka,