[web2py] Re: uwsgi not logging when web2py installed on ubuntu 18.04 with nginx with setup script

2019-03-12 Thread Toby
Got it working. Here's what I needed to do: 1. Add the following line to the bottom of /etc/uwsgi/web2py.ini *logto = /var/log/uwsgi/uwsgi.log* 2. Comment out this line (by putting a # in front): *StandardError = syslog* in the file /etc/systemd/system/emperor.uwsgi.service The best way to edit

[web2py] Re: uwsgi not logging when web2py installed on ubuntu 18.04 with nginx with setup script

2019-03-12 Thread Toby
OK, so now I realise that the script setup-web2py-nginx-uwsgi-ubuntu.sh creates init scripts for both upstart and systemd (why? Is that to support multiple versions of Ubuntu?). It writes to the systemd

[web2py] Re: uwsgi not logging when web2py installed on ubuntu 18.04 with nginx with setup script

2019-03-12 Thread Toby
March 12, 2019 at 11:10:02 AM UTC, Toby wrote: > > I set up a new DigitalOcean server (Ubuntu 18.04) and ran the install > script setup-web2py-nginx-uwsgi-ubuntu.sh > > It works OK and I can access the admin interface, but I noticed that > uwsgi logging is not working. Even

[web2py] uwsgi not logging when web2py installed on ubuntu 18.04 with nginx with setup script

2019-03-12 Thread Toby
I set up a new DigitalOcean server (Ubuntu 18.04) and ran the install script setup-web2py-nginx-uwsgi-ubuntu.sh It works OK and I can access the admin interface, but I noticed that uwsgi logging is not working. Even once the app is running there is no log file created at /var/log/uwsgi/ Any

[web2py] Re: custom widget - why is value empty even though it was set with form.vars.fieldname = something?

2016-11-23 Thread Toby
It's more than just the javascript, because even printing value from within my widget prints None, and that's before the form is rendered on the page. I think I figured out what's going on. There are two ways of setting a default on the fly

[web2py] custom widget - why is value empty even though it was set with form.vars.fieldname = something?

2016-11-22 Thread Toby
_class=field.type, _id="%s_%s" % (field._tablename, field.name), _value=value, requires=field.requires) ) Thanks in advance for any advice on what I'm missing Toby -- Resources: - http://web2py.com - http://web2py.

[web2py] Re: How to see error tickets listed by date?

2016-07-14 Thread Toby
Thanks Anthony, not sure how I missed that! Toby -- 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

[web2py] How to see error tickets listed by date?

2016-07-14 Thread Toby
Hi folks, Is there a way to see error tickets by date? For instance, I know that a user experienced an error yesterday (they emailed me) and I want to see just yesterday's errors for a particular app, so I can figure out what caused that particular error. Thanks, Toby -- Resources: - http

