[web2py] Yet Another Migration Problem

2018-02-07 Thread Dave S
Copying an app from 2.14.6 to 2.16.1, including copying the database file (storage.sqlite because, well, I'm using sqlite on this machine). appconfig.ini has migrations off, and db.py has db = DAL(myconf.get('db.uri'), pool_size=myconf.get('db.pool_size'), migrate_e

[web2py] Re: Help with MSSQL Connection

2018-02-07 Thread 黄祥
i face the same problem, the solution above is not clear for me. any hints ? *installed pyodbc on docker container using alpine:latest image* apk add --no-cache python python-dev py-pip py-setuptools unzip wget openssl gcc build-base unixodbc-dev pip install pyodbc ... the rest of the code is jus

[web2py] how to use restapi for email verification

2018-02-07 Thread yogeshwar khalkar
My application is in angular 5 I want to write rest api in web2py to verify email on registration This is my register api @request.restful() def register(): def GET(**fields): user = auth.register_bare(**fields); del user['password'] return json(user.id) How can I wr

[web2py] Re: how to use restapi for email verification

2018-02-07 Thread Leonel Câmara
I haven't tried it but something like this should work since you can take @request.restful() def register(): def POST(**fields): return response.json(super(Auth, auth).register(**fields)) return locals() Do consider putting some kind of protection on this to avoid being spammed w

[web2py] Re: Yet Another Migration Problem

2018-02-07 Thread Leonel Câmara
You are using fake migrate. It thinks it has migrated but it hasn't and the column isn't on the DB. Remove the field in the table and do another fake migration. Then put the field back and do a real migration. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://g

[web2py] Re: Cookie issues in Safari 9

2018-02-07 Thread Lisandro
Hi there, were you able to solve this issue? I'm having the exact same problem. My application is designed to work in the main domain and in a particular subdomain. So, the login needs to be valid for both, main domain and subdomain. The code I run is exactly like yours. And it works perfectly i

[web2py] Bug with auth.settings.table_user_name and auth.signature?

2018-02-07 Thread Marvi Benedet
hello, I tried the code on bottom, where I changed the default auth_user table name and I used the "auth.signature' feature, but I get an error: ‘*Cannot resolve reference auth_user in tests definition*’ this happen only when a table contain "auth.signature". Debuggin a bit I found that when run

[web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Johann Spies
Version 2.16.1-stable+timestamp.2017.11.14.05.54.25 Traceback (most recent call last): File "/home/js/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) AttributeError: 'DAL' object has no attribute 'db' During handling of the above exception, another exception o

Re: [web2py] Problem with -L or --config= of command line

2018-02-07 Thread Richard Vézina
UP! On Wed, Jan 24, 2018 at 2:22 PM, Richard wrote: > Hello, > > I try to pass a logging.conf file as part of a crond tab job that is > launch, but the web2py command line option -L doesn't accept the > loggin.conf file... Is there any limitation over which type of > configuration file that are

Re: [web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Richard Vézina
Do you make a module function call without passing the db to it?? Richard On Wed, Feb 7, 2018 at 8:42 AM, Johann Spies wrote: > Version 2.16.1-stable+timestamp.2017.11.14.05.54.25 > > > Traceback (most recent call last): > File "/home/js/web2py/gluon/restricted.py", line 219, in restricted >

Re: [web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Johann Spies
No. Regards Johann On 7 February 2018 at 16:10, Richard Vézina wrote: > Do you make a module function call without passing the db to it?? > > Richard > > On Wed, Feb 7, 2018 at 8:42 AM, Johann Spies wrote: >> >> Version 2.16.1-stable+timestamp.2017.11.14.05.54.25 >> >> >> Traceback (most recent

Re: [web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Richard Vézina
You define table into za_arts_and_reviews()?? If you it may occurs that this controller is call before db.py where you define your db connection... Richard On Wed, Feb 7, 2018 at 9:18 AM, Johann Spies wrote: > No. > > Regards > Johann > > On 7 February 2018 at 16:10, Richard Vézina > wrote: >

[web2py] Re: Bug with auth.settings.table_user_name and auth.signature?

2018-02-07 Thread Leonel Câmara
This is sort of a bug, but one that is probably kept for backwards compatibility reasons. You can make your example code work by doing this: auth = Auth(db, host_names=configuration.get('host.names'), signature=False) auth.settings.table_user_name = 'users' auth.define_tables(username=False,

[web2py] Ajax encoding problem

2018-02-07 Thread icodk
probably not a web2py issue but may be someone can help: I have a string field containing the string 'TØM', all works fine in pure web2py. When I try to read it dynamically with ajax I get the string 'T\xc3\x98ST' The ajax call is as following: $.ajax({ type: "POST", url: "/shop/a

[web2py] Re: Downloading ALL images in a table at once

2018-02-07 Thread mostwanted
Thank you Jim, I'll try it out but i think JavaScript may just be my way out like you said but I'll give your solution a try, thanks. On Wednesday, February 7, 2018 at 12:53:12 AM UTC+2, Jim S wrote: > > Based on my experience and simple web protocols, you can't do what you > want. You could ho

[web2py] web2py_osx.zip seems way out of date ???

2018-02-07 Thread 'jim kaubisch' via web2py-users
Hi, I needed to directed my attention away from my web2py project a few months ago but am now trying to get back into it. A wise Step 1 would seem to be to update from 2.14.6 to the current version (2.16.1 I assume). First tried from source but got Traceback (most recent call last): File

[web2py] code written by Massimo Di Pierro in the web2py video tutorial

2018-02-07 Thread Andrea Fae'
Hello, it would be a great thing to have a document with the code written by Massimo in the video tutorials... thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repo

[web2py] Re: Yet Another Migration Problem

2018-02-07 Thread Dave S
On Wednesday, February 7, 2018 at 4:05:17 AM UTC-8, Leonel Câmara wrote: > > You are using fake migrate. It thinks it has migrated but it hasn't and > the column isn't on the DB. Remove the field in the table and do another > fake migration. Then put the field back and do a real migration. > A

Re: [web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Dave S
On Wednesday, February 7, 2018 at 6:23:55 AM UTC-8, Richard wrote: > > You define table into za_arts_and_reviews()?? > > If you it may occurs that this controller is call before db.py where you > define your db connection... > I thought web2py always ran the model files before calling the contr

[web2py] Re: Yet Another Migration Problem

2018-02-07 Thread Leonel Câmara
Hummm you're right, can I see the code for default/sorted and the quartermaster table? -- 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] I need to run web2py on ubuntu 16.04 as daemon service... I'm new...

2018-02-07 Thread Yoel Baez
Hi everybody, Someone has a tutorial to run web2py as daemon service... I tried everything and it does not work for me Regards, Yoel Baez -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

[web2py] Re: I need to run web2py on ubuntu 16.04 as daemon service... I'm new...

2018-02-07 Thread Leonel Câmara
Do you mean the web2py scheduler? Using sudo or as root create a file yourapp-scheduler.service in /etc/systemd/system and put this there: [Unit] Description=Your App Scheduler Service [Service] ExecStart=/usr/bin/python /home/www-data/web2pydir/web2py.py -K yourapp Type=simple [Install] Want

[web2py] Problem with cookies shared through multiple domains and multiple apps

2018-02-07 Thread Lisandro
Hi there! I'm having this issue I would like to share with you, I hope to find a solution. *This is the scenario*: - Two different apps, let's call them *development* and *development_panel* * - *Both apps uses the *same model* (shared through symlinks) - *development* app is served at *develo

[web2py] Re: web2py_osx.zip seems way out of date ???

2018-02-07 Thread 'jim kaubisch' via web2py-users
Just to clarify, the web2py.app file in the "mac_osx.zip" is the one that looks to be out of date On Wednesday, February 7, 2018 at 10:47:19 AM UTC-8, jim kaubisch wrote: > > Hi, > > I needed to directed my attention away from my web2py project a few months > ago but am now trying to get back in

[web2py] web2py custom form 'TypeError'

2018-02-07 Thread F.C.
I have created a custom web2py form to allow the user to edit a current record. However when the user submit the record update I receive the following error message: list indices must be integers or slices, not str What am I missing? Here is an excerpt from the appliance I am building Model

Re: [web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Johann Spies
On 7 February 2018 at 22:14, Dave S wrote: > > > I thought web2py always ran the model files before calling the controller > function, > part of the overhead of each call (and the reason for lazy tables and tables > defined in modules). > > Johann, is this function in the file named in the traceba

Re: [web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Johann Spies
Apologies for waisting your time. The new day has opened my eyes. I had a db.db.sometable (result of a manual copy and paste) later on in the function which caused this db-problem. There is still another problem but I will first try and out what is going on here. Thanks for your attention to h

[web2py] Re: Yet Another Migration Problem

2018-02-07 Thread Dave S
On Wednesday, February 7, 2018 at 2:08:23 PM UTC-8, Leonel Câmara wrote: > > Hummm you're right, can I see the code for default/sorted and the > quartermaster table? > db.define_table('QuarterMaster', Field('IssueYr', 'integer', requires = [IS_NOT_EMPTY(),

[web2py] Re: Yet Another Migration Problem

2018-02-07 Thread Dave S
On Wednesday, February 7, 2018 at 11:09:09 PM UTC-8, Dave S wrote: > > > > On Wednesday, February 7, 2018 at 2:08:23 PM UTC-8, Leonel Câmara wrote: >> >> Hummm you're right, can I see the code for default/sorted and the >> quartermaster table? >> > > > db.define_table('QuarterMaster', >

[web2py] Re: Yet Another Migration Problem

2018-02-07 Thread Dave S
On Wednesday, February 7, 2018 at 12:02:41 PM UTC-8, Dave S wrote: > > I did not try renaming the copied table files to have no hash. > > Now I have, and it doesn't seem to have made a difference. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github

Re: [web2py] 'DAL' object has no attribute 'db'

2018-02-07 Thread Dave S
On Wednesday, February 7, 2018 at 10:52:11 PM UTC-8, Johann Spies wrote: > > Apologies for waisting your time. The new day has opened my eyes. I > had a db.db.sometable (result of a manual copy and paste) later on in > the function which caused this db-problem. > > There is still another pr