[web2py] Re: upload - can I get the path to original file

2019-10-07 Thread Dave S
On Friday, October 4, 2019 at 12:07:06 PM UTC-7, jim kaubisch wrote: > > Hi > > In a file upload, I want to store both the original filename AND the path > to the original file (to cover the case of files with the same name but > from different folders) > I'm successfully getting the filename

[web2py] auth_membership grid with both, group id and group roles displayed when adding a new record

2019-10-07 Thread Vlad
the following line works perfectly: grid = SQLFORM.grid(db.auth_membership) by "perfect" in the context, I mean that when I click "add record", the group id field contains both values, group id and group role (for example, "Manager (4)", "Loyal customer (9)", ... However, I want to limit

[web2py] Re: Db Creation Error Message : Adapter not found for sqLite

2019-10-07 Thread Dave S
On Saturday, September 28, 2019 at 11:30:07 AM UTC-7, dangeo wrote: > > Hello to All, > > I new to the web2py platform particularly and web development in general. > Using the web2py book (page 91) as a learning guide i'm recreating the > image blog exercise. However, after creation I'm

[web2py] Re: How to use scheduler in modules ?

2019-10-07 Thread Dave S
On Friday, October 4, 2019 at 3:10:46 AM UTC-7, Ruslan Gareev wrote: > > Hi. It is not necessary to have task_add in same file, where scheduler > initialiazed. Your solution with "current" is right. Add tasks and queue > them anywhere! > > Which can look something like this def modfuncx(u,

[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread Dave S
On Saturday, October 5, 2019 at 9:41:47 AM UTC-7, dirman wrote: > > i really need help on this > > On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman wrote: >> >> 'utf8' codec can't decode byte >> 0xb7 in position 0: invalid start byte >> >> Getting the above error as thumbnails are not

[web2py] Re: auth_membership grid with both, group id and group roles displayed when adding a new record

2019-10-07 Thread villas
By specifying requires = IS_IN_SET(ids), you are also overriding the represent too. See below, I hope it will point you in the right direction: mygroupdict = {1:'Public',2:'Private',3:'Admin'} db.auth_membership.group_id.requires = IS_IN_SET(mygroupdict,zero=None))

[web2py] How do I configure reading text for all images using Hide/Readmore code?

2019-10-07 Thread Maurice Waka
I have a view page that works well except for a readmore/hide section and some text positioning. This is the code: {{extend 'layout.html'}} #example { background: white; height: 0px; overflow: hidden; transition: height 2s; -moz-transition: height 2s; /* Firefox 4 */

[web2py] Re: auth_membership grid with both, group id and group roles displayed when adding a new record

2019-10-07 Thread 'Annet' via web2py-users
Use IS_IN_DB() ids = [1,3,5] > db.auth_membership.group_id.requires = IS_IN_DB(db(db.auth_group.id.belongs(ids)), 'auth_group.id', '%(role)s') Best, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] How to use T in layout.html in Py4web?

2019-10-07 Thread Ruslan Gareev
Using T in Layout.html is make me to copy-paste code from common.py to layout.html [[from py4web import Translator]] [[from ..settings import T_FOLDER]] [[T = Translator(T_FOLDER)]] some code ... [[=T('Sign in')]] ... How to make that no repeat code? -- Resources: - http://web2py.com -

[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
On Wednesday, October 2, 2019 at 11:15:37 AM UTC+1, dirman wrote: > > 'utf8' codec can't decode byte 0xb7 > in position 0: invalid start byte > > Getting the above error as thumbnails are not showing. what could be the > issue? > -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
The Dropzone app in web2py appliances link https://github.com/mdipierro/web2py-appliances/tree/master/DropZone On Saturday, October 5, 2019 at 5:41:47 PM UTC+1, dirman wrote: > > i really need help on this > > On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman wrote: >> >> 'utf8' codec

[web2py] Re: How do I configure reading text for all images using Hide/Readmore code?

2019-10-07 Thread villas
The HTML elements in your loop should be given *unique *ids and then you can address them individually. *Also, optionally...* I would advise you to only access your DB in the controller, (rather than the view). Create a list (or even 2 lists) containing your image links and associated data.

Re: [web2py] Re: How do I configure reading text for all images using Hide/Readmore code?

2019-10-07 Thread Maurice Waka
Thanks for the reply. I have a controller for this view already. My biggest issue is the way to display the image and message. Do you have an example of how I can do it? Regards On Mon, 7 Oct 2019, 18:09 villas wrote: > The HTML elements in your loop should be given *unique *ids and then you >

[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
https://github.com/mdipierro/web2py-appliances/tree/master/DropZone On Monday, October 7, 2019 at 8:11:52 AM UTC+1, Dave S wrote: > > > > On Saturday, October 5, 2019 at 9:41:47 AM UTC-7, dirman wrote: >> >> i really need help on this >> >> On Wednesday, October 2, 2019 at 10:15:37 AM UTC, dirman

[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
'utf8' codec can't decode byte 0xa0 in position 0: invalid start byteVersion web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 Python Python 2.7.12: /usr/local/bin/uwsgi (prefix: /usr)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Traceback (most

[web2py] Re: Dropzone app thumbnail error in web2py appliances

2019-10-07 Thread dirman
'utf8' codec can't decode byte 0xa0 in position 0: invalid start byteVersion web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 Python Python 2.7.12: /usr/local/bin/uwsgi (prefix: /usr)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Traceback (most

[web2py] Re: xmlrpc python3 error

2019-10-07 Thread Mark
I submitted the bug report to the github. Thank you very much. On Sunday, October 6, 2019 at 5:29:31 PM UTC-4, Dave S wrote: > > > > On Friday, September 27, 2019 at 6:39:00 AM UTC-7, Mark wrote: >> >> I am using either Rocket or Azure, and get the same error. >> >> Yes, there is a ticket,

[web2py] Re: auth_membership grid with both, group id and group roles displayed when adding a new record

2019-10-07 Thread Vlad
I don't fully understand it - will play with it to figure it out. Annet's suggestion worked right away, but still I really want to understand what's going on... thank you! On Monday, October 7, 2019 at 6:38:24 AM UTC-4, villas wrote: > > By specifying requires = IS_IN_SET(ids), you are also

[web2py] Re: auth_membership grid with both, group id and group roles displayed when adding a new record

2019-10-07 Thread Vlad
thank you very much! works like a charm! On Monday, October 7, 2019 at 6:36:02 AM UTC-4, Annet wrote: > > Use IS_IN_DB() > >ids = [1,3,5] >> > > > db.auth_membership.group_id.requires = > IS_IN_DB(db(db.auth_group.id.belongs(ids)), 'auth_group.id', '%(role)s') > > > Best, > > Annet > --