Re: [web2py] web2py and py4web - single signon between the two

2020-11-11 Thread Martin Weissenboeck
Any news about this topic? Regards Martin Massimo Di Pierro schrieb am Mi., 15. Jän. 2020, 07:09: > yes. that is a priority. > > On Sunday, 5 January 2020 13:28:10 UTC-8, Carlos Cesar Caballero wrote: >> >> Maybe implementing a CAS server for py4web... But I am not sure right now >> what will

Re: [web2py] Use cron

2020-07-28 Thread Martin Weissenboeck
Thank you! Martin Jose C schrieb am Di., 28. Juli 2020, 10:53: > Just FYI, the web2py book states: > > Try to avoid web2py cron, and use a background process instead. web2py >> cron can start too many Python instances and cause excessive memory >> usage. >> > > Using scheduler means an addition

Re: [web2py] Use cron

2020-07-23 Thread Martin Weissenboeck
sy to setup and seems to work well. Is there a >>> reason you can't use it? >>> >>> On Thu, 23 Jul 2020, 1:53 pm Martin Weissenboeck, >>> wrote: >>> >>>> I use web2py with nginx.Now I need cron . I have read, that habe to use >>

Re: [web2py] Use cron

2020-07-23 Thread Martin Weissenboeck
. It was easy to setup and seems to work well. Is there a > reason you can't use it? > > On Thu, 23 Jul 2020, 1:53 pm Martin Weissenboeck, > wrote: > >> I use web2py with nginx.Now I need cron . I have read, that habe to use >> "-Y" to activate it. But where

[web2py] Use cron

2020-07-22 Thread Martin Weissenboeck
I use web2py with nginx.Now I need cron . I have read, that habe to use "-Y" to activate it. But where is the place for this option, which configuration file? Regards, Martin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] py4web: login and redirect to index

2020-02-15 Thread Martin Weissenboeck
Next question: I have added a new function to controllers.py: @authenticated() def index*1*(): user = auth.get_user() message = T("Hello *1*{first_name}".format(**user)) return dict(message=message, user=user) A call of 127.0.0.1:8000/myapp/index*1* requires a login. Ok, that is the

[web2py] py4web dashboard: username and password

2020-02-15 Thread Martin Weissenboeck
I have created an app "myapp" with the user - Username: john - Email: john@example.com - Password: 123 - First name: John - Last name: Doe (1) Change username: Now I want to change the username to "johndoe" Dashboard headline "App: myapp Database: db Table: auth_user" I change

[web2py] Re: Registered User?

2020-02-11 Thread Martin Weissenboeck
is required.* Am Di., 11. Feb. 2020 um 09:02 Uhr schrieb Martin Weissenboeck < mweis...@gmail.com>: > > py4web 0.1.20200210.2 installed > Created "myapp" from scaffold > Tried 127.0.0.1:8000/myapp > > Error: > > Traceback (most recent call last): > >

[web2py] Registered User?

2020-02-11 Thread Martin Weissenboeck
py4web 0.1.20200210.2 installed Created "myapp" from scaffold Tried 127.0.0.1:8000/myapp Error: Traceback (most recent call last): File "C:\Python37\lib\site-packages\py4web\core.py", line 547, in wrapper ret = func(*func_args, **func_kwargs) File "C:\Python37\lib\site-packages\py4web\

Re: [web2py] py4web nw version and new example

2020-02-09 Thread Martin Weissenboeck
What is the best way to try this new version? Download, unpack and copy over an old one? Regards, Martin Am Mo., 10. Feb. 2020 um 07:13 Uhr schrieb Massimo Di Pierro < massimo.dipie...@gmail.com>: > A new py4web version is out 0.1.20200209.2: > > - better reload mechanism should avoid come pitfal

[web2py] py4web - delete an app?

2020-02-03 Thread Martin Weissenboeck
Ok, I have learned how to create an app. But I did not find any button to remove an app. I can delete the directory of the app, but should not be there a button on the dashboard for that? Or is it well hidden? Regards, Martin -- Resources: - http://web2py.com - http://web2py.com/book (Documentat

Re: [web2py] Re: Future of web2py

2019-05-13 Thread Martin Weissenboeck
A few thoughts about PWA: First: Web2py is great. But maybe the discussion should go deeper: how will the internet be used now and in the future? It will probably be used mainly by the mobile devices. With all the problems that arise from the fact that the Internet is not available everywhere and

Re: [web2py] Re: Future of web2py

2019-05-11 Thread Martin Weissenboeck
I think, progessive web applications are a very important way to create native-like apps and it would be nice, if web3py could support pwas. There is an interesting article about the future of pwas: https://enonic.com/progressive-web-apps Regards, Martin Am Sa., 11. Mai 2019 um 05:45 Uhr schrieb

