Re: [web2py] SQLFORM.grid change form vars

2016-03-15 Thread Anthony
On Wednesday, March 16, 2016 at 1:32:26 AM UTC-4, Vinyl Darkscratch-Kazotetsu wrote: > > I see it now — I had assumed that you could set the default in the > controller function, but it seems that it has to be in the model file. > Thank you for your help on this issue. > No, default can be

Re: [web2py] SQLFORM.grid change form vars

2016-03-15 Thread Vinyl Darkscratch-Kazotetsu
I see it now — I had assumed that you could set the default in the controller function, but it seems that it has to be in the model file. Thank you for your help on this issue. Still, though…I would like to know how to edit the variables submitted by the form, and still unsure how to do that.

[web2py] Re: Scheduler as a service RHEL 7

2016-03-15 Thread Dave S
On Tuesday, March 15, 2016 at 6:49:44 PM UTC-7, Michael M wrote: > > So some googling later for "Persistant Python script Rhel7 service" > I changed the service to the following and now the service will run. > > Thank-you Dave for getting me back to thinking about writing the service >

[web2py] Re: modal not work when upload form field have the data

2016-03-15 Thread Massimo Di Pierro
If you want to upload to work you have to put an iframe in modal, not LOAD. On Tuesday, 15 March 2016 19:30:08 UTC-5, 黄祥 wrote: > > is it possible to make modal work when upload form field have the data? > i've tested before the form submit button only show working... (no error > traceback

[web2py] Re: SQLFORM.grid change form vars

2016-03-15 Thread Anthony
On Tuesday, March 15, 2016 at 9:18:00 PM UTC-4, Vinyl Darkscratch-Kazotetsu wrote: > > The *user_id* field is both non-readable and non-writable already, which > is what's causing that error. It's not receiving any data for the field > from anywhere. As for the various argument passing

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-15 Thread Anthony
> > My idea would be to add a warning that the session will be detected as > changed and written to disk etc. (depending on session type) if a dict > value (like auth.user_groups) of the session is accessed outside a > controller function > Note, the problem occurs when creating new objects

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-15 Thread Anthony
On Tuesday, March 15, 2016 at 6:09:05 PM UTC-4, Alex wrote: > > Do you know why there is a difference if the dict is accessed inside or >> outside a controller function? >> > > I still don't understand why it behaves correctly when accessed inside a > controller function. I tried setting a new

[web2py] Re: Scheduler as a service RHEL 7

2016-03-15 Thread Michael M
So some googling later for "Persistant Python script Rhel7 service" I changed the service to the following and now the service will run. - [Unit] Description=Web2py Scheduler service [Service] ExecStart=/usr/bin/python /opt/www-data/web2py/web2py.py -K

[web2py] Re: SQLFORM.grid change form vars

2016-03-15 Thread Vinyl Darkscratch-Kazotetsu
The *user_id* field is both non-readable and non-writable already, which is what's causing that error. It's not receiving any data for the field from anywhere. As for the various argument passing parameters, I am unsure of how to implement it into the website to set form.vars.user_id to

[web2py] modal not work when upload form field have the data

2016-03-15 Thread 黄祥
is it possible to make modal work when upload form field have the data? i've tested before the form submit button only show working... (no error traceback occured but the result is not expected) *my code :* *controlelrs/transaction_purchase.py* def modal_raw_material(): form =

[web2py] Re: How to insert different grid elements in tab panels?

2016-03-15 Thread Ron Chatterjee
Basically, I go to panel one and "view" the grid element. And if I click on "back" button it takes me to panel2 content even though it says panel1. And vice versa. On Tuesday, March 15, 2016 at 8:21:59 PM UTC-4, Ron Chatterjee wrote: > > I used the LOAD but seems to be the problem still there.

[web2py] Re: How to insert different grid elements in tab panels?

