[web2py] Re: DAL error connecting to MySql

2014-09-24 Thread Derek
answered on stackoverflow in 2012 http://stackoverflow.com/questions/10181344/mysql-exceptions-operationalerror-1045-access-denied-for-user-rootlocalh On Monday, September 15, 2014 9:39:42 AM UTC-7, José Manuel Bordallo wrote: > > Hi all, yesterday just actualized my Ubuntu 14.04 and i get this

[web2py] Re: Web Editor Blank Screen

2014-09-24 Thread Leonel Câmara
How did you upgrade web2py? Is the nginx's user the same as the files in the web2py folder? -- 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

[web2py] Re: Version 2.9.6 indeed breaks backward compat for some users

2014-09-24 Thread Derek
ah, I see. I always use the case insensitive code page, which is probably why I never had such an issue. On Tuesday, September 23, 2014 2:13:15 PM UTC-7, Niphlod wrote: > > sorry for being not that deeply explicit in the previous post. > > contains() on list:something is case-insensitive. > I

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Anthony
On Wednesday, September 24, 2014 3:32:00 PM UTC-4, Niphlod wrote: > > Ok, good points, but I'd be careful to support something (this or anything > else) for a reason resembling "it's not prohibited, it worked --> needs to > be stable". Bugs can be found, lack of documentation too, it's not said

Re: [web2py] Re: Web Editor Blank Screen

2014-09-24 Thread Trevor Strauss
Hear you, not saying it is but it could be since I made no nginx changes only an upgrade of web2py...So there must be something that's changed with the way web2py interacts with nginx.

Re: [web2py] Re: Web Editor Blank Screen

2014-09-24 Thread James Ryan
Trevor, Perhaps a file ownership issue rather than permissions? James. On Sep 25, 2014 5:06 AM, "Niphlod" wrote: > if locally it works and behind nginx it doesn't, it doesn't seem like > something web2py dependant ... > > On Wednesday, September 24, 2014 9:00:05 PM UTC+2, Trevor Strauss wrote:

[web2py] Re: foreign key constraint failed

2014-09-24 Thread Leonel Câmara
Seems like a botched migration to me. Can you tell me what changes you made to your model, and a sample of the data you had there before? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Niphlod
Ok, good points, but I'd be careful to support something (this or anything else) for a reason resembling "it's not prohibited, it worked --> needs to be stable". Bugs can be found, lack of documentation too, it's not said that something built on a "bug" or a shortcoming of the code should be su

Re: [web2py] foreign key constraint failed

2014-09-24 Thread Fabiano Almeida
If your table definitions are right, try delete database and run your app again... 2014-09-22 18:01 GMT-03:00 Anna Kostikova : > Hi everyone, > > I am having an issue when editing content of one of the tables in my > database. When I try to edit a record in the table I have an error message > " f

[web2py] Re: SQLFORM.factory fails to save to database, id is null

