[web2py] Re: upload and download, in order to manage attached files

2017-05-18 Thread J-Michel Angers
Thank you Dave for your advices ! You're right, I didn't look at the "download" function, and I didn't change it. I've done this now : (1) I've removed the "auth" condition, and I change the db to dbW = the database for my app I also change the line in the view. New version of download : def

[web2py] Re: Define table but not add it to the database

2017-05-18 Thread Sundar
See https://www.sqlite.org/lang_attach.html solves your problem. Cheers. === On Tuesday, May 16, 2017 at 5:46:25 PM UTC+5:30, lyn2py wrote: > > Is there is a way to define a table without adding it to the sqlite > database? I wish to define a

[web2py] Re: cpython and web2py

2017-05-18 Thread Joe Barnhart
"Make it faster" is a nice goal, but it has many different components, and just compiling everything with cython is not an easy way out. The path to take, like with any software project, is to implement the function that you need first. If, and only if, there is a performance problem, you

[web2py] Deploying on hosted server with cpanel

2017-05-18 Thread Arthur Gilbert
I searched the forum for this and found nothing since 2010. Has anyone done it with success more recently. If so help would be appreciated. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Deploying on hosted server with cpanel

2017-05-18 Thread Áureo Dias Neto
i know this, it's from brazil https://www.kinghost.com.br/web2py -- 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 you

[web2py] Re: How do I troubleshoot this? (DAL)

2017-05-18 Thread lyn2py
I did as Anthony and Pierre suggested, first export to CSV, then remove all files from database/ folder, load web2py one time to create the right table names etc, then import data... but I ran into an error: File "../web2py/gluon/packages/dal/pydal/objects.py", line 947, in

[web2py] Re: table already exists; 'Rows' object has no attribute 'fields'

2017-05-18 Thread Remco Boerma
Thanks for that. It does introduce a new error: ValueError: Field student_record.request_tenant is already bound to a table The latest pydal as db._common_fields don't seem to get along. db._common_fields.append(auth.signature) db._common_fields.append(Field('request_tenant',

[web2py] Re: How do I troubleshoot this? (DAL)

2017-05-18 Thread lyn2py
If it helps, I tried to open the CSV file in a 3rd party reader and it comes up an error. I tried to look at in using a text editor, and I suspect in might be because I have "text" type fields that hold data containing double quotes. For example, something that looks like this in the DB: The

[web2py] Re: web2py.com is not responding

2017-05-18 Thread Massimo Di Pierro
My apologies. It will be back as soon as the DNS refreshes. The server is actually up and has always been: http://mdipierro.pythonanywhere.com/ but the IP has changed on the pythonanywhere side and I did not change the DNS record in time. As soon as the DNS change propagates the site will be

[web2py] Re: upload and download, in order to manage attached files

2017-05-18 Thread J-Michel Angers
One step more :-) Without changing the above code, it's working now. The change I've written ==> in the DAL, I had "db_codec='latin1' ". I just removed it for another reason, and it works now. ... And I understand now the link /default/download/ : it's / controlleur="default" /

[web2py] Codec MS-SQL, unicode Latin1 UTF8

2017-05-18 Thread J-Michel Angers
Hello, For my app, with data in SQL-Server 2012, I cannot have all letter correctly written. First, in SQL-Server, there are 2 types for storing a string : * char and varchar are string types with "old" charset, ie not uniccode, and dependant on the site. * nchar, nvarchar are string types

[web2py] web2py.com is not responding

2017-05-18 Thread Karoly Kantor
web2py.com is not responding! -- 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 you are subscribed to the Google Groups

[web2py] Re: How to execute a function in scheduler.py using command line

2017-05-18 Thread Dave S
On Thursday, May 18, 2017 at 12:02:02 PM UTC-7, icodk wrote: > > As I understand( might be wrong) what you suggest is to execute a function > in a controller > yes > but scheduler.py is not a controller and it is in the models folder > yes > I could QUEUE the function and run the

[web2py] Re: How do I troubleshoot this? (DAL)

2017-05-18 Thread 黄祥
pardon, might i know, how do you export and import *.csv? after, export the *.csv the best way is not touch or edit the contents, except you know what to do and what you use, sometimes when you edit or open it with spreadsheet like excel or libre/openoffice, when you close, it automatically