2016-03-15 Thread Ron Chatterjee
I used the LOAD but seems to be the problem still there. See attached pic My Model db.define_table('post', Field("title", "string", length=128, default=""), Field("contents", "text", length=512, default=""), Field("created_on", "date", default=None),

[web2py] Re: Scheduler as a service RHEL 7

2016-03-15 Thread Michael M
I read though that a ton of times but I believe RHEL 7 retired that method in /etc/init/ and conf files and moved to systemd and services. Ill try the sudo in ExecStart. And report back. On Tuesday, March 15, 2016 at 3:36:30 PM UTC-7, Dave S wrote: > > On Tuesday, March 15, 2016 at 2:35:40

Re: [web2py] please help with new widgets

2016-03-15 Thread Val K
Date/Time/Datetime Widget - doesn't become hidden after click on another input ( have to click on any non-input, tested in Opera) On Tuesday, March 15, 2016 at 9:40:39 AM UTC+3, Sukrut Joshi wrote: > > please send me college management system which developed in web2py.. > which contain >

[web2py] Re: fighting with the widget

2016-03-15 Thread Val K
There is no problem with bootstrap - you can write your own widgets using its classes, but if you customize/override web2py.js/web2py-bootsrup3.js/widgtes.py you have a chance to get a pain with updating web2py (bootstrap is updated much rarely) optimal solution (I think) - write your own

[web2py] Re: Scheduler as a service RHEL 7

2016-03-15 Thread Dave S
On Tuesday, March 15, 2016 at 2:35:40 PM UTC-7, Michael M wrote: > > I'm not stuck on getting it running as a Service. > > Just getting it so it runs when the server is power cycled or otherwise. > Insuring that the scheduler is running so it can do DB updates of > flat-files that get dumped

[web2py] Re: fighting with the widget

2016-03-15 Thread Pierre
If I want to define another class like class MyListWidget(StringWidget): what's the location to put this code ? -- 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

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-15 Thread Alex
> > Do you know why there is a difference if the dict is accessed inside or > outside a controller function? > I still don't understand why it behaves correctly when accessed inside a controller function. I tried setting a new value in a controller function (e.g. auth.user.test = '1') and

[web2py] Re: fighting with the widget

2016-03-15 Thread Pierre
thank you guys !!! I should be able to fix things tomorrow.for the moment am staying with bootstrap classes -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: fighting with the widget

2016-03-15 Thread Val K
OOPs! I make my widgets exactly this way (another class), but Pierre wants to customize existing - let's give him a chance ;) On Tuesday, March 15, 2016 at 11:52:22 PM UTC+3, Niphlod wrote: > > actually you picked up a good example on how to override properly > web2py.js the new

[web2py] SQLFORM.smartgrid displaying links

2016-03-15 Thread Jeff Riley
Hello all, I have the following SQLFORM.smartgrid defined. form = SQLFORM.smartgrid(db.customer, linked_tables=['address', 'sheet', 'sheet_archive'], searchable= dict(customer=True, address=False, sheet=True), create=True, paginate=20,

[web2py] Re: Scheduler as a service RHEL 7

2016-03-15 Thread Michael M
I'm not stuck on getting it running as a Service. Just getting it so it runs when the server is power cycled or otherwise. Insuring that the scheduler is running so it can do DB updates of flat-files that get dumped on the box daily. On Sunday, March 13, 2016 at 7:32:47 PM UTC-7, Michael M

[web2py] Re: iterating through form fields with rows

2016-03-15 Thread Val K
Hi! Just for clarity: *row.field_name* - access to field value of *record retrieved from DB *( by db().select() ) *form.vars.field_name *- access to field value of *submitted from *( *after* form.process() ) form.vars - just a Storage() object like a dict() form.vars.keys() - list of all

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-15 Thread Alex
> > Are you looking for an alternative way to hash the session? The problem is > the session currently allows any pickleable object, so we can't pick a > serialization format that excludes anything pickleable (e.g., JSON would > not work). > so the only alternative would be to use pickle

[web2py] Re: fighting with the widget

2016-03-15 Thread Niphlod
actually you picked up a good example on how to override properly web2py.js the new scaffolding app overwrites the default string widget with one that is more in line with bootstrap3 (see welcome/static/js/web2py-bootstrap3.js). anyhow, if you want no interactions whatsoever with web2py.js

[web2py] Re: fighting with the widget

2016-03-15 Thread Val K
See web2py.js There is : $(ul).find(":text").after('+-'). keypress(function(e) { return(e.which == 13) ? pe(ul, e) : true; }).next().click(function(e) { pe(ul, e); e.preventDefault(); }).next().click(function(e) { rl(ul, e);

Re: [web2py] iterating through form fields with rows

2016-03-15 Thread Richard Vézina
for i in range(0, number_of_total_fields): row[field+i] Richard On Tue, Mar 15, 2016 at 4:22 PM, wrote: > I have a table defined with 3 input fields and then an upload field. The > upload field is used to take the values that are entered by the user and > input them

[web2py] Integrating webmail client like Mailpile

2016-03-15 Thread billmackalister
Is there a way to integrate a webmail client like Mailpile to web2py application? -- 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

[web2py] iterating through form fields with rows

2016-03-15 Thread aetagothno
I have a table defined with 3 input fields and then an upload field. The upload field is used to take the values that are entered by the user and input them into a file which contains all form field values from the session. The form is generated dynamically, so the number of form fields varies

[web2py] Re: No form.errors in custom user form ?

2016-03-15 Thread Anthony
On Tuesday, March 15, 2016 at 2:28:36 PM UTC-4, Ramos wrote: > > Guess i have to use =form.custom.widget.fieldname > Or at the very least, you would have to access form.errors somewhere. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-15 Thread Niphlod
web2py on this particular matter needs to be pretty dumb exactly because pretty much anything can be serialized into the session. Sessions are also not hookable, so you can't even write your own serializer any other framework restricts serialization to a plain dict (serialized as json) OR

[web2py] Re: SQLFORM.grid() control detect_record_change

2016-03-15 Thread domezzzz
El viernes, 26 de febrero de 2016, 12:03:30 (UTC-3), dome...@gmail.com escribió: > > Ante todo, un saludo al Sr. Massimo Di Pierro y toda la colectividad que > lo secunda, por este excelente framework, que no deja de sorprenderme. > > > > Contexto del problema: > >Versión de web2py:

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-15 Thread Anthony
On Tuesday, March 15, 2016 at 1:36:19 PM UTC-4, Alex wrote: > > Do you know why there is a difference if the dict is accessed inside or > outside a controller function? > > Are there any (fast) alternatives to calculate a dict hash? > Are you looking for an alternative way to hash the session?

[web2py] Re: fighting with the widget

2016-03-15 Thread Pierre
ok. l see the list:string class : class ListWidget(StringWidget) what i'd like to do is keep the default design and sqlform structure associated to list:string fields but to have my own javascript to manage a few things in particular the use of Jquery on() or Jquery delegate() to watch the

[web2py] Looping over applications

2016-03-15 Thread Bob St John
This is not a problem, but I would like to confirm that this pseudo code is best practice. I have a single instance of web2py (2.13.4) with multiple applications, each application has its own MySQL database. 'init' is my control application which I use for administration. In 'init' I want to

[web2py] Re: No form.errors in custom user form ?

2016-03-15 Thread António Ramos
Guess i have to use =form.custom.widget.fieldname 2016-03-15 18:03 GMT+00:00 António Ramos : > Hello i have this custom user form. When i enter a wrong password i > form.errors is empty.. > Any help ? > > {{extend 'layout.html'}} > > {{=form.custom.begin}} > > >

[web2py] No form.errors in custom user form ?

2016-03-15 Thread António Ramos
Hello i have this custom user form. When i enter a wrong password i form.errors is empty.. Any help ? {{extend 'layout.html'}} {{=form.custom.begin}} Registo {{if request.args(0)!='login':}}

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-15 Thread Alex
Do you know why there is a difference if the dict is accessed inside or outside a controller function? Are there any (fast) alternatives to calculate a dict hash? The workaround for me would be to not access auth.user_groups and use fields in the user table instead (e.g. auth.user.is_admin)

[web2py] Re: Correct Apache default.conf?

2016-03-15 Thread Massimo Di Pierro
We are thinking of removing most of those scripts. We strongly recommend using Nginx over Apache and we do not wish to support technologies that we do not recommend. On Tuesday, 15 March 2016 11:36:28 UTC-5, webmas...@trytha.com wrote: > > There are a bunch of lovely scripts I've been trying

[web2py] IMPORTANT SECURITY ISSUE

2016-03-15 Thread Massimo Di Pierro
An important security issue has come up. If you use web2py in production with the rocket web server (which you should not anyway): 1) delete the "examples" app 2) make sure you pages do not expose the {{=response.toolbar}} Please follow the above guidelines because exposing internal system

[web2py] Correct Apache default.conf?

2016-03-15 Thread webmaster
There are a bunch of lovely scripts I've been trying out over on the git repository. Unfortunately, none of them seemed to completely work on a fresh Ubuntu Server 14.04 install. Close, but no cigar on all I tried. After much experimentation (and finally getting things mostly working), I

[web2py] Re: fighting with the widget

2016-03-15 Thread villas
Take a look around here . -- 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] fighting with the widget

2016-03-15 Thread Pierre
Hi, I need a customized behaviour for a list:string field form. I tried to improve the default behaviour but at a certain point my javascript code conflicts with some web2py code (modernizr stuff i guess) so now I want to define a custom list:string widget where to start with this ? where's

[web2py] Getting the next ID value to create linked rows (or multiple updates on a single view)

2016-03-15 Thread David Orme
Hi, I'm trying to create a view that allows a user to create a new project and add (existing) users to that project. In order to represent the two tables on a single page, I've been following a recipe from pyslices:

[web2py] Re: How to do this? Obviously I need ajax but what's the exact syntax?

2016-03-15 Thread Leonel Câmara
No not exactly that Ben the images should go in the view too. It might be easier to simply use checkboxes next to the images if you guys are having a hard time. This way there's no need for hidden fields or javascript. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: How can I use response.render() functionality when there is no response object?

2016-03-15 Thread Lisandro
I've figured it out, this is the way: from gluon.template import render Sorry to bother :P El martes, 15 de marzo de 2016, 7:34:28 (UTC-3), Lisandro escribió: > > I have an html file template, and I would like to render it with some > variables. > Normally I would do somethink like this: > >

[web2py] How can I use response.render() functionality when there is no response object?

2016-03-15 Thread Lisandro
I have an html file template, and I would like to render it with some variables. Normally I would do somethink like this: response.render('path/to/template.html', dict=(var1='value1', var2='value2' )) *However, I need to do it from scheduler environment, so there is no response object

Re: [web2py] please help with new widgets

2016-03-15 Thread Sukrut Joshi
please send me college management system which developed in web2py.. which contain 'student 'staff fees attendence library module On Mon, Mar 14, 2016 at 11:32 PM, Dave S wrote: > > > On Monday, March 14, 2016 at 10:55:53 AM UTC-7, Dave S wrote: >> >> >> >> On Monday,

Re: [web2py] Re: How to do this? Obviously I need ajax but what's the exact syntax?

2016-03-15 Thread Sukrut Joshi
please send me college management system which developed in web2py.. which contain 'student 'staff fees attendence library module On Tue, Mar 15, 2016 at 11:42 AM, Ben Lawrence wrote: > Lets see if I get this right. In the view, place this: > > {{=clickme}} > then in the

[web2py] Re: How to do this? Obviously I need ajax but what's the exact syntax?

2016-03-15 Thread Ben Lawrence
Lets see if I get this right. In the view, place this: {{=clickme}} then in the controller: for image in imageRows: clickme.append(TAG.button(IMG(..image..),_type="button", _onclick="jQuery('#xID').val('%d');ajax('%s', ['picID'])" \ % (image.id

[web2py] Oauth2 with gigya - accesstoken always is none

2016-03-15 Thread kedai
hi trying to use gigya for logging in when i clicked log in or go to http://my.host/user/login?_next=/ i will be redirected to twitter/fb/etc to log in, and will be redirected back to my redirect_uri. redirect_uri will have code appended to it (redirect_uri.mydomain/?code=blabla) but i am