[web2py] Re: no-email edit in profile

2018-12-19 Thread Simon Riek
Thanks Leonel, very helpful for my next application.
 
In my current production applications I have no user self registration, 
therefor it is sufficient for me to make the email field writable again 
(though I wouldn't edit gluon/tools.py, instead I used my own derived Auth 
class with a custom profile-function...I don't like messing around in the 
web2py core, it could break on the next update). 

-- 
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] no-email edit in profile

2018-12-14 Thread Simon Riek
Hello everyone,

i recently updated from 2.16.x to 2.17.2.

A commit in April introduced "table_user['email'].writable = False" into 
the profile form of Auth.

Since I need the email to be editable I have to implement my own profile 
form just for this single line. 

Wouldn't it make sense to control this via settings? 
e.g "self.settings.email_field_writable" (with default = false?

Or am I missing something?

Best regards

Simon



-- 
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] Problem with Grid Exporter since upgrade from 2.14.6 to 2.15.2 / 2.15.3

2017-08-07 Thread Simon Riek
Since updating from 2.14.6 to 2.15.2 (and also 2.15.3 released just moments 
ago) I have some problems with the default ExportClasses in SQLFORM.grid.
I am using MSSQL as database.
The grid displays just fine, only the export failed.

I'll spare you the complete traceback and get directly to what I could find 
by implementing my own ExportClass.

At first I got a , the relevant traceback 
was:

File "C:\Users\riek\PycharmProjects\web2py\gluon\sqlhtml.py", line 3563, in 
represented
row.append(record._extra[col])

I didn't use any type _extra fields, meaning that the regex check in line 
3562 failed (self.rows.db._adapter.REGEX_TABLE_DOT_FIELD.match(col)).

I then overwrote the "represented"-Function with my own, ignoring this 
check and forcing the else-branch. 

This lead to the following exception:  
'DAL' object has no attribute '"t_schule"'. So my tables and fields are 
escaped and thus not found.

I tried a solution I found somewhere else, setting entity_quoting=False in 
my DAL-instance, to no avail.

I then searched some more and found this bugfix: 
https://github.com/web2py/web2py/issues/1542
It appears that this fix escapes the tables and fields, no matter 
if entity_quoting is enabled or not.

I could solve my particular problem with an ugly hack, by removing the 
quotes in the represent-function of my ExportClass (line 3565 in 
sqlhtml.py: *(t, f) = col.replace('"','').split('.') * instead of *(t, f) = 
col.split('.')) *
I am wondering though if this is a bug or I am not properly understanding 
how the escaping works.




-- 
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.