[web2py] reading config flat files in from module

2014-04-10 Thread Mark Graves
Hey Everyone, For various reasons, I import some configuration information from files in an application I'm working on (config.json). There are some limitations which are forcing me to take this approach. This configuration information is imported in a web2py module file (config.py) When I

Re: [web2py] Re: unique entry or null validation

2014-04-10 Thread Johann Spies
On 9 April 2014 17:45, Claudio Cocciarelli claudiococciare...@gmail.comwrote: So I have a db.table.field1.requires=IS_EMPTY_OR(IS_NOT_IN_DB(db, 'table.field1')) but I have a problem with this: when inserting a new record it works flawlessly, instead when updating another record field2 in the

[web2py] Re: reading config flat files in from module

2014-04-10 Thread Mark Graves
I ended up fixing my own problem. I had declared some configuration variables directly within the config.py module. I moved the functions that load the config information into a class and instantiate that class, and it all worked. On Thursday, April 10, 2014 1:02:05 AM UTC-5, Mark Graves

[web2py] security issue in the OpenSSL

2014-04-10 Thread Annet
I guess you've been notified as well, in case you haven't ... Yesterday my hosting provider notified me of the following issue: As you have probably heard a serious security issue (dubbed the heartbleed bug) was found in the OpenSSL library yesterday. This is a very serious issue as this

[web2py] Re: bug when starting external cron job in web2py 2.9.5

2014-04-10 Thread Alex
thanks, Massimo. I opened a ticket: http://code.google.com/p/web2py/issues/detail?id=1918 Am Mittwoch, 9. April 2014 23:02:16 UTC+2 schrieb Massimo Di Pierro: Please open a ticket and I will look at this asap. On Tuesday, 8 April 2014 17:39:09 UTC-5, Alex wrote: yes, application is

[web2py] Online Manual: Chapter 9: Access Control - Formatting/content issues?

2014-04-10 Thread Seeker
Hi, Is it just me (and my lack of appropriate knowledge) or is there something wrong with chapter 9 of the book? The text starts off well, but about halfway down the page the formatting seems jumbled and there seems to be some info missing as well. Thanks. -- Resources: - http://web2py.com -

[web2py] Re: Basic Auth with alternate auth method

2014-04-10 Thread at
Hi Damien, Have you got the answer of your question? I was also looking for the similar stuff. Thanks, AT -- 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)

[web2py] Re: Failing importing .py module that imports .c file

