Re: [web2py] Re: Custom Delimiters Broken in 2.18.1?

2019-03-02 Thread Massimo Di Pierro
thanks for confirming

On Tuesday, 26 February 2019 05:26:49 UTC-8, Tiago Alves wrote:
>
> I am using custom delimiters, all working fine...
>
> On 26 Feb 2019, at 13:24, Kevin Keller  wrote:
>
> Saw a 2.18.2 commit.
> Was that addressed in thst commit?
>
> Thanks!
>
>
>
> On Mon, 25 Feb 2019, 06:08 Massimo Di Pierro,  
> wrote:
>
>> Damn you are right. I am releasing 2.18.2 with a fix.
>>
>> On Sunday, 24 February 2019 18:31:27 UTC-8, Limedrop wrote:
>>>
>>>
>>> Hi there,
>>>
>>> I think the custom template delimiters are broken in 2.18.1.  Here's my 
>>> test code and the exception I'm getting:
>>>
>>>
>>> CONTROLLER
>>> def index():
>>> response.delimiters = ('') 
>>> return dict(message=T('Welcome!'))
>>> 
>>> VIEW - index.html
>>> {{extend 'layout.html'}}
>>>  Note that each column needs at least {{minCards}} 
>>> cards.
>>>
>>> EXCEPTION 
>>> File "\web2py2.18.1\web2py\gluon\restricted.py", line 230, in restricted
>>> sys.excepthook(etype, evalue, tb) File 
>>> "c:\Users\Playtech\Documents\Development\web2py2.18.1\web2py\applications\app\views\default\index.html",
>>>  
>>> line 2, in 
>>> NameError: name 'minCards' is not defined
>>>
>>>
>>> Or have I done something wrong?
>>>
>>> Thanks
>>>
>>> -- 
>> 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-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> 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-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web2py version 2.18.2 Communications Error when in Admin.

2019-03-02 Thread Ricardo Antonio Zarco
The same, I was using python 2.7.5 In my case was the main.py in gluon. The 
urllib_quote is not recognized, i change by urllib2.quote

El martes, 26 de febrero de 2019, 19:25:32 (UTC+1), John McMaster escribió:
>
> Just installed web2py version 2.18.2 and now I get a communications error 
> when I save changes in an app.
>
> I get nothing in the error logs. 
>
> The apps run but when I go to edit them and click the save button at the 
> top of the lefthand page I  get a red communications error in the field to 
> the right of "Last saved on:"  <<< here that looks like this:
> Save file: [save disk icon] Saved file hash:  Last saved on:  toggle 
> breakpoint
>
>
> I have restarted the uwsgi and checked the logs only to see that all has 
> run cleanly.  I was getting a message that "probable another instance of 
> uWSGI is running on the same address (127.0.0.1:9) where 9 is the 
> port number assigned.
> I killed all instances and restarted the uWSGI and all is clean.
>
> However I still get an comunications error.
>
> Any ideas as to where to look for issues / configuration problems?
>
> 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 (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Communication Error when Saving

2019-03-02 Thread Ricardo Antonio Zarco
Hi,after upgrade to 2.18.2 i get the "Comunnicate error" when saving using 
web browser/admin , the exception is:

Versión
web2py™ Version 2.18.2-stable+timestamp.2019.02.26.06.11.06
Python Python 2.7.5: /usr/bin/uwsgi (prefix: /usr)Rastreo

1.
2.
3.
4.
5.

Traceback (most recent call last):
  File "/home/ec2-user/myapp/gluon/main.py", line 488, in wsgibase
urllib_quote(xmlescape(response.flash).replace(b'\n', b''))
NameError: global name 'urllib_quote' is not defined

Error snapshot [image: help] 


(global name 'urllib_quote' is not defined)



I think is a problem with de python 3 compatability what can i do? I need 
to update my python version? Thanks

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] how to get username in view html

2019-03-02 Thread Prashant PaciFire
I'm a newbie in Web domain and in Web2Py. A small app I'm working on has 
following codes:



ID
Title
For New?
Date Created
Posted by

{{for row in rows:}}

{{=A(row.id, _href=URL('show', args=row.id))}}
{{=A(row.title, _href=URL('show', args=row.id))}}
{{if row.forNew:}}Yes{{else:}}No{{pass}}
{{=row.created_on}}
{{=row.created_by}}

{{pass}}



The 'row.created_by' is actually a field, with following specification:
  Field('created_by', 'reference auth_user'
, default=auth.user_id
, update=auth.user_id
, writable=False
, readable=False
)

*The View shows 'user_id', whereas I want to show the 'user-name'.*
*How can I do that?*

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 (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Displaying Uploaded PDF Documents

2019-03-02 Thread mostwanted
I apologize for that oversight, i fixed my controller to:
def viewer():
row = db(db.pdfs.id==request.args(0)).select(db.pdfs.fileS).first()
redirect(URL('static','pdfs',args=row.fileS))

I figured out my mistake, i didnt have a function that called the database 
details so my link had an args argumente

On Friday, March 1, 2019 at 2:51:18 PM UTC+2, Chris V. wrote:
>
> Your model says:
> db.define_table('*pdfs')*
>
> And you controller points to another table (db.*pdfDocs)*
>
> Your controller should be 
>
> *CONTROLLER CODE*
> def viewer():
> row = db(db.*pdfs*.id 
> ==request.args(0)).select(db.*pdfs*.fileS).first()
> redirect(URL('static','pdfs',args=row.fileS))
>
>  
> Cheers.
> Chris.
>
> El vie., 1 de mar. de 2019 09:40, mostwanted  > escribió:
>
>> I am attempting Bruno's above code to display the saved PDF, i have 
>> created a link in my index page that takes me to the viewer page but when i 
>> click it i get an error message below:
>>
>>  'NoneType' object has no attribute 
>> 'fileS'
>> * MODEL CODE:*
>>
>> db.define_table('pdfs',
>> 
>> Field('fileS','upload',uploadfolder=request.folder+'static/pdfs'))
>>
>>
>> *CONTROLLER CODE*
>> def viewer():
>> row = db(db.pdfDocs.id
>> ==request.args(0)).select(db.pdfDocs.fileS).first()
>> redirect(URL('static','pdfs',args=row.fileS))
>>
>>  
>> *VIEW CODE (index)*
>>
>>
>>
>>
>> *{{extend 'layout.html'}}{{=A('Click to view', _href=URL('default', 
>> 'viewer'))}}*I changed the 'file' variable because it said its an  "ALL" 
>> reserved SQL/NOSQL keyword
>> What can i do to make this link redirect me without an error i'm getting??
>>
>> Regards;
>>
>> Mostwanted
>>
>> On Tuesday, December 14, 2010 at 6:57:05 PM UTC+2, rochacbruno wrote:
>>>
>>> For security reasons, web2py does not expose the 'uploads' folder to the 
>>> user, this folder can be accessed only by the 'download' function.
>>>
>>> You can do that:
>>>
>>> change the upload folder with 'uploadfolder' parameter.
>>>
>>> 
>>> db.define_table('pdfs',
>>>
>>> Field('file','upload',uploadfolder=request.folder+'static/pdfs')
>>>)
>>> 
>>>
>>> Create a viewer function wich redirects the user direct to the file, 
>>> then, if the user has adobe acrobat plugin to view the file in browser, 
>>> this file will be shown in the browser, else, will be downloaded.
>>>
>>> 
>>> def viewer():
>>> row = db(db.pdfs.id==request.args(0)).select(db.pdfs.file).first()
>>> redirect(URL('static','pdfs',args=row.file))
>>> 
>>>
>>> Now you can call this as:
>>>
>>> http://127.0.0.1:8000/pdfs/default/viewer/3 #record id
>>>
>>> which redirects the user to:
>>>
>>> http://127.0.0.1:8000/pdfs/static/pdfs/pdfs.file.aaf5d3f7779841d0.6e65775f64616c5f68656c702e706466.pdf
>>>
>>>
>>> -- 
>>>
>>> Bruno Rocha
>>> http://about.me/rochacbruno/bio
>>>
>>>
>>> 2010/12/14 azarkowsky 
>>>
 In my web2py application I'm allowing users to upload PDF documents
 (via an upload field) and then on another page I provide a download
 link, however, I think because of the file renaming security feature
 these PDF documents are truly being downloaded again (saved locally to
 each user's desktop) instead of just displayed in a new browser window
 as is the case with most other PDFs I encounter on other websites.  Is
 there any way to provide a link directly to a file that was uploaded
 so the browser can display it without having to download the file
 again?

 Thanks,
 Adam
>>>
>>>
>>>
>>>
>>>
>>> -- 
>> 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-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2019-03-02 Thread Kevin Keller
Tried to fix it in gluon/html.py and gluon/tools.py but can't fix it

Would appreciate some help. 

It's minor but super annoying. 

I also see a big T in front of table names when using app creation wizard. 

Fixed it by renaming the table name labels manually. 

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Fresh install - ImportError: cannot import name Cookie

2019-03-02 Thread Marcelo Huerta
El jueves, 28 de febrero de 2019, 18:55:13 (UTC-3), Leonel Câmara escribió:
>
> Most of compat stuff got moved to pydal but the version in the release 
> doesn't have the version with the pydal with the compat stuff there.
>


 It's the latest pydal supposed to have the moved components? Because I 
just updated it and I got the same error.

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Error importing csv file in python3.6

2019-03-02 Thread Maurice Waka
"xml() in python 3.6 · Issue #2096 · web2py/web2py"
https://github.com/web2py/web2py/issues/2096

On Sat, 2 Mar 2019, 14:19 Kevin Keller  wrote:

> There an issue filed on github already?
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/t2SEQC9o-ic/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-02 Thread Kevin Keller
Could you make sure that your solutiona are reflected in the github tickets for 
export and import problems please?

Sure that would make it easier for Massimo to fix and merge the fixes for 2.18.3

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Error importing csv file in python3.6

2019-03-02 Thread Kevin Keller
There an issue filed on github already? 

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: dict values error in python 3.6

2019-03-02 Thread Kevin Keller
Can someone file an issue on github and also attach the solution please? Thanks 

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.