Re: [web2py] Postgresql and timestamp

2013-09-18 Thread Johann Spies
The type of the field should be 'datetime'. A timestamp can be done with the following syntax according to the book (search for 'request.now') : Field('created_on', 'datetime', default=request.now, update=request.now, writable=False), I suspect the timesone-thing can be done with

Re: [web2py] Recording audio through web browser

2013-09-18 Thread Johann Spies
I think a browser that can utilise the microphone or other devices on a computer might be a serious security risk. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- Resources: - http://web2py.com -

Re: [web2py] Recording audio through web browser

2013-09-18 Thread Vinicius Assef
Search by WebRTC. It's what you are looking for. On Wed, Sep 18, 2013 at 2:28 AM, Andreas Wienes itsys...@gmail.com wrote: What I mean is to record audio through the browser using the build in microphone. Imagine you visit a website and are able to record your own voice. Am Dienstag, 17.

[web2py] background image

2013-09-18 Thread Alex Glaros
What is snytax for background image? this example works for foreground: {{=IMG(_src=URL('static', 'images/bulb.png'))}} what is syntax for the same image, for background? please let me know if it needs to be surrounded by div or style or any tags thanks, Alex Glaros -- Resources: -

[web2py] Changelog for 2.6.3?

2013-09-18 Thread Michael Hall
Hiya Is there a changelog for 2.6.3 I just updated this morning and had an issue with an experimental virtual field for sqlform.smartgrid. I removed the field and everything worked fine and the overall speed of the app has improved. I am interested to know if you have removed this experimental

[web2py] Re: Changelog for 2.6.3?

2013-09-18 Thread Niphlod
http://web2py.com/init/default/changelog BTW: it really depends on what version did you upgrade from what feature isn't working ? Il giorno mercoledì 18 settembre 2013 12:28:56 UTC+2, Michael Hall ha scritto: Hiya Is there a changelog for 2.6.3 I just updated this morning and had an

[web2py] References and Virtual Fields do not play nice together.