2014-04-10 Thread Jaime Sempere
Thanks a lot, Niphlod! I didn't know that about GAE, my excuses. You rock, web2py rocks, and this group rocks :) El miércoles, 9 de abril de 2014 23:12:02 UTC+2, Niphlod escribió: simply put, GAE doesn't allow any python package that includes c extensions. usually, there are alternatives

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread Austin Taylor
Using MySQL and the table definition is just: db.define_table('newtable', Field('Name','string'), Field('Comments', string', length=499)' migrate=False) On Wednesday, April 9, 2014 8:09:19 AM UTC-4, Niphlod wrote: what's the table definition ? what backend are you using ? On

[web2py] Re: Online Manual: Chapter 9: Access Control - Formatting/content issues?

2014-04-10 Thread DenesL
True, everything after 9.1.5 Renaming Auth tables is corrupted. On Thursday, April 10, 2014 5:58:58 AM UTC-4, Seeker wrote: Hi, Is it just me (and my lack of appropriate knowledge) or is there something wrong with chapter 9 of the book? The text starts off well, but about halfway down

[web2py] Change the download text from file to something else?

2014-04-10 Thread António Ramos
hello i want to change the text that appears on downloadable file links I see file but that is nothing informative especially when users dont speak english I want to default it to something else where do i change that behaviour? regards António -- Resources: - http://web2py.com -

[web2py] Custom grid based on user profile -- any cool smartgrid examples welcomed!!

2014-04-10 Thread Austin Taylor
Hello, I'm trying to create a custom grid based on the user who is logged in. In other words something that would allow them to select which columns they'd like to see in the database, have it save to their profile, and then view the grid. Are there any examples on how I could achieve this?

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread 黄祥
perhaps try to set migrat = True, to take effect for your defined table. best regards, stifan -- 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

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread Austin Taylor
I only define the table in my db.py though. I don't see it referenced anywhere else. On Thursday, April 10, 2014 10:46:23 AM UTC-4, 黄祥 wrote: perhaps try to set migrat = True, to take effect for your defined table. best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: Custom grid based on user profile -- any cool smartgrid examples welcomed!!

2014-04-10 Thread 黄祥
if you set the access control correctly and set the logical for that it can be done, for menu i think you can do something like : *controllers/install.py* def index(): if db(db.auth_permission).isempty() and db(db.auth_membership).isempty(): # group auth.add_group('Finance', 'Finance') # user

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread 黄祥
i mean set the migrate = True, to take effect for your changes of define table field, or are you create it from the scratch? best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread Austin Taylor
I set migrate to True and checked the database logs. You're right... its showing as a VARCHAR 255. Even though I have length=499 defined in the db.define_table. Is web2py limited to 255 for VARCHARS? On Thursday, April 10, 2014 10:50:56 AM UTC-4, Austin Taylor wrote: I only define the table

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread 黄祥
please try to start from simple, create your new web2py application and then put your define table there, after that check your sql.log or test it from appadmin. e.g. *models/db.py* db.define_table('newtable', Field('Name','string'), Field('Comments', string', length=499) ) best

[web2py] Re: Custom grid based on user profile -- any cool smartgrid examples welcomed!!

2014-04-10 Thread Austin Taylor
Hi Stifan, I guess I didn't properly phrase my question but I really appreciate your response. Currently users can access one of our databases using the grid layout. I want to give them the option of only seeing select fields through some type of checkbox or multiple select. Like this:

Re: [web2py] Re: develop iphone apps with web2py with this plugin

2014-04-10 Thread Rufus
The domain name in the link here expired a month ago (March 8, 2014). Figures. On Sunday, July 1, 2012 7:27:32 AM UTC-4, samrat kafle wrote: I tried this but not worked well I am searching a complete guide for developing iphone apps and i have found one cool articles which i recommend

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread Austin Taylor
Are there any other suggestions? I've tried everything and I really need help with this. When the table is set to Migrate=True the sql log shows VARCHAR(255) even though my actual SQLDatabase shows 499 length and my length on the db model is set to length=500 On Thursday, April 10, 2014

[web2py] Re: Enter from 0 to 255 characters on grid=SQLFORM How to fix?

2014-04-10 Thread Austin Taylor
Fixed it by changing string to text. Is there anything that could go wrong by me doing that? On Thursday, April 10, 2014 12:52:13 PM UTC-4, Austin Taylor wrote: Are there any other suggestions? I've tried everything and I really need help with this. When the table is set to Migrate=True

[web2py] Does not contain for grid

2014-04-10 Thread LoveWeb2py
Is there a way to search for something that Does not Contain on the grid return? I was trying to put something together with wildcards and such, but haven't been able to return results in a certain row that does not contain. For example abcd abcde abcde abcde 1394e lajskl3 djklsajk3

[web2py] unable to install application KPAX

2014-04-10 Thread Rufus
I tried to load the KPAX2 example app from: https://github.com/mdipierro/web2py-appliances/blob/master/KPax2/web2py.app.KPax2.w2p and I it kept telling me: unable to install application KPAX I don't know where to look for further details about WHY? Rufus (I tried loading it to PythonAnywhere

[web2py] Re: unable to install application KPAX

2014-04-10 Thread Rufus
Progress... Remembering a w2p is just a zipped archive, I opened it with 7zip and I found out this wasn't an archive. apparently I downloaded a html page meant to be clicked-through. Then a view raw let me download the actual repository. Let's see how that goes... On Thursday, April 10,

[web2py] Re: current trunk using memdb results in crash

2014-04-10 Thread David Manns
I am still seeing this in released version 2.9.5?? On Sunday, March 9, 2014 9:04:49 PM UTC-4, Massimo Di Pierro wrote: This is fixed in trunk. On Friday, 7 March 2014 21:11:08 UTC-6, Leonardo Pires Felix wrote: Looks like that this is happening with the REDIS too, Upgraded from 2.8.3 to

Re: [web2py] security issue in the OpenSSL

2014-04-10 Thread Michele Comitini
Detailed info here: http://heartbleed.com/ really bad stuff. mic 2014-04-10 9:42 GMT+02:00 Annet anneve...@googlemail.com: I guess you've been notified as well, in case you haven't ... Yesterday my hosting provider notified me of the following issue: As you have probably heard a serious

[web2py] Re: unable to install application KPAX

2014-04-10 Thread Rufus
Well, Couldn't even open default/index: there was a problem with foreign keys right off the bat. Modified the model to ignore the foreign key constraint, for better or worse. Then I found out the layout.html does not handle the nested menu created in menu.py. (All this because I

[web2py] Re: current trunk using memdb results in crash

2014-04-10 Thread Sebastian Cambeo
Try deleting memcache and browser cache Am Donnerstag, 10. April 2014 21:13:39 UTC+2 schrieb David Manns: I am still seeing this in released version 2.9.5?? On Sunday, March 9, 2014 9:04:49 PM UTC-4, Massimo Di Pierro wrote: This is fixed in trunk. On Friday, 7 March 2014 21:11:08 UTC-6,

[web2py] how to determine which foreign key is constraint problem?

2014-04-10 Thread Alex Glaros
how to determine which foreign key is the constraint problem? class 'sqlite3.IntegrityError' foreign key constraint failed Version web2py™ Version 2.9.5-stable+timestamp.2014.03.20.22.57.13 Python Python 2.7.6: C:\Program Files\web2py\web2py.exe (prefix: C:\Python27) Traceback 1. 2. 3. 4.

Re: [web2py] web2py with Plesk Control Panel ?

2014-04-10 Thread peter
Just to warn people about nginx and uwsgi with plesk control panel. I used uwsgi with nginx on centos 5, using the script that comes with web2py (I helped write it). This worked fine, but then suddenly plesk decided to include nginx to run alongside apache. This configuration totally

[web2py] Re: how to determine which foreign key is constraint problem?

2014-04-10 Thread 黄祥
not sure about the problem because of lack info of your code, perhaps is just the define table arrangement. *e.g. wrong arrangement because the table define the customer first yet it can not found the bank table* db.define_table('customer', Field('name'), Field('bank', 'reference bank'),

[web2py] Re: Custom grid based on user profile -- any cool smartgrid examples welcomed!!

2014-04-10 Thread 黄祥
i think it can be achieve it when you store it in database and use the query to compare the authorization for the page. please read the web2py book about access control ref: http://web2py.com/books/default/chapter/29/09/access-control best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: how to determine which foreign key is constraint problem?

2014-04-10 Thread Alex Glaros
I meant do any error codes tell you what table has the problem? -- 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

[web2py] Re: how to determine which foreign key is constraint problem?

2014-04-10 Thread 黄祥
i think the culprit is hiding around here : File C:/Program Files/web2py/applications/ceaA/controllers/default.py http://127.0.0.1:8000/admin/default/edit/ceaA/controllers/default.py, line 408, in add_new_government_organization please investigate what lies on the line 408 in your traceback.

[web2py] Re: how to determine which foreign key is constraint problem?

2014-04-10 Thread Alex Glaros
the problem was I set a default in the controller that didn't exist in the data was looking for shortcuts to analyze constraints but I guess what you provided is as narrow as it gets thanks Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Online Manual: Chapter 9: Access Control - Formatting/content issues?

2014-04-10 Thread Tim Richardson
it;s been fixed ... just waiting for caches to clear, I think. On Friday, 11 April 2014 00:03:39 UTC+10, DenesL wrote: True, everything after 9.1.5 Renaming Auth tables is corrupted. On Thursday, April 10, 2014 5:58:58 AM UTC-4, Seeker wrote: Hi, Is it just me (and my lack of