Re: [web2py] Re: Future of web2py

2019-05-09 Thread Martin Weissenboeck
Is it planned that web3py will support the development of PWAs? Martin Am Fr., 10. Mai 2019 um 03:58 Uhr schrieb Massimo Di Pierro < massimo.dipie...@gmail.com>: > Good question. > > We are not dropping web2py support. We will continue improve web2py. You > may have seen a lot of work in that dir

[web2py] Error with couchdb

2019-05-08 Thread Martin Weissenboeck
I want to use couchdb with web2py. It's a little bit hard, because the documenation is missing in the book, but I found something in https://pydal.readthedocs.io/en/latest/ Now I have tried cdb = DAL('couchdb://admin:password@localhost:5984/w2p') and I got: Error ticket for "admin"Ticket ID 213

Re: [web2py] Re: 2.18.5 LI(_class="dropdown-divider") bug?

2019-04-12 Thread Martin Weissenboeck
Try this code: response.menu = [ [T('Lectures'), False, URL('default', 'subjects'), []], [T('Students'), False, URL('main', 'students'), []], [T('Professors'), False, URL('main', 'professors'), []], [T('Blog'), False, URL('default', 'blog')], [T('News'), False, URL('default', '

[web2py] Progressive Web Apps

2018-12-13 Thread Martin Weissenboeck
I am just learning how to write Progressive Web Applications (PWA). I think PWAs are a very important step towards app-like websites. There is a lot of good examples on developers.google.com. One example has the following structure: webroot |--images/ |--scripts/ |--styles/ |--favicon.ico |--index

Re: [web2py] Re: Dynamic url masking with routes.py?

2018-11-18 Thread Martin Weissenboeck
ok, thank you. I'll try it. Regards Martin Am So., 18. Nov. 2018 um 19:50 Uhr schrieb Massimo Di Pierro < massimo.dipie...@gmail.com>: > If I assume you have full control of both domains, I would use nginx to map > > domain1.com/$anything -> > domain2/yourapp/yourcontroller/somefunction/$anything

Re: [web2py] Re: Dynamic url masking with routes.py?

2018-11-05 Thread Martin Weissenboeck
Would change very often or could be different each time. Am Mo., 5. Nov. 2018 um 21:58 Uhr schrieb Dave S : > > > On Saturday, November 3, 2018 at 1:17:56 PM UTC-7, mweissen wrote: >> >> >> I need a dynamic url masking >> >> (1) The user calls www.domain1.com/abcd >> (2) abcd will be translated b

[web2py] Dynamic url masking with routes.py?

2018-11-03 Thread Martin Weissenboeck
I need a dynamic url masking (1) The user calls www.domain1.com/abcd (2) abcd will be translated by a table lookup to xyz (3) Now www.domain2.com/xyz should be called. (4) The user sees the content of www.domain2.com/xyz, but with the address www.domain1.com/abcd Is it possible to use routes.py f

Re: [web2py] Re: Future of web2py

2018-10-07 Thread Martin Weissenboeck
Me too (not #metoo :-) I like groups and permissions and I use both very often. Regards, Martin Am So., 7. Okt. 2018 um 17:19 Uhr schrieb : > "Nobody really uses groups and permissions" > > Dear Massimo > I do use groups and permissions. Groups, use them as roles, and create a > copy of permissi

Re: [web2py] SQLFORM.factory in 2.17.1

2018-10-04 Thread Martin Weissenboeck
m.element('input', _name='always_show')['_readonly']=True Am Do., 4. Okt. 2018 um 20:27 Uhr schrieb Martin Weissenboeck < mweis...@gmail.com>: > Sorry - wrong idea... > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

Re: [web2py] SQLFORM.factory in 2.17.1

2018-10-04 Thread Martin Weissenboeck
Sorry - wrong idea... -- 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-u

Re: [web2py] SQLFORM.factory in 2.17.1

2018-10-04 Thread Martin Weissenboeck
Try form = SQLFORM.factory( Field('always_show', default='123', readable=True, writable=True, _readonly=True), Field('writable_if_intended', default='456', readable=True, writable=True), readonly=False, ) Regards Martin Am Do., 4. Okt. 2018 um 19:18 Uhr schrieb 'Awe' via

[web2py] Re: login with SMTP

2018-10-02 Thread Martin Weissenboeck
I have found the answer myself: auth.settings.alternate_requires_registration = True Am So., 30. Sep. 2018 um 20:16 Uhr schrieb Martin Weissenboeck < mweis...@gmail.com>: > I habe tried to verify the logincredentials using a remote SMTP server. > Works fine! > But I do not wa

[web2py] login with SMTP

2018-09-30 Thread Martin Weissenboeck
I habe tried to verify the logincredentials using a remote SMTP server. Works fine! But I do not want than any new user will be registered - the login should be possible only for already registered users. I have tried auth.settings.actions_disabled=['register','profile'] but it not work - there

Re: [web2py]

2018-07-12 Thread Martin Weissenboeck
Sorry, wrong address. Martin Weissenboeck schrieb am Do., 12. Juli 2018, 15:25: > -- > 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 I

Re: [web2py] Postpone a scheduler action

2018-07-11 Thread Martin Weissenboeck
Yes I think this solution could do the job. But I don't know if an exception would produce a big overhead. Anybody who knows the answer? Manuele Pesenti schrieb am Mi., 11. Juli 2018, 10:29: > > > On 09/07/2018 09:56, Martin Weissenboeck wrote: > > What I want to do: >

Re: [web2py] Re: Postpone a scheduler action

2018-07-10 Thread Martin Weissenboeck
I shall use the following solution: the scheduled function checks if there is a conversation. If yes, it schedules a copy of itself with a start time 2 minutes in the future and returns without any further action. Thank you for the discussion! Leonel Câmara schrieb am Mo., 9. Juli 2018, 20:02:

Re: [web2py] Re: Postpone a scheduler action

2018-07-09 Thread Martin Weissenboeck
Ok, could solve most problems. But not all: let's say a conversation between bot and client is going on and just in this moment another process wants to send a message. The queue of the scheduler is empty and therefore this message would be sent immediately. Leonel Câmara schrieb am Mo., 9. Juli

Re: [web2py] Re: Postpone a scheduler action

2018-07-09 Thread Martin Weissenboeck
Leonel Câmara schrieb am Mo., 9. Juli 2018, 12:39: > Does the chatbot keeps logs of the conversations it's having? > No, there are no logs. The message occurs independent from the conversation. The scheduled function, which wants to send a message can detect whether there is a conversation. There

[web2py] Postpone a scheduler action

2018-07-09 Thread Martin Weissenboeck
What I want to do: I have a running scheduler action and I want to interrupt this action and postpone it for a later time. What would be the best solution? Why? The scheduler starts to send a message by Telegram, but at this moment there is a dialog between the Telegram bot and the client (who is

Re: [web2py] Re: query and json-field

2018-06-02 Thread Martin Weissenboeck
ecify the order of evaluation and therefore does not provide a shortcut on evaluation of the and operator. Martin 2018-06-02 10:10 GMT+02:00 Martin Weissenboeck : > Hi Anthony! > > That is interesting. > > I have tested the example with coalesce and it worked in the SELECT clause.

Re: [web2py] Re: query and json-field

2018-06-02 Thread Martin Weissenboeck
Hi Anthony! That is interesting. I have tested the example with coalesce and it worked in the SELECT clause. But I did not find any way to bulid an appropriate WHEN WHEN (extra->>'umfrage_text_id') != '4' => Error: cannot extract element from a scalar WHEN (extra->>'umfrage_text_id') IS NOT N

Re: [web2py] Re: query and json-field

2018-06-01 Thread Martin Weissenboeck
Hi Anthony! Of course my exaple is very simplified and - sorry - I did not test it. Now I have found the solution I have written: query1 = db.sendeprotokoll.typ=="UMF" query1 &= *db*("extra->>'umfragetextid'='4'") r1 = db(query1)._select("sendeprotokoll.typ", "sendeprotokoll.extra")

[web2py] query and json-field

2018-05-31 Thread Martin Weissenboeck
Let's say I have a table like db.define_table("mytable", Field("j", "json")) with some data like db.mytable.insert(j={"x":1}) Now I want to find all records with x==1. Of course db(db.mytable.j["x"]==1) does not work (but it would be fine). I have tried some queries like db.mytable.j.like("%1%")

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-19 Thread Martin Weissenboeck
Ok, thank you again! 2018-05-19 14:59 GMT+02:00 Anthony : > On Saturday, May 19, 2018 at 4:32:49 AM UTC-4, mweissen wrote: >> >> Hi Anthony, >> do you have an answer for the second problem? >> > > No, other than to submit a Github issue (or better yet, a pull request). > SQLFORM.accepts does conv

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-19 Thread Martin Weissenboeck
Hi Anthony, do you have an answer for the second problem? I want to get the number of items in the list "auswahl": form = SQLFORM.factory( Field("auswahl", "list:string"), ) - If there is only one item in "auswahl" then the type of form.vars.auswahl is string and len(form.

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-18 Thread Martin Weissenboeck
Thank you very much. I have read the book very often, but I did not remember this chapter. 2018-05-18 17:03 GMT+02:00 Anthony : > On Wednesday, May 16, 2018 at 1:35:02 PM UTC-4, mweissen wrote: >> >> I understand that there is no DEFAULT VALIDATOR for 'list:string', but it >> seems that is not po

Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Martin Weissenboeck
ist:string` does not have a validator. Maybe you can create your own? > > > On 16-05-2018 22:26, Martin Weissenboeck wrote: > > > That is ok: > form = SQLFORM.factory( > Field("auswahl", "string", length=15, requires=IS_LENGTH(15,3)), >

[web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Martin Weissenboeck
That is ok: form = SQLFORM.factory( Field("auswahl", "string", length=15, requires=IS_LENGTH(15,3)), ) This does not work: form = SQLFORM.factory( Field("auswahl", "list:string", length=15, requires=IS_LENGTH(15,3)), ) ​Regards, Martin​ -- Resources: - http://we

Re: [web2py] Re: Differnt represent in SQLFORM.grid and in the view

2018-05-16 Thread Martin Weissenboeck
nice idea - thank you! 2018-05-16 10:11 GMT+02:00 黄祥 : > think you can use condition to check the request.args value then assign > the represent on it, before defining SQLFORM.grid > *e.g.* > if 'view' in request.args: > db.mytable.myfield.represent = function_to_represent > grid = SQLFORM.gr

[web2py] Differnt represent in SQLFORM.grid and in the view

2018-05-16 Thread Martin Weissenboeck
​I am using* db.mytable.myfield.represent=function_to_represent* in the grid. After clicking the "view" button ​I want to see *myfield *in another representation. Is it possible to change *db.mytable.myfield.represent* only for the view? Regards, Martin -- Resources: - http://web2py.com - http

Re: [web2py] Re: strange behavior of cache.ram and routes.py on a virtual server

2018-05-04 Thread Martin Weissenboeck
redis works great - thank for this hint! Regards Martin 2018-05-04 15:11 GMT+02:00 Anthony : > If your web server runs multiple workers in separate processes (e.g., the > uwsgi setup here >

[web2py] strange behavior of cache.ram and routes.py on a virtual server

2018-05-04 Thread Martin Weissenboeck
I use the example from the book and change the time to 60 seconds: ​def cache_in_ram(): import time t = cache.ram('time', lambda: time.ctime(), time_expire=60) return locals() ​Now I call this function rapidly during the cache-time (60 seconds). It should show always the same time - b

Re: [web2py] Re: Problem with a virtual field, SQLFORM.grid and the fields parameter

2018-04-16 Thread Martin Weissenboeck
Thank you, I'll try it! icodk schrieb am Mo., 16. Apr. 2018, 09:28: > I had a similar issue and using the latest master branch fixed it for me > (after the release of 2.16.1) > > On Saturday, April 14, 2018 at 10:52:10 PM UTC+2, mweissen wrote: >> >> I have a model with a virtual field: >> >> db

Re: [web2py] Re: Problem with a virtual field, SQLFORM.grid and the fields parameter

2018-04-15 Thread Martin Weissenboeck
Yes, that is possible. def t(): db.tt.f.readable = False form = SQLFORM.grid(db.tt) return dict(form=form) But now there is the next problem. I try to use the Export "CSV" button and I get another eooror: Ticket ID 194.118.190.134.2018-04-15.12-45-01.b4d5db05-e1e0-40b8-9233-47f2a2

[web2py] Problem with a virtual field, SQLFORM.grid and the fields parameter

2018-04-14 Thread Martin Weissenboeck
I have a model with a virtual field: db.define_table("tt", Field("f"), Field("gg"), Field.Virtual("ff", lambda r:r.tt.f) ) And a grid: def t(): form = SQLFORM.grid( db.tt, ) return dict(form=form) Works fine. But with the *field argument* I get an e

Re: [web2py] embed a pdf

2018-02-26 Thread Martin Weissenboeck
0 Marco Mansilla : >> >>> Take a look to this >>> >>> https://groups.google.com/forum/m/#!topic/web2py/qgmh5C0XXkY >>> >>> El 26 feb. 2018 03:36, "Martin Weissenboeck" >>> escribió: >>> >>>>

Re: [web2py] embed a pdf

2018-02-25 Thread Martin Weissenboeck
mh5C0XXkY > > El 26 feb. 2018 03:36, "Martin Weissenboeck" > escribió: > >> Sorry, it does not work. >> The same results with or without "default" >> >> 2018-02-26 4:20 GMT+01:00 Marco Mansilla : >> >>> This >>> >

Re: [web2py] embed a pdf

2018-02-25 Thread Martin Weissenboeck
> You can do that on the view. But the change on the controller should do. > > El 25 feb. 2018 15:54, "Martin Weissenboeck" > escribió: > > What I want to do: > > I store a pdf-file in a database table. > Then I want to show this file. > > The model: > &

[web2py] embed a pdf

2018-02-25 Thread Martin Weissenboeck
What I want to do: I store a pdf-file in a database table. Then I want to show this file. The model: db.define_table("pdfs", Field("pdf", "upload", uploadfield="pdfdata"), Field("description", "text"), Field("pdfdata","blob") ) The controller: def showpdf(): id = int(request.

[web2py] Re: YouTube and MARKMIN

2018-02-24 Thread Martin Weissenboeck
Ok, I have found the anwser: it's the browser. It has classified the code as "insecure". embed:https://www.youtube.com/embed/x1w8hKTJ2Co <http://www.youtube.com/embed/x1w8hKTJ2Co> works as expected. 2018-02-24 15:58 GMT+01:00 Martin Weissenboeck : > I want to em

[web2py] YouTube and MARKMIN

2018-02-24 Thread Martin Weissenboeck
I want to embed a youtube video in a website, which is created with MARKMIN. There is a lot of different ideas and hints in the web, but nothing seems zu work. [[Video https://www.youtube.com/watch?v=x1w8hKTJ2Co]] creates a link to this video, but does not embed the video frame itself. iframe:ht

Re: [web2py] Re: Add INPUT to SQLFORM.grid

2017-12-14 Thread Martin Weissenboeck
Thank you for your additionals hints. This is the last version of my program, it does not use vars.records and it is very simple. def test1(): form = SQLFORM.grid(db.tt, selectable=test2, ) form.elements('table')[0].append(INPUT(_type='text', _name='f')) return dict(for

Re: [web2py] Re: Add INPUT to SQLFORM.grid

2017-12-13 Thread Martin Weissenboeck
Hi Anthony! You have written: Not sure what you mean. When I try it, I get the expected list of record IDs in request.vars.records as well as the value of "f" in request.vars.f. The list in *request.vars.records* is ultimately passed to the "selectable" function, after which, the redirect happens

Re: [web2py] Re: Add INPUT to SQLFORM.grid

2017-12-13 Thread Martin Weissenboeck
A very good idea - it works! Thank you and sorry that I did not find it myself. Am 13.12.2017 22:22 schrieb "Val K" : > > maybe this way?: > selectable=lambda ids: redirect(URL('test2', vars=dict(id=ids, f=request. > vars.f)) > > > > On Wednesday, December 13, 2017 at 11:15:03 PM UTC+3, mweissen

Re: [web2py] Re: Add INPUT to SQLFORM.grid

2017-12-13 Thread Martin Weissenboeck
Anthony, now I have written a small program as example : def test1(): if "f" in request.vars: raise HTTP(401, "f=%s" % str(request.vars.f)) form = SQLFORM.grid(db.tt, selectable=lambda ids: None, ) form.elements('table')[0].append(INPUT(_type='text', _name='f'))

Re: [web2py] Re: Add INPUT to SQLFORM.grid

2017-12-13 Thread Martin Weissenboeck
Hi Anthony, thank you for your answer. Of course I have tried "request.vars.f" before asking my question: *request.vars.f* is None and does not work for me. My SQLFORM.grid has a selectable argument and therefore it creates an INPUT(_type="submit") button. After pressing this button the form call

[web2py] Add INPUT to SQLFORM.grid

2017-12-12 Thread Martin Weissenboeck
I want to add *one and only one *INPUT field to a grid (not one field per row, but one filed for the whole grid) For example: form = SQLFORM.grid() form.elements('table')[-1].append(INPUT(_type='text', _name='f')) Maybe there is a better solution, but it works. My question is: how can I get

Re: [web2py] Re: scheduler: force another try, count tries

2017-11-25 Thread Martin Weissenboeck
Thank you, I'll try it. 2017-11-25 5:31 GMT+01:00 Dave S : > > > On Thursday, November 23, 2017 at 12:07:10 AM UTC-8, mweissen wrote: >> >> Thank you - but I think I should explain my question with an example. >> Let's say this is my task in scheduler.py: >> >> def mytask(): >> res = mail.sen

Re: [web2py] Re: scheduler: force another try, count tries

2017-11-23 Thread Martin Weissenboeck
Thank you - but I think I should explain my question with an example. Let's say this is my task in scheduler.py: def mytask(): res = mail.send(some arguments...) if res: db.emailprotocol.insert(senddata="%s tries before" % number_of_tries) else: do_something_to_repeat

[web2py] scheduler: force another try, count tries

2017-11-22 Thread Martin Weissenboeck
Two questions: ​(1) Under some conditions (email send not successfully) ​I want to force an other try after some minutes. Would it be a good idea to raise an Exception? (2) Let's say scheduler_task.retry_failed is 5 and we are in the second repetition. How can I get these number = 2? Is there any

[web2py] websocket_messaging incompatible in web2py 2.15.4?

2017-10-21 Thread Martin Weissenboeck
Some months ago I have written a test application for gluon/contrib/websocket_messaging.py and it worked very well. Now (after an update to 2.15.4) I tried it again and I got some errors. I started with python /home/www-data/web2py/gluon/contrib/websocket_messaging.py -k mykey -p -s /etc/ngi

Re: [web2py] Re: Has the result of a datetime Field changed?

2017-09-12 Thread Martin Weissenboeck
Thank you for this explanation and the workaround. I have found the next *problem with "common_filter"*: it seems, that a common_filter is not applied in the following situation: db.define_table("test", Field("name"), common_filter = lambda query: db.test.id==1)

[web2py] Has the result of a datetime Field changed?

2017-09-11 Thread Martin Weissenboeck
What is the type of the result of a Field(...;'datetime') ? I think, it should be "datetime" (and I am shure it has been in version 2.14.x), but web2py 2.15.4 delivers a "str". def dttest2(): form = SQLFORM.factory(Field('startzeit', 'datetime')) if form.process().accepted: return

[web2py] Re: callback with BUTTON

2017-09-10 Thread Martin Weissenboeck
I have found a solution BUTTON('Testext', _onclick="ajax('%s',[],'')" % URL("testfunction") 2017-09-10 17:47 GMT+02:00 Martin Weissenboeck : > I have tried the callback parameter of A: > > A('Testext', callback('t

[web2py] callback with BUTTON

2017-09-10 Thread Martin Weissenboeck
I have tried the callback parameter of A: A('Testext', callback('testfunction')) Works fine. Now I want the same function for a BUTTON, something like BUTTON('Testtext', callback('testfunction') Ok, BUTTON does not accept a callback parameter, therefore it should look like BUTTON('Testtext',

[web2py] Reset password and lazyT

2017-09-09 Thread Martin Weissenboeck
"Reset password" has a problem in Web2py 2.15.4 The reset password utility sends the texts "Reset password" and "Click on the link %(link)s to reset your password" by email. I have written "Passwort zur*ü*ck setzen" and "Klicken Sie auf den Link %(link)s, um das Passwort zur*ü*ck zu setzen." to de

Re: [web2py] How can you remove the text "Export" from a grid??

2017-09-07 Thread Martin Weissenboeck
I think grid(exportklasses=None) or grid( exportclasses=dict(xml=false, csv=False,, html=False, tsv=False) should do the job. I have not tried it. >From the book: - exportclasses takes a dictionary of tuples: by default it's defined as 1 2 3 4 5 6 csv_with_hidden_cols=(ExporterCSV,

[web2py] Re: mercurial

2017-09-01 Thread Martin Weissenboeck
Ok, thanks. Am 02.09.2017 06:22 schrieb "Massimo DiPierro" : > also we can assume git is already installed so it is a matter of calling > subprocess. I would take a patch to simplify the code. :-) > > On Sep 1, 2017, at 11:21 PM, Martin Weissenboeck > wrote: > > I

[web2py] Re: mercurial

2017-09-01 Thread Martin Weissenboeck
I agree! Am 02.09.2017 06:18 schrieb "Massimo Di Pierro" : There is an advantage in having some minimal version control functionality available through the web admin. We just have the wrong functionality. What we need is commit, push, and pull only. In that an admin can upgrade an app by pressin

Re: [web2py] Re: mercurial

2017-08-30 Thread Martin Weissenboeck
ile "/home/www-data/web2py/applications/admin/controllers/mercurial.py" >> <https://noez.infosms.org/admin/default/edit/admin/controllers/mercurial.py>, >> line 50, in commit >> addremove(repo) >> TypeError: addremove() takes at least 3 arguments (1 g

[web2py] Re: mercurial

2017-08-30 Thread Martin Weissenboeck
n) Error snapshot [image: help] <https://noez.infosms.org/admin/default/ticket/admin/62.46.34.69.2017-08-30.18-52-32.0686f969-19c0-4400-9e6c-2f79cec2c962#> (addremove() takes at least 3 arguments (1 given))​ 2017-08-30 13:20 GMT+02:00 Martin Weissenboeck : > I want to try the admin

[web2py] Re: 2.15.3: storage not found

2017-08-30 Thread Martin Weissenboeck
Thank you for this detailed explanation. Maybe it could help others to solve a similar problem. 2017-08-30 17:26 GMT+02:00 Anthony : > Looks like prior to 2.15, when starting up and calling > gluon.admin.create_missing_folders, "gluon" was added to sys.path, so you > could import modules in glu

[web2py] mercurial

2017-08-30 Thread Martin Weissenboeck
I want to try the admin versioning. mercurial is installed, hg --version shows 2.8.2 And a click on versioning gives "Sorry, could not find mercurial installed" What is wrong - any ideas? Regards, Martin -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] 2.15.3: storage not found

2017-08-30 Thread Martin Weissenboeck
After an upgrade to 2.15.3 my application did not find "storage". I had to change from storage import Storage to from gluon.storage import Storage Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.py", line 219, in restr

Re: [web2py] Current version: 2.15.3-stable+timestamp.2017.08.07.12.51.45 (LGPLv3 License) download link wrong.

2017-08-15 Thread Martin Weissenboeck
Try https://mdipierro.pythonanywhere.com/examples/static/web2py_win.zip Regards Martuin 2017-08-15 10:21 GMT+02:00 Halili Celik : > When I downloaded above link for windows, the web2py version is still ' > 2.15.2-stable+timestamp.2017.07.19.12.18.41'. > > -- > Resources: > - http://web2py.com >

Re: [web2py] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Martin Weissenboeck
> Richard >> >> On Tue, Aug 15, 2017 at 10:52 AM, Martin Weissenboeck > > wrote: >> >>> Thank you - should be mentioned in the book. >>> >>> 2017-08-15 16:44 GMT+02:00 Richard Vézina : >>> >>>> Always the same issue... I wo

Re: [web2py] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Martin Weissenboeck
; > Watch out the last command will override the layout.html... > > > This listing above is a copy/paste from one of my older post, so it may > not be 100% accurate > > Richard > > > On Tue, Aug 15, 2017 at 4:09 AM, Martin Weissenboeck > wrote: > >> I have

[web2py] 2.15.3: automatic update crashes appadmin

2017-08-15 Thread Martin Weissenboeck
I have tried to use the automatic update to 2.15.3 The following problem occurs: Internal error ... Ticked issued:... But appadmin is corrupted, so it is not possible to read the ticket in a simple way. *A restart of web2py solves the problem.* *Maybe there should be an extra hint to restart web

Re: [web2py] Re: web2py 2.15.0b1

2017-07-05 Thread Martin Weissenboeck
Hi, nice to have a new version. The problems with markmin2html remain, see issue 1671 https://github.com/web2py/web2py/issues/1671 A short summary - an ordered list inside a blockquote does not work: A controller: def mmtest(): t=""" --- This is an ordered list: + Item 1 + It

Re: [web2py] Re: Blockquote in markmin

2017-07-04 Thread Martin Weissenboeck
e change that cause the issue you found and try to fix it... > > Richard > > On Mon, Jul 3, 2017 at 2:11 PM, Martin Weissenboeck > wrote: > >> I have found an old thread about the same problem >> https://mail.google.com/mail/u/0/#search/markmin+blockquote/ >> 14

Re: [web2py] Re: Blockquote in markmin

2017-07-03 Thread Martin Weissenboeck
2017-07-03 18:27 GMT+03:00 Richard Vézina : > Can you identify a commit that trigger the issue you observe or it has > always be there?? > > Can you fix it?? Please submit a PR over github if you can... > > Richard > > On Sat, Jul 1, 2017 at 6:57 AM, Martin Weissenboeck &g

[web2py] Re: Blockquote in markmin

2017-07-01 Thread Martin Weissenboeck
the blockquote are only joined, without any other interpretation. Maybe some code is missing? 2017-06-29 5:44 GMT+03:00 Martin Weissenboeck : > I have run the markmin2html.py file. The results of blockquotes are not as > expected, e.g.: > > ​This is a blockquote with a list with ta

[web2py] Blockquote in markmin

2017-06-28 Thread Martin Weissenboeck
I have run the markmin2html.py file. The results of blockquotes are not as expected, e.g.: ​This is a blockquote with a list with tables in it: This is a paragraph before list. You can continue paragraph on the next lines. This is an ordered list with tables: + Item 1 + Item 2 + aa|bb|cc

[web2py] How to write pseudocode in markmin?

2017-02-15 Thread Martin Weissenboeck
What I what to get is something like *if* *condition* *then* *statement-1* *statement-2* *end* It is a text with monospace type, bold and italic letters and indentation. I have tried: **if** ''condition'' **then**[[NEWLINE}} ''staement-1'' ''staement-1'' **end** ​and the resu

Re: [web2py] Re: Fullcalendar scheduler - creating, changing and saving data to database

2017-02-13 Thread Martin Weissenboeck
Is there any Schedular Calendar as a plugin for web2py or with the same licence as web2py? Regards, Martin 2017-02-13 15:43 GMT+01:00 Richard Vézina : > Why don't you approach the problem the other way?! If you know how to > create a form in web2py, you know how to enter a record (even), you can

Re: [web2py] global name 'T' is not defined

2017-01-25 Thread Martin Weissenboeck
Try in the module: from gluon import current T = current.T Regards, Martin 2017-01-25 9:51 GMT+01:00 icodk : > I have a controller that imports a module > In the controller I can use T('some text'). However trying to use it in a > function in an imported module gives: global name 'T' is not

[web2py] How to use a list:string as string

2017-01-11 Thread Martin Weissenboeck
What I want to do: I have a Field("aa", "list:string") and I know that the internal representation is e.g. "|x|y|z|u|v|". Now I want to find all rows with aa[0]=='x' and aa[1]=='y' and aa[2]=='z' and aa[3]=='u' (that is a simplified example). I have tried db.mytable.aa.type = 'text' res = db(d

Re: [web2py] Re: how to make Query, which is always "True" (1=1 or so) ?

2016-11-25 Thread Martin Weissenboeck
Could this solve the problem? db.define_table("mytable", Field("myvalue")) mytable contains: 3 selected mytable.id mytable.myvalue 1

[web2py] Re: How to bulid a fast responding service?

2016-11-18 Thread Martin Weissenboeck
Thank you! yes, and will be part of the solution. By the way I have found that is very important to use same server name in the app and in the ssl certificate. About my question: I think the answer is in chapter 10. I have tried @service.rundef concat(a, b): return a + b ​It's ok, but some

[web2py] How to bulid a fast responding service?

2016-11-15 Thread Martin Weissenboeck
​I want to implement the telegram inline-mode ( https://core.telegram.org/bots/api#inline-mode). The telegram server sends an URL request and the web2py server a) should decide which user wants an answer and b) should ​respond as fast as possible. a): I use a database table to store the "state". O

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Martin Weissenboeck
Yes - that's it. Now I can add tasks from a module. Thank you again very much! Martin 2016-11-02 22:31 GMT+01:00 Niphlod : > tl;dr : it just gets automatically filled with > "request.application/request.controller" in a web environment that it is > missing in your module. > -- Resources: - htt

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Martin Weissenboeck
Thanks, I have tried it, but the scheduler needs an "application_name": In the module: db = DAL() scheduler = Scheduler(db, migrate=False) rtn = scheduler.queue_task("mytask") Now the return value of queue_task is rtn == {'errors': {'application_name': 'Enter a value'}, 'id': None, 'uuid':

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Martin Weissenboeck
Thank you, but it did not work, because the module program does not use the models. More details: The module contains a small smtp-server. This program writes incoming emails to a table "db.emails". This part works very well. Now I want to start a scheduler action to analyze each email and to do

[web2py] How to start a scheduler task from a module?

2016-11-01 Thread Martin Weissenboeck
I want to start a task from a module. (The module contains a small smtp-server.) I could it with a db.scheduler_task.insert(...), but I want to use myschedule.queue_task(...) ​What would be the correct way to define "myschedule" ? Something like myschedule = Scheduler(current.db)​ ​Regards, Mar

[web2py] Re: problem with start_time of the scheduler

2016-10-19 Thread Martin Weissenboeck
2016-10-17 21:11 GMT+02:00 Niphlod : > BTW: please start adapting your code to use mysched.queue_task() > instead of db.scheduler_task.insert(...) . > Next releases could change the format of the scheduler_task table and only > the queue_task method is the supported one (i.e. will handle event

[web2py] Re: problem with start_time of the scheduler

2016-10-18 Thread Martin Weissenboeck
It works perfect - thank you! 2016-10-17 21:08 GMT+02:00 Niphlod : > the bug has already been fixed in trunk. > You can copy/paste the scheduler.py file from master if you want it > solved, or either pass next_run_time equal to start_time to make things > work the way they were. > > On Sunday, Oc

[web2py] Re: problem with start_time of the scheduler

2016-10-15 Thread Martin Weissenboeck
Thank you, but start_time has a value. start_time is a paramter of the surrounding function. I have tested it with task_name = task_name + str(start_time) and therefore I have written start_time != None 2016-10-15 19:59 GMT+02:00 Dave S : > > > On Saturday, October 15, 2016 at 6:27:33 AM UTC-7, m

  1   2   3   4   5   6   >