2014-09-24 Thread Anthony
As the book shows, you should use: db.table.insert(**db.table._filter_fields(form.vars)) Anthony On Tuesday, September 23, 2014 5:10:48 AM UTC-4, Andy Joel wrote: > > I have a very simple form processing page in my controller: > > def new(): > form = SQLFORM.factory( > Field('f_name'

Re: [web2py] SQLFORM.factory fails to save to database, id is null

2014-09-24 Thread Fabiano Almeida
try: db.table.insert(f_name=form.vars.f_name) 2014-09-23 6:10 GMT-03:00 Andy Joel : > I have a very simple form processing page in my controller: > > def new(): > form = SQLFORM.factory( > Field('f_name', label='Your name', requires=IS_NOT_EMPTY()), > ) > if form.process(

Re: [web2py] Re: Default time for datetime picker widget

2014-09-24 Thread Niphlod
let's break it down a bit. It's one thing to have a field "prefilled" with a default value and it's a totally different one to have a field empty by default but when you click on it it "presets" the time to 00:00. The former needs a Field(, default=something), the latter, given that the

[web2py] Re: IIS help with permissions

2014-09-24 Thread Niphlod
access denied you're still having permission problems. On Wednesday, September 24, 2014 2:43:26 PM UTC+2, Tim Richardson wrote: > > OK. the GUI management tool make a new application pool by default if > creating a new site. I deleted that and I'm using the default application > pool. I am

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Anthony
> By definition virtual Fields are something that closely follow the > functionality of computed fields, but have the "feature" (I wouldn't dare > to say "added benefit") to be calculated at each time, and not stored in > the db. > First, there are readonly forms -- no reason not to include v

[web2py] Re: lxml - cannot import etree

2014-09-24 Thread Niphlod
sources aren't enough lxml needs to be built, it's not a pure python module. -- 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 messag

[web2py] Re: Update with a string as the key

2014-09-24 Thread Niphlod
you need to pass a "mapping" to the update() method. so, something like this mapping = {field_name : value} ...update(**mapping) On Wednesday, September 24, 2014 5:10:33 PM UTC+2, Andy Joel wrote: > > I want a method to update the database record behind a model, and I > thought something like t

[web2py] Re: Update with a string as the key

2014-09-24 Thread Leonel Câmara
This would solve your error. class MyModel: def db_update(self, field_name, value): self.db(self.db.t_empire.id==self.record.id ).update(**{field_name:value}) However since you have the record in self.record. You can just do. def update(self, field_name, value): self.rec

[web2py] Re: Unable to connect to MSSQL via web2py - SSL Security Error

2014-09-24 Thread Niphlod
I know I'm asking a strange thing, but are you using web2py binaries or source code ? If you're using binaries, can you please stop web2py, go into the root, rename secure32.dll to secure32.dll.old and then try again ? On Wednesday, September 24, 2014 5:52:43 PM UTC+2, Alen Cerovic wrote: > > is

Re: [web2py] Re: Web Editor Blank Screen

2014-09-24 Thread Niphlod
if locally it works and behind nginx it doesn't, it doesn't seem like something web2py dependant ... On Wednesday, September 24, 2014 9:00:05 PM UTC+2, Trevor Strauss wrote: > > Permissions are all the same, any other thoughts? > > On Thu, Sep 18, 2014 at 8:31 AM, Niphlod > > wrote: > >> permi

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Niphlod
once again, 2 months later I didn't even know of an extra_fields argument to SQLFORM. To be fair, though, I always though about virtual fields as something you need to show, not something you need to fill. By definition virtual Fields are something that closely follow the functionality of

[web2py] SQLFORM.factory fails to save to database, id is null

2014-09-24 Thread Andy Joel
I have a very simple form processing page in my controller: def new(): form = SQLFORM.factory( Field('f_name', label='Your name', requires=IS_NOT_EMPTY()), ) if form.process().accepted: db.table.insert(**form.vars) response.flash = 'form accepted' elif f

[web2py] foreign key constraint failed

2014-09-24 Thread Anna Kostikova
Hi everyone, I am having an issue when editing content of one of the tables in my database. When I try to edit a record in the table I have an error message " foreign key constraint failed". The bizarre thing is that it doesn't matter which column I am trying to edit (via appadmin control pane

[web2py] Re: Web2Py + OAuth2 Server

2014-09-24 Thread Richard Prosser
Massimo, If an OAuth2 server is viable, would it also support the "Two-Legged" authentication case? That is, I need to use OAuth2 to support a mobile app user logging in to a server and maintaining a long-term session, where both are produced by the same company (my employer). Please note tha

Re: [web2py] Re: Web Editor Blank Screen

2014-09-24 Thread Trevor Strauss
Permissions are all the same, any other thoughts? On Thu, Sep 18, 2014 at 8:31 AM, Niphlod wrote: > permissions ?! > > > On Tuesday, September 16, 2014 11:50:52 PM UTC+2, Trevor Strauss wrote: >> >> I'm having the as James upgraded from 2.8.2 to 2.9.9(11) now ...editor >> works fine on local dev

[web2py] Re: Unable to connect to MSSQL via web2py - SSL Security Error

2014-09-24 Thread Alen Cerovic
is there resolution to this? I am having similar errors, tried on diferent computer with another sql server same problems *db = DAL('mssql://sa:password@127.0.0.1\InstanceName/DbName')* Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SSL Security error (18) (SQLDriverConne

[web2py] Re: Changes to web2py.js - a bug(?) and request

2014-09-24 Thread Ide
Massimo, I have opened two tickets (#1986 and #1987) as these are two separate issues. I guess I should have done this first, but I hadn't looked at the issues list before. Thanks., Ide. On Saturday, September 20, 2014 7:00:31 PM UTC+1, Massimo Di Pierro wrote: > > Please open a ticket about

[web2py] Update with a string as the key

2014-09-24 Thread Andy Joel
I want a method to update the database record behind a model, and I thought something like this might work. class MyModel: def db_update(self, field_name, value): self.db(self.db.t_empire.id==self.record.id).update(field_name=value) Apparently not. The field_name cannot be a string.

[web2py] form validation with conditional jquery fields

2014-09-24 Thread Pedro
I am using jquery to display a dropdown if a boolean field is not selected. Example below. The form does not pass validation as written. How do I make the validation conditional? thank you fields.append(Field('f_all_user', type='boolean', label=T('Send to All users'), default=True)) fields.a

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Leonel Câmara
I think the bug here is that Table.__iter__ doesn't return the same thing as the first positions on the tuples coming from Table.items this is a very odd and unexpected behavior. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: lxml - cannot import etree

2014-09-24 Thread lyn2py
Yes you are right Leonel, I just found this: http://lxml.de/2.1/build.html it needs to be compiled first. Thank you! On Wednesday, September 24, 2014 11:07:57 PM UTC+8, Leonel Câmara wrote: > > Did you compile lxml? I'm also not sure non pure Python modules work in > the app modules folder. >

[web2py] Re: lxml - cannot import etree

2014-09-24 Thread Leonel Câmara
Did you compile lxml? I'm also not sure non pure Python modules work in the app modules folder. -- 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 recei

[web2py] lxml - cannot import etree

2014-09-24 Thread lyn2py
Hello there, I am adding lxml to the modules folder. And ran into error (below). 1. I am using the latest version of web2py from git 2. I used to use lxml this way and it worked (that was 2 years ago) 3. This app was created brand new with the only line added "from lxml import etree

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Anthony
Yes, it looks like previously you could pass the name of a virtual field to the "fields" argument of SQLFORM, but it no longer works (you now have to use extra_fields). I'm not sure why this change was made, but I would say it does break backward compatibility. Anthony On Wednesday, September

[web2py] Re: IIS help with permissions

2014-09-24 Thread Tim Richardson
OK. the GUI management tool make a new application pool by default if creating a new site. I deleted that and I'm using the default application pool. I am now back to where I was: it works until it needs to make new files I tried to "clean" the welcome app from admin and I got a ticket: Traceb

[web2py] Re: SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Leonel Câmara
There's something odd going on but I don't think it's that commit or SQLFORM's fault. Because if I do *list(table)* I don't get the Virtual Fields whereas if I do *table.items()* or iteritems I do. Hence why the grid uses iteritems to show the virtual fields too. -- Resources: - http://web2py.

Re: [web2py] Re: Default time for datetime picker widget

2014-09-24 Thread Luca Liberti
Thank you I tried modifying the model as Field('model_end_time', type='datetime',represent=lambda x, row: 'Active' if x is None else x.strftime("%Y-%m-%d"),default=datetime.datetime.now().replace(hour=0,minute=0,second=0, microsecond=0)) I find that the datetime picker control still defaults to t

[web2py] Re: IIS help with permissions

2014-09-24 Thread Niphlod
you don't need an application pool at all. Those are only for .NET apps. On Wednesday, September 24, 2014 11:16:46 AM UTC+2, Tim Richardson wrote: > > > > Also, the owner of the application folder and the three files are which > are created is > web2py_production, which is the name of the applica

[web2py] Re: Default time for datetime picker widget

2014-09-24 Thread Leonel Câmara
Put it as a placeholder? -- 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 subscribed to the Google Groups "web2p

[web2py] routing to default/join goes wrong

2014-09-24 Thread Robin Manoli
Hey, My router.py is working with other function names, but when I use /app/default/join I not only end up on the wrong place, but even the browser url changes to /app/default/user/profile. *routes_in = ((r'/thisworks', r'/app/default/index'), (r'/verystrange', r'/app/default/join'),

[web2py] Re: IIS help with permissions

2014-09-24 Thread Tim Richardson
Also, the owner of the application folder and the three files are which are created is web2py_production, which is the name of the application pool I created. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] Re: IIS help with permissions

2014-09-24 Thread Tim Richardson
On Wednesday, September 24, 2014 6:07:10 PM UTC+10, Niphlod wrote: > > to rule out other problems, just give all permissions to "everyone" . If > then it works, we'll start from there ^_^ > > On Wednesday, September 24, 2014 4:51:46 AM UTC+2, Tim Richardson wrote: >> >> With IIS 8, I am trying t

[web2py] Re: IIS help with permissions

2014-09-24 Thread Niphlod
to rule out other problems, just give all permissions to "everyone" . If then it works, we'll start from there ^_^ On Wednesday, September 24, 2014 4:51:46 AM UTC+2, Tim Richardson wrote: > > With IIS 8, I am trying to get web2py running with wfastcgi.py v2.1RC2, > web2py 2.9.11, python 2.7 32 b

[web2py] Re: Default time for datetime picker widget

2014-09-24 Thread libertil
Thank you for the answer, I am not sure your suggestion would work in my case. I have a datetime field that potentially can be NULL. In the form the datetime field is represented by default by the datetime picker widget, what I am looking for is a way to let the user select a date and have the t

[web2py] SQLFORM and Virtual fields (2.9.6 - 2.9.11)

2014-09-24 Thread Donatas Burba
Hello, everyone. I have a project running on web2py v2.9.5 and an form where SQLFORM shows defined virtual fields. After trying to migrate to v2.9.6 (even up to 2.9.11), I get error ticket in this form, because (if I correctly understand) virtual fields are no more in table.fields list. After e