[web2py] Re: Select table in drop down import the file and edit

2013-07-01 Thread Anthony
Your code includes: web2py_component("{{=URL('default', 'form.load')}}" + "/" + jQuery(this).val(), target='form') That will issue an ajax request. I was asking what URL ends up getting requested by the browser. Anthony On Thursday, June 27, 2013 1:12:00 AM UTC-4, Rohitraj Sharma wrote:

[web2py] Re: FDB (firebird) adapter can't store blobs greater than 64k

2013-07-01 Thread Niphlod
Bummer, than it's probably a problem within the driver itself... need to debug it or wait that someone picks it and see what's going on. Il giorno martedì 2 luglio 2013 00:55:43 UTC+2, Raul Monares ha scritto: > > I'm using python fdb 1.4. The field is defined as blob sub_type 0, because > I'm s

[web2py] Re: Select table in drop down import the file and edit

2013-07-01 Thread Rohitraj Sharma
Hi Anthony Can you tell me one thing is that possible or not. I have one csv file which contain user details. When i will import that file, First it will show in HTML table. After editing the csv content. i will click on save then it will upload in auth table. Thanks On Wednesday, 26 Jun

Re: [web2py] Re: PG8000 QueryParameterParseError: '%:' not supported in quoted string

2013-07-01 Thread Mariano Reingart
Thanks for reporting this, I could not reproduce the issue previously, but with this new sample query it will be easier to take a look again and try to fix it. Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Tue, Jul 2, 2013 at 1:14 AM, KMax wrot

[web2py] Re: PG8000 QueryParameterParseError: '%:' not supported in quoted string

2013-07-01 Thread KMax
Seems like an know issue: https://code.google.com/p/pg8000/issues/detail?id=7 -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegrou

Re: [web2py] Re: Database row update problem !