2013-09-18 Thread hiro
Is this a bug, a limitation or by design? I create a new welcome application and add the following tables and fields: db.define_table('entity', Field('entity_name', 'string'), Field('slogan', 'string'), ) db.entity.slogan2 = Field.Virtual(lambda row: row.entity.slogan+' is the best

Re: [web2py] References and Virtual Fields do not play nice together.

2013-09-18 Thread Marin Pranjić
I get this error ONLY with appadmin. It's not because of references. For now you can use: lambda row: row.entity.get('slogan', '')+' is the best slogan ever' Marin On Wed, Sep 18, 2013 at 1:08 PM, hiro hiro...@gmail.com wrote: Is this a bug, a limitation or by design? I create a new

Re: [web2py] Re: beginner questions about REST

2013-09-18 Thread Dimid Duchovny
Ticket opened: https://code.google.com/p/web2py/issues/detail?id=1682 I'd appreciate help with the first question and feedback on the script. 2013/9/17 Massimo Di Pierro massimo.dipie...@gmail.com Please open a ticket about this. On Tuesday, 17 September 2013 08:53:10 UTC-5, Dimid Korovev

[web2py] Re: background image

2013-09-18 Thread Massimo Di Pierro
Wich background? style body { background: url({{=URL()}});} /style On Wednesday, 18 September 2013 03:45:02 UTC-5, Alex Glaros wrote: What is snytax for background image? this example works for foreground: {{=IMG(_src=URL('static', 'images/bulb.png'))}} what is syntax for the same

[web2py] Re: References and Virtual Fields do not play nice together.

2013-09-18 Thread Massimo Di Pierro
Fixed in trunk! On Wednesday, 18 September 2013 06:08:28 UTC-5, hiro wrote: Is this a bug, a limitation or by design? I create a new welcome application and add the following tables and fields: db.define_table('entity', Field('entity_name', 'string'), Field('slogan', 'string'), )

[web2py] Re: Postgresql and timestamp

2013-09-18 Thread CC J
It works with datetime On Wednesday, September 18, 2013 11:33:50 AM UTC+10, Nate wrote: Hi I've looked through the forum and can find nothing. my code db.define_table('franchise', Field('code', 'string', length=1), Field('name'), Field('recorddate','timestamp with time zone'), )

[web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Richard
Hello, In case a component trigger a NOT AUTHORIZED popup, the login redirect link propagate the .load of the component : NOT AUTHORIZEDPlease loginhttp://127.0.0.1:8000/sgddms/default/user.load/login?_next=http%3A//127.0.0.1%3A8000/sgddms/default/index%23 to view this content. The link

[web2py] onvalidation in sqlform.smartgrid for delete purpose

2013-09-18 Thread 黄祥
hi, i want to check onvalidation in sqlform.smartgrid, if the user delete the record it will update the other tables value. at first i think of using ondelete, but it seems, ondelete on sqlform is same like _after_delete callback in dal. so i decide to use onvalidation that check the

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Richard Vézina
Adding extention='html' at line 1163 in tools.py seems to solve the issue : url_login = URL(controller, function, args='login', extension='html') Or extension=False url_login = URL(controller, function, args='login', extension=False) The latter probably better Richard On Wed, Sep 18, 2013

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Richard Vézina
I sent a pull request througth github... Richard On Wed, Sep 18, 2013 at 9:51 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Adding extention='html' at line 1163 in tools.py seems to solve the issue : url_login = URL(controller, function, args='login', extension='html') Or

[web2py] RESTful webservice and patterns...

2013-09-18 Thread Loïc
Hi there Trying to use @request.restful() I have an issue : *My model : * db.define_table('company',Field('name'),Field('info')) db.define_table('employee',Field('employer',db.company),Field('name'),Field( 'info')) *My controller :* @request.restful() def api(): def GET(*args,**vars):

[web2py] Problem viewing error tickets: no attribute 'lazyT_unpickle'

2013-09-18 Thread Ian W. Scott
Hi everyone, I've suddenly started running into an error whenever I try to view error tickets through the admin app: AttributeError: 'module' object has no attribute 'lazyT_unpickle' Any idea what is causing it? I'm running the latest stable version (2.6.3) on python 2.7 (Linux). The

[web2py] Re: onvalidation in sqlform.smartgrid for delete purpose

2013-09-18 Thread Niphlod
db(db.purchase_requisition_header.id==1).update(status='Purchase Requisition Authorized') there's a FIXED condition in there :P Il giorno mercoledì 18 settembre 2013 15:42:06 UTC+2, 黄祥 ha scritto: hi, i want to check onvalidation in sqlform.smartgrid, if the user delete the record it

[web2py] Re: RESTful webservice and patterns...

2013-09-18 Thread Loïc
Well I solved my problem my changing my patterns patterns = [ /companies[company], /company/{company.id}, /company/{company.name.contains} ] is now patterns = [ /companies[company], /company/id/{company.id},

[web2py] Some forms need to be submitted multiple times.

2013-09-18 Thread Ian W. Scott
I'm experiencing an odd problem where some of my forms (including registration and login forms) need to be submitted 2 or 3 times before they are processed. It's been hard to solve because it doesn't seem entirely consistent. Has anyone run into this, and does anyone have any idea what the

[web2py] Re: onvalidation in sqlform.smartgrid for delete purpose

2013-09-18 Thread 黄祥
sorry, i paste the part for my logic testing. db(db.purchase_requisition_header.id==1).update(status='Purchase Requisition Authorized') should be : db(db.purchase_requisition_header.id==row_header.purchase.purchase_requisition_no).update(status='Purchase Requisition Authorized') at first i use

[web2py] Re: Changing field type.

2013-09-18 Thread Avi A
Just to make sure you got the email, I sent it yesterday. On Tuesday, September 17, 2013 11:24:00 PM UTC+3, Avi A wrote: Sure, thanks. On Tuesday, September 17, 2013 10:57:25 PM UTC+3, Massimo Di Pierro wrote: Can you email me your app (confindentially)? On Tuesday, 17 September 2013

[web2py] formstyle in login form

2013-09-18 Thread António Ramos
Hello, can i change the formstyle of the login/register/profile form using form.formstyle=divs for example? -- 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: background image

2013-09-18 Thread Alex Glaros
you guessed correctly, Massimo, it was body. How is float and width typed in? Below float/width do not work. style body { background: url({{=URL('static', 'images/bulb.png',)}});background-repeat: no-repeat;float:right; width:10px; height:10px} /style thanks, Alex On Wednesday,

[web2py] Re: Problem viewing error tickets: no attribute 'lazyT_unpickle'

2013-09-18 Thread Massimo Di Pierro
Are you using web2py 2.6.x to view a ticket created by a previous version? On Wednesday, 18 September 2013 09:58:20 UTC-5, Ian W. Scott wrote: Hi everyone, I've suddenly started running into an error whenever I try to view error tickets through the admin app: AttributeError: 'module'

[web2py] Re: Changing field type.

2013-09-18 Thread Massimo Di Pierro
got it. will look asap. remind me if no answer in 24hrs. ;-) On Wednesday, 18 September 2013 11:10:20 UTC-5, Avi A wrote: Just to make sure you got the email, I sent it yesterday. On Tuesday, September 17, 2013 11:24:00 PM UTC+3, Avi A wrote: Sure, thanks. On Tuesday, September 17, 2013

[web2py] Re: Some forms need to be submitted multiple times.

2013-09-18 Thread Massimo Di Pierro
Which version? On Wednesday, 18 September 2013 10:15:46 UTC-5, Ian W. Scott wrote: I'm experiencing an odd problem where some of my forms (including registration and login forms) need to be submitted 2 or 3 times before they are processed. It's been hard to solve because it doesn't seem

[web2py] Where do console messages go when in nginx?

2013-09-18 Thread Vinicius Assef
Hi guys, I'm with a problem again using web2py with nginx. When I run the dev server (with rocket), I see error messages in console. But when I'm running nginx, where do these messages go to? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] SQLFORM.smartgrid with linked tables on gae? Search query not supported, Tickets, Debugging on gae?

2013-09-18 Thread Py Dev
Hi, first: Thank you for creating web2py, I am starting to love it :-) I tried an app with a smartgrid on gae, some questions came up: 1.) How can I make the search in smartgrid work on gae (Google App Engine)? I only get the message query not supported 2.) Why does the upload for a

