[web2py] Re: cannot access web2py.com today

2014-06-26 Thread Oli
is web2py.com down today? Am Freitag, 20. Juni 2014 10:17:22 UTC+2 schrieb Niphlod: nope, it's up http://www.downforeveryoneorjustme.com/web2py.com On Friday, June 20, 2014 9:12:50 AM UTC+2, Oli wrote: is web2py.con down today? -- Resources: - http://web2py.com -

[web2py] Re: cannot access web2py.com today

2014-06-26 Thread Niphlod
no, it's up. check the link. On Thursday, June 26, 2014 8:06:23 AM UTC+2, Oli wrote: is web2py.com down today? Am Freitag, 20. Juni 2014 10:17:22 UTC+2 schrieb Niphlod: nope, it's up http://www.downforeveryoneorjustme.com/web2py.com On Friday, June 20, 2014 9:12:50 AM UTC+2, Oli wrote:

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-26 Thread Niphlod
@guys..if you queue a task inside models, you're queuing a new task at every request ! ;-D On Thursday, June 26, 2014 6:17:54 AM UTC+2, 黄祥 wrote: i've already tried, but got the same result + another strange output during start web2py. here is the detail step i took. 1. create new

[web2py] Re: cannot access web2py.com today

2014-06-26 Thread Simon Ashley
Finding it flaky as well. Probably AWS playing up again. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are

[web2py] Can't seem to verify password field...

2014-06-26 Thread Jason (spot) Brower
I can't seem to get my key to verify: This is how I verify it: success = db.melodigram.deletion_key.validate(request.args(1)) == (db(db.melodigram.unique_id == request.args(0)).select().first(), None) And this is how it is made: form = SQLFORM(db.melodigram) form.process(session = None,

[web2py] Error while inserting in table with custom id

2014-06-26 Thread at
Hello, I am getting getting this: class 'psycopg2.OperationalError'(lastval is not yet defined in this session ) while running: if db(db.user_role).isempty(): db.user_role.insert(id=1, title='Application Administrator') db.user_role.insert(id=2, title='Account Administrator')

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-26 Thread 黄祥
a, i c, so that's why scheduler_task table is have a lot of record. thank you so much simone. btw, what i want to learn in here is to have a scheduler to create a new record in database every day, how can i achieve it using testing example above? what i have tried is : *models/db.py*

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-26 Thread Niphlod
you're missing a BG point. Either you need to queue a task as a result of some user action (i.e. send a reminder, calculate/aggregate/refresh some data, etc) -- usually it's a one-time-only activity, in which case, the following pattern applies #models\scheduler.py from gluon.scheduler

[web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread Niphlod
was the table created by web2py ? On Thursday, June 26, 2014 9:53:31 AM UTC+2, at wrote: Hello, I am getting getting this: class 'psycopg2.OperationalError'(lastval is not yet defined in this session ) while running: if db(db.user_role).isempty(): db.user_role.insert(id=1,

[web2py] Re: web2py compilation order

2014-06-26 Thread Tim Richardson
Is this expected behaviour? It is even documented :) Look around here: http://www.web2py.com/books/default/chapter/29/04/the-core?search=conditional -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread at
Yes On Thursday, 26 June 2014 14:55:35 UTC+5, Niphlod wrote: was the table created by web2py ? On Thursday, June 26, 2014 9:53:31 AM UTC+2, at wrote: Hello, I am getting getting this: class 'psycopg2.OperationalError'(lastval is not yet defined in this session ) while running: if

[web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread Simon Ashley
Believe it will be failing with the id=1 etc. Interfering with the primary key/ auto increment. Try it without. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report

Re: [web2py] Re: my super heroic idea of the next scheduler

2014-06-26 Thread António Ramos
web2py.py -a yourpassword -K appname -X does not work on windows i have web2py 2.9.5 and does not start scheduler at the same time as web2py 2014-06-06 9:07 GMT+01:00 Niphlod niph...@gmail.com: the scheduler doesn't need a decorator... for your own organization you can,e.g., put all the

[web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread at
Yes you are right. Without id=1 it's working. But if I insert data using postgres/psql with id=1, it doesn't give any error. Regards, AT On Thursday, 26 June 2014 15:39:20 UTC+5, Simon Ashley wrote: Believe it will be failing with the id=1 etc. Interfering with the primary key/ auto

[web2py] Re: Can't seem to verify password field...

2014-06-26 Thread Cliff Kachinske
Check the data types of element 0 in the tuples. On Thursday, June 26, 2014 3:37:22 AM UTC-4, Encompass solutions wrote: I can't seem to get my key to verify: This is how I verify it: success = db.melodigram.deletion_key.validate(request.args(1)) == (db(db.melodigram.unique_id ==

Re: [web2py] how to turn off the record counter on Sqlform.grid

2014-06-26 Thread Javier Pepe
I'm use this code: form = SQLFORM.grid() form.element('.web2py_counter',replace=None) On Thu, Jun 26, 2014 at 2:04 AM, JorgeH jorgeh...@gmail.com wrote: hello Is it possible to turn off the record counter , on the top right of the table generated by sqlform.frid ?? -- Resources: -

[web2py] Re: multiple functions in one view

2014-06-26 Thread Richard
Hi, I try to do exactly the same and have the following in my app: controller: def index(): response.js = '$.web2py.component(%s, target=graph1);' % URL('default', 'graph1.load') index.html: div id=graph1 style=width: 400px; height: 400px; margin: 0 auto /div graph1.load

[web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread at
So it's incorrect or impermissible to add records with custom ids? Thanks On Thursday, 26 June 2014 16:33:02 UTC+5, at wrote: Yes you are right. Without id=1 it's working. But if I insert data using postgres/psql with id=1, it doesn't give any error as well. Regards, AT On Thursday,

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-26 Thread 黄祥
yeah, i realize that something i'm lacked off, unfortunately, i don't know where is it. tried again using your code but still no luck started from scratch *models\db_wizard_0.py* db.define_table('asdf', Field('asdf'), auth.signature ) *models\scheduler.py* from gluon.scheduler import

Re: [web2py] how to turn off the record counter on Sqlform.grid

2014-06-26 Thread JorgeH
Thanks! On Thursday, June 26, 2014 7:31:28 AM UTC-5, Javier Pepe wrote: I'm use this code: form = SQLFORM.grid() form.element('.web2py_counter',replace=None) On Thu, Jun 26, 2014 at 2:04 AM, JorgeH jorg...@gmail.com javascript: wrote: hello Is it possible to turn off the record

[web2py] How to manage repeated fields/attributes using form.custom.widget.fieldname?

2014-06-26 Thread Omar Meat Boy Gutiérrez
I have three tables (country, state, and town) each one has a field called name: db.define_table('country' Field('name', 'string'), ... more fields ... ) db.define_table('state' Field('name', 'string'), Field('country_id',

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-26 Thread Niphlod
ok. steps. web2py.py -a yourpassword go to /appname/test/queue_task go to /appname/appadmin/select/db?query=db.scheduler_task.id0 if nothing is there, then in controller test.py the function queue_task is not queuing the task. if a single row is there, then, open a terminal and start the

[web2py] Re: Does SQLFORM.grid editable=True require an explicit db.commit()?

2014-06-26 Thread JoeCodeswell
Thanks, Niphlod. I got it working with a custom search widget. BTW, the original post got a bit garbled when i edited it. Sorry about that. Thanks again, Niphlod. Love and peace, Joe On Saturday, June 21, 2014 11:46:04 AM UTC-7, Niphlod wrote: try simplifying the controller stripping the

[web2py] Re: how to use gluon Expose

2014-06-26 Thread Jim Karsten
I was experimenting with Expose this week and I came across similar problems. For example, if I click on a subfolder link, the page refreshes but still displays the contents of the base folder. After some digging, I think I found the problem. The code in Expose uses request.raw_args to

[web2py] Re: web2py scheduler period and repeats result not expected

2014-06-26 Thread 黄祥
yes, followed your step, i understood the logic flow of the web2py scheduler and made it work, thank you so much, simone for the pointers. just wondering, the precision for second is not exact on created_on, tested using period = 5 and period = 60 here is the steps i took : *cmd* cd

Re: [web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread Greg Sier
Seems to be a postgresql specific issue. Fails in the DAL at when executing 'select lastval()'. SQlite and MySQL are fine. The command also fails at the pg command line level. This was changed back in December but uncertain if the issue existed prior to this

Re: [web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread Michele Comitini
id is implicit and defined as serial, implying that there is a sequence that is used to fill proper values. id is intended to be unique and primary key: an integer generator that guarantee uniqueness or at least has a very low probability of conflict is the standard way to go. This is very

Re: [web2py] Re: Error while inserting in table with custom id

2014-06-26 Thread Simon Ashley
I tend to agree with this. We ended up dropping the id field from bulk_insert routines and if we need integrity (for references) in the target databases, we would/ should base it on other fields. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Group or/and Field

2014-06-26 Thread Massimo Di Pierro
The group information is loaded on login and cached in the session. If you check auth.user_groups you find a dictionary of {group_id:group_role}. On Wednesday, 25 June 2014 13:08:17 UTC-5, Carlos Zenteno wrote: I am classifying my users within groups (ie, carpenters group) but I am

[web2py] Re: combining two queries on different table (one reference the other) - newbie db

2014-06-26 Thread Massimo Di Pierro
This is very wrong: q1 = eval('db. userLanguage.'+ language )== True what is it supposed to be? q1 = db.userLanguage[language] == True I am not sure. Once q1 is correct, this works: results = db(q1 q2).select() On Wednesday, 25 June 2014 17:04:28 UTC-5, Riccardo C wrote: Dear all,

[web2py] SQLFORM cannot save to database

2014-06-26 Thread hajere
Pls can someone help here. Am new to web2py. I produce a form using SQLFORM with a submit button. After filling the form and clicking submit, i discoverd the values in the form are not saved into the database. I login using the appadmin, i could create and insert into the database. I will

[web2py] Database query using exclude or Does not contain

2014-06-26 Thread Douglas Campbell
Hello, I am trying to filter out specific values in an SQLFORM.grid but I can not figure out how to do this in the Query. Right now I have something like: (cd.value.contains(filter_value_inc, all=False)) And this gets the values that I want to be included. filter_value_inc holds a

[web2py] SQLFORM.grid woes

2014-06-26 Thread hvjunk
Hi there, Yes I'm new to wep2py *and* to Python (other than having edited some Gentoo ebuilds many summers ago), but it was the advice for the simplest web framework to create simple input/edit functionality for a database to have customer details captured in a closed environment (ie. only

[web2py] Error : unable to open database file

2014-06-26 Thread Sandeep Kumar
Hi, I am getting this strange error one in 10 times in my app. The error is class 'sqlite3.OperationalError' unable to open database file. I am getting this error after i replaced the *databases* folder with one from my backup app which is running on a different server. I think the

[web2py] Debug Web2py with Wing IDE

2014-06-26 Thread Omri Levy
Hi , I asked Wing support the following question: I am using Web2py framework. I saw a video that says the Wing can debug a running python code no matter if it launched it itself. When reading this: http://wingware.com/doc/howtos/web2py I see that I can only debug Web2py in a way that I need

[web2py] Re: Undesired redirect to other page after submitting a form

2014-06-26 Thread Tom Clerckx
Sorry being persistent on this, but has somebody any idea why the observed behavior is in place? Best regards, Tom. On Thursday, June 19, 2014 9:46:06 AM UTC+2, Tom Clerckx wrote: Hi, I have some undesired behavior in my app that I was able to resolve, but I would like to understand what

[web2py] Access auth.signature from different database

2014-06-26 Thread Bilal Hasan
I have this code here in a different model file called db_nameofapp.py: dmz.define_table('nds_ticketing_comments', Field(blah), Field(blah2), Field(blah3), auth.signature ) DAL breaks when trying to access auth.signature. in my db.py: auth = Auth(db) ... ... .. etc. Sorry I can't copy and

[web2py] Inserting to database after submit

2014-06-26 Thread hajere
Hello, I am new to web2py. I am running this application , my form was produced using SQLFORM. I noticed after i click submit the data don't get inserted into the database. However if go through the admin and do new record my database get updated. I dont know if I will have to do commit or

[web2py] Re: web2py password encryption/decryption

2014-06-26 Thread farmy zdrowia
Massimo, Your code hash password, but it is not recognized by Joomla. :) Anyway I have got this class in py from phpass fremwork web page. It works! Now CUSTOMIZE CRYPT is the last effort. hash_password and check_password shell be used. import os import time import hashlib import crypt

[web2py] Unclear how to create a unique multiple fields on web2py

2014-06-26 Thread Daniel Lafrance
Hi gang I am quite new to web2py and i am confronted to the following lack of my own knowledge. In other DB engine one can write : create table sometable ( a_field varchar(10), b_field timestamp default date(now()), unique(a_field, b_field) ); wich I have reproduce in web2py using

[web2py] Re: A way to trigger method on update?

2014-06-26 Thread Omri Levy
Thank you! :) On Thursday, June 26, 2014 12:25:00 AM UTC+3, 黄祥 wrote: afaik, compute didn't work on update. for onupdate, is execute on form level not on dal, please take a look at book chapter about that. ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators best

[web2py] Re: Hypermedia API and Collection+JSON in web2py

2014-06-26 Thread Massimo Di Pierro
No. At least not in the way web2py uses it. On Wednesday, 25 June 2014 11:58:01 UTC-5, Cliff Kachinske wrote: Massimo, I like the way your thoughts are headed. doesn't the many2many issue goes away if one uses, for example, MongoDB? On Sunday, June 22, 2014 4:45:06 PM UTC-4, Massimo Di