2013-07-01 Thread Anthony
You left out some critical code from the original question -- your Javascript sends each post request twice: function send_data(id){ $.post("{{=URL('contest','flip_contest_status')}}", {id: id} ); $.post("{{=URL('contest','flip_contest_status')}}", {id: id} ) .done

Re: [web2py] Re: Database row update problem !

2013-07-01 Thread Ahmad Faiyaz
here is the database definition: db.define_table('contest', Field('name', length=128 ), Field('contest_host', length=128,), Field('duration', 'time' ), Field('time_passed','time', default = 0), Field('rank_frozen','time', default = 0), Field('running',length= 10, readable=False, default = "no"), F

Re: [web2py] Re: Database row update problem !

2013-07-01 Thread Anthony
Can you show the code you are now using and describe the workflow of how the record gets updated and how you are then attempting to view the updated record? Anthony On Monday, July 1, 2013 8:37:32 PM UTC-4, Ahmad Faiyaz wrote: > weird things happening, when i check the db table with appadmin,

[web2py] Query with count not returning value with zeros

2013-07-01 Thread Francisco
Hi everyone. I'm trying to show how many logins every user has done in the last 7 days in a view. I have the following query: log_count=db.auth_event.id.count() usrs = db((db.auth_user.hidden==False)&(db.auth_event.user_id==db.auth_user.id)&(db.auth_event.time_stampdatetime_end)&(db.auth_event.

Re: [web2py] Re: Database row update problem !

2013-07-01 Thread Ahmad Faiyaz
weird things happening, when i check the db table with appadmin, it shows for contest.running = yes [ updated the value with sqlform.grid ] , but when i fetch the row with DAL on app, it shows contest.running = no [ which is the default ] why ? On Tue, Jul 2, 2013 at 6:18 AM, Ahmad Faiyaz wrote:

[web2py] How to set permissions for db table loaded from flat file

2013-07-01 Thread Jordan Ladora
Hi, >From a file, I'm loading a table that I would like to make accessible to any logged in user.. Here's the model- db.define_table('man', Field('fieldname1', requires=IS_NOT_EMPTY(), label="fieldname1"), Field('fieldname2', requires=IS_NOT_EMPTY(), label="fieldname2"), Field('id1

Re: [web2py] Re: Database row update problem !

2013-07-01 Thread Ahmad Faiyaz
thanks, but it sometimes work, sometimes doesn't !! what can be the problem ! On Tue, Jul 2, 2013 at 5:34 AM, Alex wrote: > from the documentation: > update_record should not be confused with > >>> row.update(name='Curt') > because for a single row, the method update updates the row object but n

[web2py] Re: Database row update problem !

2013-07-01 Thread Alex
from the documentation: update_record should not be confused with >>> row.update(name='Curt') because for a single row, the method update updates the row object but not the database record, as in the case of update_record so you should use update_record instead. or even better: db(db.contest.id =

[web2py] Re: FDB (firebird) adapter can't store blobs greater than 64k

2013-07-01 Thread Raul Monares
I'm using python fdb 1.4. The field is defined as blob sub_type 0, because I'm storing PDF's On Monday, July 1, 2013 1:23:42 PM UTC-6, Niphlod wrote: > > what driver are you using ? DAL creates 'blob' fields as BLOB SUB_TYPE > 1 can you please check that the field is created indeed as BLOB

[web2py] Database row update problem !

2013-07-01 Thread Ahmad Faiyaz
Hello, i am trying to update a row on a db table, but it is not updating, what is the problem ? my db table definition: db.define_table('contest', Field('name', length=128 ), Field('contest_host', length=128,), Field('duration', 'time' ), Field('time_passed','time', default = 0), Field('rank_f

[web2py] Re: response.files.append in component plugin

2013-07-01 Thread Niphlod
I pointed it out just because modernizer "may be already in your toolbelt". https://github.com/web2py/web2py/blob/master/applications/welcome/views/layout.html#L40 If you excluded it specifically then feel free to reinvent the wheel. On Monday, July 1, 2013 10:38:40 PM UTC+2, RHC wrote: > > Than

[web2py] Re: response.files.append in component plugin

2013-07-01 Thread RHC
Thanks for pointing out that the script won't get cached. I'd better sort that out :-) I didn't know about that modernizr feature, useful to know how it works and what it's for, but that is for another time I think. I will probably skip the modernizr stuff in this component, I use jquery all th

[web2py] Re: Query nested mongodb json object

2013-07-01 Thread Alan Etkin
> > Ok, so if I would do it easily I should use directly pymongo, also because > looking at the current DAL seems that the mongoDBadapter doesn't support > raw queries. I think that your query is a bit specific for a DAL feature. Also, It appears that NoSQL adapters do not support raw queries

[web2py] Re: Query nested mongodb json object

2013-07-01 Thread Giovanni Barillari
Ok, so if I would do it easily I should use directly pymongo, also because looking at the current DAL seems that the mongoDBadapter doesn't support raw queries. But, anyway, if I would achieve the same result with DAL, what would be a way to do it? Use of computed fields, use of virtual fields,

[web2py] Re: Web2py uploads and downloads

2013-07-01 Thread Niphlod
If you don't want use DAL facilities to handle uploads, then you must do it in pure python. The whole point for a framework is to behave consistently, use security best practices and give all of us a "best way" to follow, but that doesn't mean that web2py has "limits". If you don't want to store

[web2py] Re: FDB (firebird) adapter can't store blobs greater than 64k

2013-07-01 Thread Niphlod
what driver are you using ? DAL creates 'blob' fields as BLOB TYPE 1 can you please check that the field is created indeed as BLOB TYPE 1 watching your databases/sql.log file ? This is an excerpt from firebird documentation *Sub-type is 1.** * *This blob field sub-type is designed for the

[web2py] Re: Query nested mongodb json object

2013-07-01 Thread Niphlod
I'd say by hand writing the mongodb specific query, but I didn't follow closely the mongodb adapter implementation to say it for sure. AFAIK, using DAL you can only order,filter,etc etc by a field specified in your models. What instead you're trying to do is to filter/order by a value that is s

[web2py] Query nested mongodb json object

2013-07-01 Thread Giovanni Barillari
Hi all, I've encountered a problem developing a web app with web2py, and would like some suggestions on how to handle it. I'm using web2py (one of the latest trunk versions) with MongoDB, and I have a table with a json field: Field("myfield", "json") which would store a dict() from my app with

[web2py] memcache bug

2013-07-01 Thread Aurelio Tinio
Hi all, I've been trying to use memcache as a session store using the deployment recipe found here: http://web2py.com/books/default/chapter/29/13#Sessions-in-memcache All seemed to work fine, however upon further inspection it looks as though the number of current connections kept growing asym

[web2py] FDB (firebird) adapter can't store blobs greater than 64k

2013-07-01 Thread Raul Monares
When trying to store a value greater than 64k in a Blob Field, I get this error: ('Error while preparing SQL statement:\n- SQLCODE: -104\n- Dynamic SQL Error\n- SQL error code = -104\n- Unexpected end of command - line 1, column 25', -104, 335544569) But with blobs smaller than 64k works fine.

[web2py] Re: Strange character encoding after login into administrative interface

2013-07-01 Thread Alan Etkin
> > We replaced codemirror 2 with codemirror 3.13. Can you check with previous > versions? > My browser is Firefox 21 With 2.6.0-development+timestamp.2013.06.30.09.18.36 mytext="$" when opened for edtion, is replaced by mytext = "htmlDefaultquot; While using 2.3.2 (2012-12-17 15:03:30) sta

[web2py] Re: getting the name/value of a submit button

2013-07-01 Thread Jim Gregory
Thanks for that useful information, Anthony. I ended up creating a hidden variable in the form and setting the value of the variable when the button is clicked, i.e., FORM( INPUT(_type='submit', _value='button1', _onclick='document.form1.hiddenvar='button1';), INPUT(_type='submit', _value

[web2py] Re: PG8000 QueryParameterParseError: '%:' not supported in quoted string

2013-07-01 Thread Isaac Dontje Lindell
Well, I haven't really figured out why this is happening, but I did find a workaround that works for me: I replaced act like '%%:correct' with position('correct' in act) > 0) This works because I'm simply trying to find if the act value contains 'correct'. I'd still love to know why my origi

[web2py] PG8000 QueryParameterParseError: '%:' not supported in quoted string

2013-07-01 Thread Isaac Dontje Lindell
I'm trying to run this query using db.executesql(). I'm doing the string substitution (with the variable 'sid') before passing the query to executesql(), although I've also tried just passing the tuple (sid, sid) as the 'placeholders=' param to executesql, with the same results. I can run this

[web2py] Re: getting the name/value of a submit button

2013-07-01 Thread Anthony
Ajax form submissions use the jQuery .serialize() method, triggered by the form submit event. The .serialize() method doesn't know how the form was submitted, so it does not have information about any button clicks (and therefore the name of the button that was clicked). You can search online f

[web2py] Re: Combining where clauses in DAL

2013-07-01 Thread lesssugar
Thanks very much. On Monday, July 1, 2013 4:51:18 PM UTC+2, Anthony wrote: > > This is covered in the book: > http://web2py.com/books/default/chapter/29/06#Logical-operators. > > Note, you deleted your earlier post, but the problem there wasn't adding > WHERE clauses -- it was a failure to speci

[web2py] Re: Combining where clauses in DAL

2013-07-01 Thread Anthony
This is covered in the book: http://web2py.com/books/default/chapter/29/06#Logical-operators. Note, you deleted your earlier post, but the problem there wasn't adding WHERE clauses -- it was a failure to specify an inner joinwhere you n

[web2py] Re: Why change underline to hyphen in url patterns of parse_as_rest()?

2013-07-01 Thread Ray (a.k.a. Iceberg)
On Monday, July 1, 2013 7:30:51 PM UTC+8, Ray (a.k.a. Iceberg) wrote: > > Hi folks, > > I just noticed that, the auto patterns generated by dal.py's > parse_as_rest() are using hyphen to replace underline. This way if I have: > > db.define_table("my_table", > Field("my_field"), >

[web2py] Combining where clauses in DAL

2013-07-01 Thread lesssugar
1. What's the proper way to use [AND, OR] in DAL's where clauses? Do I use [and / &&], [or / ||] ? 2. Does using commas is the equivalent of AND? Like in: row = db(db.table.field_1 == X, db.table.field_2 == Y, db.table.field_3 == Z ).select() -- --- You received this message because you ar

[web2py] Re: getting the name/value of a submit button

2013-07-01 Thread Jim Gregory
Yes, the form is a component. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.g

[web2py] Re: getting the name/value of a submit button

2013-07-01 Thread Anthony
Is the form being submitted via ajax (e.g., in a component)? On Monday, July 1, 2013 10:09:41 AM UTC-4, Jim Gregory wrote: > > I created a form with two submit buttons (INPUT(_type ='submit', _name > ='name1', _value ='value 1') etc) , each with a different name and value so > that, when the for

[web2py] getting the name/value of a submit button

2013-07-01 Thread Jim Gregory
I created a form with two submit buttons (INPUT(_type ='submit', _name ='name1', _value ='value 1') etc) , each with a different name and value so that, when the form is submitted, a different subroutine is called in the controller based on which submit button was pressed. However, the name of

[web2py] Re: Combining WHERE clauses in DAL

2013-07-01 Thread lesssugar
Suddenly, after another test registration, "&" works fine. Not sure what's changed... Anyway, should I use "&" or "and" to combine the clauses? On Monday, July 1, 2013 3:41:51 PM UTC+2, lesssugar wrote: > > Quick question: what's the proper way to combine *where *clauses in DAL? > > 1. When I use

[web2py] Combining WHERE clauses in DAL

2013-07-01 Thread lesssugar
Quick question: what's the proper way to combine *where *clauses in DAL? 1. When I use "&", I get doubled select results: db((db.auth_user.registration_key == 'pending') & (db.auth_membership.group_id == 2)).select(db.auth_user.id, db.auth_user.email) I get 3, examp...@example.com 3, examp...@

[web2py] Why change underline to hyphen in url patterns of parse_as_rest()?

2013-07-01 Thread Ray (a.k.a. Iceberg)
Hi folks, I just noticed that, the auto patterns generated by dal.py's parse_as_rest() are using hyphen to replace underline. This way if I have: db.define_table("my_table", Field("my_field"), ) it will show up in auto patterns as a url like "http://.../my-table/my-field";.

[web2py] Re: Strange character encoding after login into administrative interface

2013-07-01 Thread LightDot
I just noticed the same thing yesterday, also using recent trunk (2.6.0-development+timestamp.2013.06.27.07.20.48). If I enter this: REGEX = re.compile('^(\w+).(\w+).(\w+)\=\=(\d+)$') it gets saved properly. But when opened to be edited again, it changes into: REGEX = re.compile('^(\w+).(\w+).

[web2py] Re: Web2py uploads and downloads

2013-07-01 Thread Domagoj Kovač
Is there any way that i can control this generated filename? For example my filenames can be some sort of hash from current timestamp. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emai

[web2py] Re: Web2py uploads and downloads

2013-07-01 Thread LightDot
It's explained in the book: http://web2py.com/books/default/chapter/29/07#SQLFORM-and-uploads Basically, the random looking part is the original file name, b16encoded. The "entry", "entry_label" is taken from your database structure. Regards, Ales On Monday, July 1, 2013 12:16:33 PM UTC+2, Dom

[web2py] Re: Web2py uploads and downloads

2013-07-01 Thread Domagoj Kovač
Yes. i am running windows. Can anyone explain how web2py creates does filenames? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@google

[web2py] Re: Web2py uploads and downloads

2013-07-01 Thread LightDot
Looks like you're on Windows? Complete path length on Windows is 260 characters max if I remember correctly (including C:\\development...). Regards, Ales On Monday, July 1, 2013 11:38:07 AM UTC+2, Domagoj Kovač wrote: > > I also noticed one more thing, looks like web2py brakes when i try to > u

[web2py] Re: Web2py uploads and downloads

2013-07-01 Thread Domagoj Kovač
I also noticed one more thing, looks like web2py brakes when i try to upload file with extralong filename. If i try to upload a file with name "extra long filename, 123 dsadsa dsadsadsadsa, dsadsadsa3r 342 432432342, 43232.txt" i receive an error: [Errno 2] No such file or directory: 'C:\\deve

[web2py] Re: Strange character encoding after login into administrative interface

2013-07-01 Thread peibol
How? Or are you talking to Alan? El sábado, 29 de junio de 2013 23:56:49 UTC+2, Massimo Di Pierro escribió: > > We replaced codemirror 2 with codemirror 3.13. Can you check with previous > versions? > > On Saturday, 29 June 2013 16:49:31 UTC-5, Alan Etkin wrote: >> >> Just a remark. Notice that

[web2py] Web2py uploads and downloads

2013-07-01 Thread Domagoj Kovač
Hi, I have a problem. I created multiple files upload like this: if "attachments" in request.vars: attachments = request.vars.attachments if type(attachments) is list: for attachment in attachments: Attachment.

Re: [web2py] pyCharm has web2py support

2013-07-01 Thread Jason (spot) Brower
I suppose that is something you can request for pyCharm. :) On Sun, Jun 30, 2013 at 12:49 PM, Quint wrote: > Will this also support web2py in combination with GAE? > so when i have a GAE project with web2py, will pycharm be web2py "aware" > too? Or does this only work if i create a web2py proje