[web2py] Re: Changelog for 2.6.3?

2013-09-18 Thread Dave S
On Wednesday, September 18, 2013 3:52:38 AM UTC-7, Niphlod wrote: http://web2py.com/init/default/changelog Mike might be wondering what changed between 2.6.1 and 2.6.3, which isn't yet visible at that URL. If I heard right, both .2 and .3 were small changes not related to sqlform; one of

[web2py] Upload file using POST

2013-09-18 Thread Andreas Wienes
Hello, I want to upload a file by posting it from another script calling something like http://mydomain.com/default/acceptfile?filename=test.txt What is the easiest way doing this? Thanks a lot for your help! Andreas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] server logging question

2013-09-18 Thread Dave S
Silly question time: is httpserver.log compatible with logrotate? (It looks like the answer is yes when running a simple deployment using the in-package Rocket server on Fedora 16) (As of this morning, I'm using 2.5.1-stable+timestamp.2013.06.06.15.39.19 (Running on Rocket 1.2.6) but I'm

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Massimo Di Pierro
This cannot be fixed at the level of gluon/tools.py because some users may want an ajax login form. Those users should be free to create a default/user.load view. In your case you simply need to do (in model): auth.settings.url_login = URL('default','user',args='login', extension=False) On

[web2py] Re: Upload file using POST

2013-09-18 Thread Massimo Di Pierro
You cannot upload a file using GET variables. It must be done using POST multipart forms. Can you explain better your workflow? On Wednesday, 18 September 2013 12:32:27 UTC-5, Andreas Wienes wrote: Hello, I want to upload a file by posting it from another script calling something like

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Richard Vézina
Right! That what I thougth to do at first I should had just did that instead of fixing something :) Thanks. Richard On Wed, Sep 18, 2013 at 2:54 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: This cannot be fixed at the level of gluon/tools.py because some users may want an ajax

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Richard Vézina
I think we need to add url_login in Auth init, I get type 'exceptions.SyntaxError' setting key 'url_login' does not exist I try login_url, it don't return ticket but it not working... web2py 2.4.7 Richard On Wed, Sep 18, 2013 at 3:21 PM, Richard Vézina ml.richard.vez...@gmail.com wrote:

[web2py] Re: Changelog for 2.6.3?

2013-09-18 Thread Massimo Di Pierro
Yes. I will update the changelog. in 2.6.2 we added applications/admin/settings.cfg which is required for the new admin editor to work. in 2.6.3 we added additional checks to fix a possible security issue. We do not know for sure we were vulnerable to the security issue but we added those

[web2py] pluralization system problem

2013-09-18 Thread mcamel
Hello, I've found two problems with Spanish pluralization. I think the first is a bug and the second is an unexpected behavior. Both happens with 2.51 and 2.6.3. How to repeat: 1. Create a sample app 2. Replace index() at default.py with: return T('%s %%{object}', 2, language=es)

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Richard Vézina
Adding this, after line 928 : url_login = URL(c='default', f='user', args='login') And changing line 1163-1164 for this : url_login = self.default_settings['url_login'] Solve it, thought, I don't know why I don't need auth.settings.url_login = URL(default','user',args='login',

Re: [web2py] issue with redirect to login page, the .load propagate in case of component NOT AUTHORIZED

2013-09-18 Thread Richard Vézina
Ok, I miss understand the utility of default_settings, it is not initialize the Auth settings list... I guess we need something like login_next... Will see what I can do tomorrow... Richard On Wed, Sep 18, 2013 at 4:01 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Adding this,

[web2py] Not indexable error when disabling app from admin

2013-09-18 Thread HittingSmoke
I'm getting: type 'exceptions.TypeError' not indexable ...when trying to disable my Welcome app from the admin interface. Code listing: 577. 578. 579. 580. 581. 582. 583. 584. 585. 586. return [] def keys(self): Dictionary style keys() method. if self.list is

[web2py] Re: References and Virtual Fields do not play nice together.

2013-09-18 Thread hiro
Thank you! On Wednesday, September 18, 2013 3:28:22 PM UTC+2, Massimo Di Pierro wrote: Fixed in trunk! On Wednesday, 18 September 2013 06:08:28 UTC-5, hiro wrote: Is this a bug, a limitation or by design? I create a new welcome application and add the following tables and fields:

[web2py] Re: background image

2013-09-18 Thread LightDot
If it's plain CSS you're interested in, you can get such information in a matter of seconds if you simply look it up in the docs: http://www.w3.org/community/webed/wiki/CSS_background_images#Positioning_the_image But I'm a bit surprised that you want to float a background. You'll need to find

[web2py] Re: Where do console messages go when in nginx?

2013-09-18 Thread Niphlod
it depends. the might be redirected to the uwsgi log but really, remove ANY print statement from your code and start using the logging module. it's fairly easy and you can track exactly where things get saved playing with logging.conf On Wednesday, September 18, 2013 7:26:20 PM UTC+2,

[web2py] Re: onvalidation in sqlform.smartgrid for delete purpose

2013-09-18 Thread Niphlod
use always the same method. add a few logging lines between those lines of code and see for yourself why your code isn't executed On Wednesday, September 18, 2013 6:19:21 PM UTC+2, 黄祥 wrote: sorry, i paste the part for my logic testing.

Re: [web2py] Re: beginner questions about REST

2013-09-18 Thread Derek
For question 1 I'd follow PEP20... Explicit is better than implicit. On Wednesday, September 18, 2013 5:56:50 AM UTC-7, Dimid Korovev wrote: Ticket opened: https://code.google.com/p/web2py/issues/detail?id=1682 I'd appreciate help with the first question and feedback on the script.

[web2py] Re: server logging question

2013-09-18 Thread Massimo Di Pierro
I think it is but I never tried. On Wednesday, 18 September 2013 12:58:38 UTC-5, Dave S wrote: Silly question time: is httpserver.log compatible with logrotate? (It looks like the answer is yes when running a simple deployment using the in-package Rocket server on Fedora 16) (As of this

[web2py] Re: pluralization system problem

2013-09-18 Thread Massimo Di Pierro
Can you please open a ticket about this and we will review it asap? On Wednesday, 18 September 2013 14:54:48 UTC-5, mcamel wrote: Hello, I've found two problems with Spanish pluralization. I think the first is a bug and the second is an unexpected behavior. Both happens with 2.51 and

[web2py] Re: background image

2013-09-18 Thread Alex Glaros
thanks Massimo, I think you're right to be concerned that this is the wrong approach I wanted to add a small image, logo, just below the navbar. I was concerned that the image might shift over on top of text on devices that I haven't tested yet, so I thought that as background image, text

[web2py] Re: Upload file using POST

2013-09-18 Thread Massimo Di Pierro
Based on this example: $.jRecorder ({ 'rec_width': '300', 'rec_height': '200', 'rec_top': '0px', 'rec_left': '0px', 'recorderlayout_id' : 'flashrecarea', 'recorder_id' : 'audiorecorder', 'recorder_name': 'audiorecorder', 'wmode' : 'transparent', 'bgcolor': '#ff', 'swf_path':

[web2py] Re: Not indexable error when disabling app from admin

2013-09-18 Thread Massimo Di Pierro
Which version? On Wednesday, 18 September 2013 15:56:28 UTC-5, HittingSmoke wrote: I'm getting: type 'exceptions.TypeError' not indexable ...when trying to disable my Welcome app from the admin interface. Code listing: 577. 578. 579. 580. 581. 582. 583. 584. 585. 586.

[web2py] Editing menu.py giving errors

2013-09-18 Thread HittingSmoke
I'm trying to set up my basic layout before development of my first real app after tinkering around with web2py for quite a while. I'm basing the first version on the welcome scaffolding but I'm getting an error when trying to edit the menu. Here is my menu code: response.menu = [

[web2py] Re: Not indexable error when disabling app from admin

2013-09-18 Thread HittingSmoke
Apologies. It is: 2.6.3-stable+timestamp.2013.09.15.17.01.20 On Wednesday, September 18, 2013 4:08:48 PM UTC-7, Massimo Di Pierro wrote: Which version? On Wednesday, 18 September 2013 15:56:28 UTC-5, HittingSmoke wrote: I'm getting: type 'exceptions.TypeError' not indexable ...when

[web2py] web2py built-in debugger doesn't work

2013-09-18 Thread kundeng
Has anyone used the built-in debugger in web2py. Whenever I try to set a breakpoint, it throws an error saying that the file xxx.py:yyy does not exist. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: The Ajax function question

2013-09-18 Thread Avi A
I tried the first method (categories.load) and it works nice. Just there are a couple of issues: This line below when it rendered as ajax content: (inside categories.load) lih3a href={{=URL('default', 'index', args=(item.id))}}{{=item.f_item_name}}/a/h3/li First, It doesn't generate the h3 style

[web2py] http links in https wiki pages

2013-09-18 Thread Massimo DiPierro
This problem come up at the office today. I am posting a solution here since it may come up in the future. If you have a wiki (web2py wiki or not) which runs under https and contains links to http pages, modern browsers will block those links for security reasons. To prevent the blocking, you

Re: [web2py] Re: Where do console messages go when in nginx?

2013-09-18 Thread Vinicius Assef
I don't have print in my code. How error messages could be redirected to uwsgi log? Or to web2py/applications/myapp/logs? On Wed, Sep 18, 2013 at 7:30 PM, Niphlod niph...@gmail.com wrote: it depends. the might be redirected to the uwsgi log but really, remove ANY print statement from your code

[web2py] SQLFORM.grid: how can I return to a page after a custom edit function

2013-09-18 Thread tomt
Hi, I'm looking for suggestions or examples on how I can implement a custom edit function for SQLFORM.grid that will remember the page it was called from, and return to it once the editing is complete. I was able to call the custom edit function easily enough by using the 'links' parameter

[web2py] Re: onvalidation in sqlform.smartgrid for delete purpose

2013-09-18 Thread 黄祥
i achieve it using your detail explaination in this forum. ref: https://groups.google.com/forum/#!topic/web2py/ShebcblC9pM just a little info, ondelete callback not work in edit mode (delete_this_record check box) so that i must use onvalidation to check the value of delete_this_record. e.g.

[web2py] Permission check for a user in multiple groups

2013-09-18 Thread Jayakumar Bellie
Hi, I have groups with multiple permission. I have a user assigned to multiple groups. How to give access to user only for the groups they are assigned to. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -