[web2py] Re: How can I insert image in HTML from database?

2019-08-02 Thread Dave S
On Friday, August 2, 2019 at 8:33:33 AM UTC-7, Константин Комков wrote: > > What do you want to know? > tables.py > db.define_table( > 'recipes', > Field('NAME',length=512), > Field('IMAGE'), > migrate=False > ) > It's my database connection in db.py: > db = DAL('firebird://sysdba

[web2py] Re: Accessing some sum

2019-08-02 Thread Dave S
On Friday, August 2, 2019 at 10:17:27 AM UTC-7, Val K wrote: > > It is not a bug, as you probably know dal does not support fields aliases > and '_extra' is workaround. When do you get an error? Should it be considered a bug in the book? I'm not quite sure how aliases fit in ... does Postgres

[web2py] Accessing some sum

2019-08-02 Thread Val K
It is not a bug, as you probably know dal does not support fields aliases and '_extra' is workaround. When do you get an error? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

Re: [web2py] Re: How can I insert image in HTML from database?

2019-08-02 Thread Константин Комков
Didn't work, errors was like in my first message. I had tried it 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 becaus

Re: [web2py] Re: How can I insert image in HTML from database?

2019-08-02 Thread António Ramos
maybe -> Field('IMAGE', 'upload'), Em sex, 2 de ago de 2019 às 16:33, Константин Комков escreveu: > What do you want to know? > tables.py > db.define_table( > 'recipes', > Field('NAME',length=512), > Field('IMAGE'), > migrate=False > ) > It's my database connection in db.py: > d

[web2py] Re: How can I insert image in HTML from database?

2019-08-02 Thread Константин Комков
What do you want to know? tables.py db.define_table( 'recipes', Field('NAME',length=512), Field('IMAGE'), migrate=False ) It's my database connection in db.py: db = DAL('firebird://sysdba:masterkey@localhost/C:/HR.fdb', ignore_field_case=True, entity_quoting=False, pool_size=1, mig

[web2py] ASSIGNJS Decimals

2019-08-02 Thread villas
It would be great if ASSIGNJS would serialize Decimal numbers as Float rather then quoted Str. Unless I'm overlooking something, I suppose this would be a bug? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - ht

Re: [web2py] How can I insert image in HTML from database?

2019-08-02 Thread António Ramos
what is your model ? Em sex, 2 de ago de 2019 às 14:50, Константин Комков escreveu: > I do like that: > row = db().select(db.recipes.IMAGE).first() > image = '' > I get error: > Версия > web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 > Python Python 3.7.3: C:\Python\python.exe (pref

[web2py] How can I insert image in HTML from database?

2019-08-02 Thread Константин Комков
I do like that: row = db().select(db.recipes.IMAGE).first() image = '' I get error: Версия web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 Python Python 3.7.3: C:\Python\python.exe (prefix: C:\Python)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 2

[web2py] New questions about translation

2019-08-02 Thread Константин Комков
Messages in flash have uncorrect translate, like on picture 1. db.py if auth.user_id is not None: if auth.user.language is not None: if auth.user.language == 1: T.force('en') elif auth.user.language == 2: T.force('ru') else: T.force('ru') else

Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
Glad to have helped. Cheers, On Friday, 2 August 2019 09:40:05 UTC+1, Rahul wrote: > > Hi Jose, > Thank you !! That worked ... the point #4 resolved that issue. So > now no need to work with Apache and all is working well. Thanks a million!! > artpic.in and targetsoft.co.in work fine no

Re: [web2py] Re: Hosting question

2019-08-02 Thread Rahul Dhakate
Hi Jose, Thank you !! That worked ... the point #4 resolved that issue. So now no need to work with Apache and all is working well. Thanks a million!! artpic.in and targetsoft.co.in work fine now. Regards, Rahul On Fri, Aug 2, 2019 at 1:53 PM Jose C wrote: > Hi Rahul, > > ok,.. > 1) no

Re: [web2py] Re: Hosting question

2019-08-02 Thread Jose C
Hi Rahul, ok,.. 1) no the routes.examples.py files don't cause any problems. 4) Can you make sure that both *'www.domain.in': 'app1'* as well as *'domain.in': 'app1'* are specified in the domains key of the BASE dict? I would hope this finally resolves your issue. I don't have any experience

[web2py] EStore application not working

2019-08-02 Thread Saranya S
Downloaded *EStore appliance* from https://github.com/mdipierro/web2py-appliances/tree/master/EStore. When tried to run the application it's showing up * "Cannot resolve reference invoice in invoice_item definition".* I checked in the Model db1.py file and could not find table 'invoice', which

Re: [web2py] Re: Hosting question

2019-08-02 Thread Rahul Dhakate
Hi Jose, Thanks for getting back - I am using nano for editing routes.py in the live server, it isn't so friendly but gets the job done. Might be one of the reasons for my typo - Here are the answers to rest of the questions - 1) First of all, can you confirm this is a routes.py file in th

[web2py] Accessing some sum

2019-08-02 Thread Dave S
In the book, sum of selects is described as: Similarly, you can use the sum operator to add (sum) the values of a specific field from a group of records. As in the case of count, the result of a sum is retrieved via the storage object: >>> sum = db.log.severity.sum() >>> print db().select(sum).