[web2py] Re: Trying to use Field.represent for 'blob' type in SQLFORM.grid (works in appadmin?)

2018-02-18 Thread mweissen
I have tried 

form = SQLFORM.grid(db.qr_info,
 showblob=True, 
)

and I got:
 grid() got an unexpected keyword argument 
'showblob'
What is wrong?

Version 

2.16.1-stable+timestamp.2017.11.14.05.54.25
(läuft auf nginx/1.10.0, Python 2.7.12) 


Am Montag, 20. März 2017 19:52:53 UTC+1 schrieb Jordan Myers:
>
> Hello,
>
> I am trying to display a Field that has type 'blob' in a SQLFORM.grid. The 
> data is NOT user-uploaded, thus I cannot use the typical uploadfield + 
> request.download pattern. I am using blob because I need to store important 
> algorithm-generated data that is too large to fit in the 'text' field type. 
> I would like it to display a link to a handler.
>
> I tried a simple test case model
>
>
> db.define_table('blob_test',
> Field('blob_field', 'blob', readable=True,
>   represent=lambda value, row: A('link', 
> _href=URL('handler', args=[row.id]))
>   )
> )
>
>
> #and in the controller:
>
> def blob_grid():
> response.view = 'generic.html'
> grid = SQLFORM.grid(db.blob_test.id > 0)
> return dict(grid=grid)
>
>
> The result is that the controller does not display the link, and indeed the 
> entire column is overtaken by the default view/edit/delete buttons provided 
> by grid.
>
>
> 
>
>
> Interestingly, the appadmin display of the table does have the represent link 
> as intended. 
>
>
> 
>
>
>
>
> How can I have this representation work for SQLFORM.grid? 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] Re: Python Social Auth - example site working with downlevel version of PSA

2016-11-05 Thread mweissen
It is a very interesting project. Are there any news?

Am Freitag, 24. Juni 2016 00:45:51 UTC+2 schrieb Donald McClymont:
>
> Just a further note that following some further updating I can login via 
> Facebook, Twitter, Google (using Mozilla Persona) and Microsoft accounts. 
>  There is a test site at https://www.netdecisionmaking.com/w2ppsatest if 
> anyone wants to take a look without setting up themselves.  I am not really 
> planning to do much more with this unless there are issues or suggestions 
> on what needs done next.
>
> Regards
> Donald
>
> On Friday, June 10, 2016 at 9:49:05 PM UTC+1, Donald McClymont wrote:
>>
>> I have now forked and pruned w2p-social-auth at the following:  
>> https://github.com/DonaldMcC/w2p-social-auth  basically only two changes 
>> of substance:
>>
>> 1 It now uses appconfig to store the keys in so you will need to be on a 
>> fairly recent web2py if you want to use this approach - alternatively just 
>> put the keys directly into db.py but this obviously isn't a best practice 
>> with github for sharing code.
>> 2 I have removed the version of python social auth - I think 0.1.24 which 
>> was included in previous file which means a lot less code - as far as I can 
>> tell this was unmodified however it was not best if the plugin was 
>> importing from their and internal imports within PSA were from the 
>> installed version of that I had installed as a python package.
>>
>> Having done the above - I have successfully completed a basic login with 
>> the revised plugin and PSA 0.2.19 which is the latest version use Mozilla 
>> Persona as the provider - I will need to move it onto an actual site rather 
>> than localhost to test a few other providers but that will be next week at 
>> the earliest and I still have a very limited knowledge of Auth, PSA or the 
>> actual code in the plug-in - so it would be good if people that do could 
>> perhaps chip-in with suggestions on where this should be heading and how it 
>> should be properly tested that would be appreciated.
>>
>> Donald
>>
>> On Monday, June 6, 2016 at 10:43:18 PM UTC+1, Donald McClymont wrote:
>>>
>>> Sounds good - possibly worth trying to contact someone on the psa team 
>>> as well.  I think we need to decide whether an updated plug-in is the best 
>>> way to go or whether this should be a core part of either PSA or web2py. 
>>>  The plug-in may be the quickest way forward but it might well be better to 
>>> go another route as it reduces the risk of being back in the same situation 
>>> we have now where changes in PSA mean the plug-in doesn't work with latest 
>>> versions.
>>>
>>> There was some previous dialogue on wihether python social auth or 
>>> authomatic was the better approach and that did seem to come down in favour 
>>> of PSA because authomatic was no longer being maintained. 
>>>
>>> Donald
>>>
>>> On Monday, June 6, 2016 at 12:30:29 AM UTC+1, Joe Barnhart wrote:

 Well I don't know about OAuth or auth-social, but I know web2py auth 
 and I know python pretty well.  I'll do a little reading on the whole 
 concept of social-auth and see if I can dig up more resources, like maybe 
 the author of w2p-social-auth.  If worse comes to worst, I can get some 
 help from Massimo.  I think a social auth plug-in that works really well 
 would be not only useful, but essential to web2py at this point.

 -- Joe


 On Sunday, June 5, 2016 at 3:08:23 PM UTC-7, Donald McClymont wrote:
>
> I would really like some progress on this - however I have extremely 
> limited knowledge of both auth and Python Social Auth so was rather 
> hoping 
> someone that did might develop this in a better manner than I am likely 
> to 
> do..  I did briefly attempt to update what I have but quickly came to the 
> conclusion it was not straightforward.  However I may have some time to 
> look at in a bit more detail in the next few weeks.
>
> Regards
> Donald
>
> On Sunday, June 5, 2016 at 1:20:38 AM UTC+1, Joe Barnhart wrote:
>>
>> Hi Donald --
>>
>> I find I need this too. The more recent version of social auth should 
>> handle Google authentication in addition to Facebook and Twitter.  I 
>> need 
>> these three in addition to web2py logon for my application. Have you 
>> seen 
>> any progress on this front?  We may have to collaborate and do it 
>> ourselves.
>>
>> -- Joe
>>
>> On Monday, March 7, 2016 at 3:26:34 PM UTC-8, Donald McClymont wrote:
>>>
>>> I am sharing  an example site http://www.netdecisionmaking.com that 
>>> uses Python Social Auth for authentication, based on the following code 
>>> and 
>>>
>>> https://github.com/omab/python-social-auth and the web2py 
>>> integration developed at https://github.com/bnmnetp/w2p-social-auth 
>>> 
>>>
>>> This works basically 

[web2py] Re: An error occured, please reload the page

2016-08-22 Thread mweissen
What I have done:

db.define_tabel("mytable", Field("message"))

"message" is not allowed as name for a field and I get "An error occured, 
please reload the page"

Now I reload db.py and I want to change "message" to "mymessage". But I 
cann't: the error message appears faster than I could edit db.py.
Next step: I want to change the layout file ("ajax_error..."). No chance, 
same problem - the error message is faster!

Yes. I can use an external editor. But what I want to know: how can I 
change my program using only web2py? Seem that I have to delete my 
application :-(


Am Sonntag, 19. Juli 2015 12:40:53 UTC+2 schrieb Annet:
>
> After upgrading to web2py version 2.10.4 I sometimes get a flash message:
> "An error occured, please reload the page"
>
> This also happens when editing the appconfig.ini file, even though
> the appconfig.ini file does not contain an error.
>
> Since the message doesn't give me any information as to why the
> error occured, and which file contains the error, I don't see the
> point of this flash message.
>
> What is the use of this message?
>
>
> Kind regards,
>
> Annet
>

-- 
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: Bootstrap3 package - help to test

2014-06-01 Thread mweissen
Hi. I have just this thread - looks very good. I want to test and to use 
it. Could you please tell me: where is the last version for download?

Am Freitag, 9. Mai 2014 23:46:48 UTC+2 schrieb pjryan126:

 I'm using this in a project now and I even have it working on IE 8. 
 Thanks, Paolo!

 The only thing I have had to do so far is to add li_active='active' to 
 bs3.menu():

 menu = MENU(current_menu,
 _class='nav %s' % menu_class,
 li_active='active',
 li_class='dropdown',
 ul_class='dropdown-menu')


 On Monday, December 23, 2013 3:20:48 PM UTC-5, Paolo Caruccio wrote:

 I just completed a package that applies the bootstrap3 style to some 
 web2py elements - the current version covers the navigation menus, the auth 
 navbar and SQLFORMs (via formstyle) - but I need your help for testing it.

 The package includes the following files:

  - bootstrap3.py
  - web2py-bootstrap3.css
  - web2py-bootstrap3.js
  - example of layout.html
  - a readme file containing the istallation and usage instructions
  - license (please report if the license is right for a future inclusion 
 in web2py)

 Here attached some screenshots and a web2py app with examples. 

 Thank you in advance for your feedbacks, suggestions for optimizing the 
 code and any additions and everything else useful to improve the package.

 Marry Christmas. 







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