[web2py] Re: upload and download, in order to manage attached files

2017-05-18 Thread Dave S
On Thursday, May 18, 2017 at 8:42:40 AM UTC-7, J-Michel Angers wrote: > > One step more :-) > Without changing the above code, it's working now. > The change I've written ==> in the DAL, I had "db_codec='latin1' ". I > just removed it for another reason, and it works now. > ... And I

[web2py] Re: How to execute a function in scheduler.py using command line

2017-05-18 Thread Dave S
On Thursday, May 18, 2017 at 6:19:06 AM UTC-7, icodk wrote: > > For testing purposes I would like to execute a function in scheduler.py > using command line (better ideas are welcome) > I tried: > web2py.exe -S myapp/scheduler/dummy_task -M > > But got the following error > web2py Web

[web2py] Re: Codec MS-SQL, unicode Latin1 UTF8

2017-05-18 Thread Jose
Hi J-Michel Angers Given: pydal <-> pyodbc <-> UnixODBC <-> FreeTDS <-> MSSQL In freetds.conf I have: client charset = UTF-8 and in pydal I use mssql2 adapter, db_codec is not necessary Jose -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Codec MS-SQL, unicode Latin1 UTF8

2017-05-18 Thread Skiros
Hello J-Michel Angers I had have that problem and I dont remember how i fixed... jajaja what type of fields you are using ? nchar o char ? this determines what kind of connection need to use. There are a few options; mssql, mssql2, mssql3 and mssql4. If you are using nchar you need mssql2. In

[web2py] Re: How to execute a function in scheduler.py using command line

2017-05-18 Thread icodk
As I understand( might be wrong) what you suggest is to execute a function in a controller but scheduler.py is not a controller and it is in the models folder I could QUEUE the function and run the scheduler but it is cumbersome to wait for the scheduler and debugging is not the same I

[web2py] Re: PDF Download File Name

2017-05-18 Thread Dave S
On Tuesday, May 16, 2017 at 1:27:06 AM UTC-7, Paul Ellis wrote: > > Hello, > > I use pyfpdf to display some information from my my database. When I click > save the filename is 'pdf_view' which is the name of the controller > function. > > How can I change this? I want the name to also come

[web2py] jQuery Plugin Multi select

2017-05-18 Thread Winter Kryz
Hello everyone, I have my table like this, db.define_table('Document', Field('date','date'), Field('school','reference schoolNames'), Field('students','list:reference Students'), ) db.Document.students.requires =

[web2py] Re: web2py.com is not responding

2017-05-18 Thread Armando Hernandez
Thanks for the workaround! :) El jueves, 18 de mayo de 2017, 12:18:52 (UTC-5), Massimo Di Pierro escribió: > > My apologies. It will be back as soon as the DNS refreshes. The server is > actually up and has always been: http://mdipierro.pythonanywhere.com/ > but the IP has changed on the

[web2py] Re: How do I troubleshoot this? (DAL)

2017-05-18 Thread lyn2py
My code for exporting/importing is extracted from the book, it is simply: def export_db(): db.export_to_csv_file(open('db_dump.csv', 'wb')) return def import_db(): db.import_from_csv_file(open('db_dump.csv', 'rb')) return I just run the function and out comes the db_dump.csv I

[web2py] How to execute a function in scheduler.py using command line

2017-05-18 Thread icodk
For testing purposes I would like to execute a function in scheduler.py using command line (better ideas are welcome) I tried: web2py.exe -S myapp/scheduler/dummy_task -M But got the following error web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2017 Version

[web2py] Re: Define table but not add it to the database

2017-05-18 Thread lyn2py
Thanks Sundar, but attaching DBs don't allow me to reference the "attached" tables right? On Thursday, May 18, 2017 at 5:27:03 PM UTC+8, Sundar wrote: > > See https://www.sqlite.org/lang_attach.html solves your problem. > > Cheers. > === > > On

[web2py] Re: How do I troubleshoot this? (DAL)

2017-05-18 Thread lyn2py
Finally resolved the import. I added a line to File "../web2py/gluon/packages/dal/pydal/objects.py" csv.field_size_limit(500 * 1024 * 1024) and it worked! Hope that helped someone. On Friday, May 19, 2017 at 9:52:35 AM UTC+8, lyn2py wrote: > > My code for exporting/importing is extracted