[web2py] Re: How can I return file name after inserting?

2019-02-27 Thread Константин Комков
четверг, 28 февраля 2019 г., 0:57:03 UTC+3 пользователь Dave S написал: > > Why not? > I think when we insert something in table we already know server-side filename. Also in firebird there is 'RETURNING' for that case. Yes, I use upload field. db_app.define_table('doc_images', Field

[web2py] Installing web2py behind IIS (for Massimo Di Pierro)

2019-02-27 Thread Константин Комков
Massimo Di Pierro, hello. Help me please install web2py behind IIS. Instruction in book don't work. I have old projects and one new. Old projects work, new project open only index page and after ajax call redirect to welcome page. I can not find solution here

[web2py] dict values error in python 3.6

2019-02-27 Thread Maurice Waka
Hallo, While creating a db, def create(): form = SQLFORM(db.food_data,submit_button=T('Submit')) form.element('input[value=Submit]')['_style']='background-color: #DA2128; color:#ff' if form.process().accepted: response.flash="form accepted" redirect(URL('default'

Re: [web2py] Javascript return value

2019-02-27 Thread Val K
here is scaffold view script: $(function(){ var url = '{{=URL()}}'; function onvalidate (d) { if d.company_list { // do popup here using d.company_list //finally post user choice (t

[web2py] Re: How can I return file name after inserting?

2019-02-27 Thread Dave S
On Wednesday, February 27, 2019 at 3:19:47 AM UTC-8, Константин Комков wrote: > > I want to get it - > 'doc_images.file.bf573aec8fdf573f.666c6f7765722e6a706567.jpeg'. I want to > get it after my file was in uploads folder. I don't use SQLFORM. Are there > any way to get not only id after insert

[web2py] Re: form in modal

2019-02-27 Thread Leonel Câmara
I use this little javascript function function load_in_modal(url, modal_id, options, modal_options) { if (typeof options === 'undefined') { /* Example Options. * {title: "Add Image"} */ options = {}; } if (typeof modal_options === 'undefined') { modal_op

[web2py] Re: Web2py freezes when inserting rows. Problem seems to be database connection limit per application.

2019-02-27 Thread Leonel Câmara
If you're inserting a lot of rows you should probably be using the scheduler. That said you don't have a harakiri config so it's probably a timeout in your nginx config. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Web2py freezes when inserting rows. Problem seems to be database connection limit per application.

2019-02-27 Thread William
Hi all, my application has a tendency to freeze whenever I run a process that inserts row to the database. Does anyone know how to fix this? I'm currently deploying Web2py on DigitalOcean using nginx + uwsgi and MySQL database. My uwsgi has the following settings: chdir = WEB2PY_PATH_PLACEHOLDE

[web2py] form in modal

2019-02-27 Thread Shawn Michaels
Hi, I managed to get form in modal to work, but I have problem - when I submit form the form hides and there is still shadow background there. I'm working with latest bootstrap (4.3.1) right now (don't know if it's the reason). response.js with form.errors shows the form again but with accepted

Re: [web2py] another python 3 minor bug in 2.18.2: b'Logged in'

2019-02-27 Thread 黄祥
already created https://github.com/web2py/web2py/issues/2110 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 received this messa

Re: [web2py] Javascript return value

2019-02-27 Thread Ben Duncan
Ok a little more detail in pseudo code: Display Login page: get user name and password. If form validates: validate username and password if username and password validates popup company selection get company redirect to next page else show "username password" er

Re: [web2py] another python 3 minor bug in 2.18.2: b'Logged in'

2019-02-27 Thread Kevin Keller
Could you open a ticket on github please with some supporting info. On Wed, 27 Feb 2019, 12:32 黄祥, wrote: > similar issues happen during : > - clear session, cache from web2py admin > - remove app from web2py admin > > best regards, > stifan > > -- > Resources: > - http://web2py.com > - http:/

Re: [web2py] Javascript return value

2019-02-27 Thread Ben Duncan
What I was hoping to do was a javascript popup to to choose a company, then a redirect. I load the company number and values in a session variables upon connection. The user id file can have a default company (court) assignment , in which case there would be no reason to do the popup, but if the u

Re: [web2py] Re: Using Http.Client module in my controls

2019-02-27 Thread elisha bere
How do i fix that? Http.client is not my module. How do i implement so this code can work?? On 27 Feb 2019 14:35, "黄祥" wrote: > seems can't found the module applications/welcome/modules/http.py > > best regards, > stifan > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Docum

Re: [web2py] Re: Using Http.Client module in my controls

2019-02-27 Thread 黄祥
seems can't found the module applications/welcome/modules/http.py 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 received this

Re: [web2py] another python 3 minor bug in 2.18.2: b'Logged in'

2019-02-27 Thread 黄祥
similar issues happen during : - clear session, cache from web2py admin - remove app from web2py admin 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 (R

Re: [web2py] Re: 2.18.1 is OUT

2019-02-27 Thread 黄祥
done ref: https://github.com/web2py/web2py/issues/2108 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 received this message bec

Re: [web2py] Re: Problem updating list stored in session

2019-02-27 Thread Jon Subscripted
Hi everyone, I keep on looking for the problem in order to avoid disgusting surprises in the near future. Is there any size limitation in session storage object? Thanks in advance. Regards, Jon. On Wed, Feb 27, 2019 at 12:57 PM Jon Subscripted wrote: > Thanks Leonel, > Yes, as you comment the a

Re: [web2py] Re: Problem updating list stored in session

2019-02-27 Thread Jon Subscripted
Thanks Leonel, Yes, as you comment the assignation was correct. I managed to fix it but I do not know why yet. It must be something else, somewhere else in the controller code (that's my guess). I went for the following quick and dirty test and it started to work: 1) duplicate the variables stor

[web2py] Re: How can I return file name after inserting?

2019-02-27 Thread Константин Комков
I want to get it - 'doc_images.file.bf573aec8fdf573f.666c6f7765722e6a706567.jpeg'. I want to get it after my file was in uploads folder. I don't use SQLFORM. Are there any way to get not only id after inserting? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

Re: [web2py] Re: 2.18.1 is OUT

2019-02-27 Thread Kevin Keller
Can you file an issue on github please? On Wed, 27 Feb 2019, 09:26 黄祥, wrote: > Traceback (most recent call last): >> File "/Users/sugizo/project/python/web2py/gluon/restricted.py", line >> 219, in restricted >> exec(ccode, environment) >> File >> "/Users/sugizo/project/python/web2py/app

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-02-27 Thread Nico Zanferrari
Hi, this is a big problem also from my point of view and I've already opened issue 2027 . However it's not so easy to achieve this goal, because you've to switch to 3.x + go 64 bit + change the *freezer* program (py2exe and bbfreeze do not work with p

Re: [web2py] another python 3 minor bug in 2.18.2: b'Logged in'

2019-02-27 Thread Kevin Keller
Can you file an issue on github please? On Tue, 26 Feb 2019, 20:36 Yi Liu, wrote: > b'Logged In' in flash message: > > [image: Screen Shot 2019-02-26 at 12.33.29.png] > This is in auth, not something in my app, right? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Document

Re: [web2py] Re: Using Http.Client module in my controls

2019-02-27 Thread elisha bere
import http.client def send(): conn = http.client.HTTPConnection("api.msg91.com") msg = " This is the test message i want to send though later it will be changed" my_list = msg.split() final_text = "%20".join(my_list) conn = http.client.HTTPConnection("api.msg91.com") co

Re: [web2py] How can I return file name after inserting?

2019-02-27 Thread sandeep patel
If you are using the form to summiting data. You can use form vars to summiting data into multiple tables. form = SQLFORM(...) if form.process().accepted: db['table name'].insert(**form.vars) Even you only want to insert a specific field to the table you can do so. db.['table name'].insert

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-02-27 Thread elisha bere
Hie, Is it possible to change from 2.7 to 3.x in my web2py app On 17 Feb 2019 20:57, "Jitun John" wrote: > "It requires Python 2.6 (no more supported), Python 2.7 (stable) or > Python 3.5+ (*recommended for new projects*) already installed on your > system. > There are also *binary packages for

[web2py] How can I return file name after inserting?

2019-02-27 Thread Константин Комков
I insert file in table and then I want to write its name in another table. How can I return filename? > > >>> db_app.doc_images.insert(file=request.vars.files[i]) > 1 (I got id) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sour

[web2py] Re: Web2py Windows edition with 3.x Interpreter

2019-02-27 Thread Jitun John
Fixed the pickle issue by deleting "databases" folder in the app. Wondering if we will ever (if it is possible) to get a 3.x python version of web2py windows ("python37.dll" and "pywintypes37.dll" files.) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

[web2py] Re: 2.18.1 is OUT

2019-02-27 Thread 黄祥
> > Traceback (most recent call last): > File "/Users/sugizo/project/python/web2py/gluon/restricted.py", line > 219, in restricted > exec(ccode, environment) > File > "/Users/sugizo/project/python/web2py/applications/test/models/db_schema_0_auth.py", > > line 9, in > custom_auth_t

[web2py] Re: Problem updating list stored in session

2019-02-27 Thread Leonel Câmara
I don't see anything wrong with your code, you're even creating new lists each time you change the value so they're surely being updated. If the view is showing correctly, maybe the problem is with your debug code which is printing session values before they're changed. -- Resources: - http://

[web2py] Re: Using Http.Client module in my controls

2019-02-27 Thread 黄祥
perhaps you can share the code that reproduce an error and the traceback error log 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) ---

[web2py] Javascript return value

2019-02-27 Thread Val K
Hard to understand the workflow, do you want the user to be redirected to choose the company after he has logged in? or he should make a choice along the login form filling? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] Re: Get files from string

2019-02-27 Thread Константин Комков
Leonel Câmara, thank you! In controller: > i = 0 > while i < len(request.vars.files): > db_app.doc_images.insert(file=request.vars.files[i]) > i += 1 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h