[web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-24 Thread Toby
uwsgi_read_timeout 120; Helpful reading for anyone else who comes across this same problem: http://stackoverflow.com/questions/24133315/fixing-broken-pipe-error-in-uwsgi-with-python Thanks again for having pointed me in the right direction. Toby -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-24 Thread Toby
On Tuesday, March 24, 2015 at 8:07:45 PM UTC, Niphlod wrote: seems the right job for the scheduler :-P Yeah, maybe you're right. Basically my program generates a large image for a user which takes about 1 min. I want to show please wait on the web-page while it's generating, then show

[web2py] Page hangs when calling subprocess.check_call from within web2py

2015-03-19 Thread Toby
advice, Toby -- 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

[web2py] Re: ajax eval not working when url has an argument

2014-11-02 Thread Toby
Hi Anthony, Thanks for responding. Here's my code. default.py: def one(): return dict() def echo(): return jQuery('#target').html(%s); % repr(request.vars.name) one.html: {{extend 'layout.html'}} form input name=name onkeyup=ajax('echo', ['name'], ':eval') / /form div

[web2py] Re: ajax eval not working when url has an argument

2014-11-02 Thread Toby
Thanks Anthony, that works perfectly (minor typo: need an '=' in front of URL). Tobias -- 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

[web2py] ajax eval not working when url has an argument

2014-10-31 Thread Toby
Hi, I tried this ajax eval example: http://www.web2py.com/books/default/chapter/29/11/jquery-and-ajax#Eval-target It works fine so long as the url doesn't have an argument. But if I add an argument to the url, then it doesn't work anymore. For example

[web2py] Re: How to make session cookies persistent?

2014-10-28 Thread Toby
Perfect. Thank you! On Tuesday, October 28, 2014 4:49:22 PM UTC, Toby wrote: Hi, How do I make session cookies persistent, so that a session is continued when a user closes their browser and re-opens it again? I've tried putting this in the first line of a controller function

[web2py] Many to many relationships

2013-02-25 Thread Toby Wilson
a look at the Django admin login and it visually made this look a bit easier - i.e. building the one to many relationship. How is this done in web2py? Any help or advice would be much appreciated. Toby P.S. If I have a database file in web2py and open the file through the web2py IDE

[web2py] Re: Many to many relationships

2013-02-25 Thread Toby Wilson
works every second time. One time I hit enter and nothing happens, then after typing I hit enter and it seems to work. Am I doing something wrong or is this a bug in web2py or in my installation perhaps? Toby On Monday, 25 February 2013 18:24:48 UTC+11, Toby Wilson wrote: Hi all, New to web

RE: [web2py] Re: Many to many relationships

2013-02-25 Thread Toby Wilson
to many relationships we need to che change the book. owner is a keyword in postgresql. When we wrote the 4th edition of the book, web2py was not checking by default. recent versions of web2py are checking. On Monday, 25 February 2013 17:02:09 UTC-6, Toby Wilson wrote: Thanks Cliff and Niphlod

[web2py] generic.html controller wide?

2012-08-20 Thread Toby Shepard
I was thinking that it would be nice if I could make a director in the views folder matching a controller name, but then just put a file in there called 'generic.html' that would apply to any function called in that controller. Perhaps there is another way to do this. Thanks, Tobiah --

Re: [web2py] Re: Get result set back as list?

2012-08-11 Thread Toby Shepard
On 8/10/2012 3:58 PM, Vasile Ermicioi wrote: for me that works alist = db(db.auth_user).select().as_list() How funny. I was just making up the name as_list(). Great minds think alike I guess. I was looking for a flat list of field values, but the list comprehension solution is ok I guess.

[web2py] Get result set back as list?

2012-08-10 Thread Toby Shepard
I'm in a situation where I just want a single column back from a table. I'd like it as a list so I could just pass it on to the next function. All I can think of is something like: temp = [] for thing in db(db.mytable).select(db.mytable.myfield):

Re: [web2py] Re: Question about a section of the book.

2012-08-03 Thread Toby Shepard
that the hiddens are only generated because of the call to FORM.accepted(). Should I assume then that the 'formname' keyword is only necessary when there is more than one form in the page? Thanks, Toby --

Re: [web2py] Re: Subclass FORM?

2012-08-03 Thread Toby Shepard
def __init__(self): super(Document, self).__init__(self) Don't pass self to __init__() -- should be: Ahh... much better. Thanks! Tobiah --

[web2py] Question about a section of the book.

2012-08-02 Thread Toby Shepard
practice. Thanks, Toby --

Re: [web2py] Re: Question about a section of the book.

2012-08-02 Thread Toby Shepard
. Massimo On Thursday, 2 August 2012 13:13:10 UTC-5, Toby Shepard wrote: In the forms section: It is possible to have multiple forms per page, but you must allow web2py to distinguish them. If these are derived by SQLFORM from different tables, then web2py gives them different names automatically

[web2py] Subclass FORM?

2012-08-02 Thread Toby Shepard
thought there would be any difference then just making the FORM() and appending text to it, which works. Thanks! Tobiah Traceback (most recent call last): File /home/toby/web2py/gluon/main.py, line 498, in wsgibase serve_controller(request, response, session) File /home/toby/web2py/gluon

Re: [web2py] Re: Suggestion - a pickled DAL field

2012-07-25 Thread Toby Shepard
On 07/24/2012 06:55 PM, Anthony wrote: On Tuesday, July 24, 2012 5:58:29 PM UTC-4, Derek wrote: Make it a computed field? I'm not sure that would be helpful in this case. A computed field computes its value automatically based on other fields in the record, but in this case, he needs to

Re: [web2py] Re: callback on an anchor tag

2012-07-25 Thread Toby Shepard
;,[],#x27;hater#x27;);return falseCLICK ME!!/a and that is what is expected. Perhaps I misunderstand the question. On Tuesday, 24 July 2012 16:21:59 UTC-5, Toby Shepard wrote: Working through the html helper docs, I decided to try the callback parameter to the anchor tag

Re: [web2py] Re: callback on an anchor tag

2012-07-25 Thread Toby Shepard
On 07/24/2012 06:48 PM, Massimo Di Pierro wrote: {{=A(CLICK ME!!, callback=URL('http://mysite.com/foo.html' http://mysite.com/foo.html'), target='hater')}} should be {{=A(CLICK ME!!, callback='http://mysite.com/foo.html' http://mysite.com/foo.html',target='hater')}} Ok, so now I have:

Re: [web2py] Re: callback on an anchor tag

2012-07-25 Thread Toby Shepard
?) to the URL() function, which is not how it works. Anthony -- Oh, I had thought that 'myaction' stood for a full URL. So in this case, is 'myaction' actually the name of a controller, or function? Thanks, Toby --

[web2py] BR()

2012-07-25 Thread Toby Shepard
In my own html generating libraries, I normally allow an integer argument to the BR maker, which is a count of how many tags to put out. So: {{=BR(5)}} could output BRBRBRBRBR This works out since the BR tag can't have any components anyway. Just a thought. I find it useful at times.

[web2py] callback on an anchor tag

2012-07-24 Thread Toby Shepard
Working through the html helper docs, I decided to try the callback parameter to the anchor tag: {{=A(CLICK ME!!, callback=URL('http://mysite.com/foo.html'), target='hater')}} {{=DIV(_id = 'hater')}} foo.html delivers a bit of content. This did not work. Viewing the source, I see that the