[web2py] Re: How can I use an alternate(non-root) directory in a production deployment?

2013-05-22 Thread Wei Li
I have the same question On Thursday, January 12, 2012 12:42:17 PM UTC-8, tomt wrote: > > I followed the manual's instruction for deploying web2py in a > production environment using apache and wsgi, and it works as > advertised. Calling http://domain.com/app1/default/function works just >

[web2py] Turning off SQL Logging

2013-05-22 Thread Abhishek Gupta
Hi, Is there an easy way to disable the logs generated in databases/sql.log other than editing gluon/dal.py? Regards Abhishek Gupta Co-founder, Zumbl -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop

Re: [web2py] Re: remote admin

2013-05-22 Thread Wei Li
This setup-web2py-ubuntu.sh looks very helpful to me! Thanks. On Wed, May 22, 2013 at 6:47 PM, Anthony wrote: > Also, the setup scripts include code to create self-signed SSL > certificates -- for example: > https://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh#74. > You

Re: [web2py] Re: remote admin

2013-05-22 Thread Wei Li
Thanks for the detail explanation! I think I am going to use ssh tunnel to localhost now. On Wed, May 22, 2013 at 6:32 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > There are good reasons to be so secure. Without ssl, anybody on any of the > networks you are on can monitor your tr

[web2py] Re: remote admin

2013-05-22 Thread Anthony
Also, the setup scripts include code to create self-signed SSL certificates -- for example: https://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh#74. Your browser will give you a warning, but it will allow you to have access to admin. Anthony On Wednesday, May 22, 201

[web2py] Re: remote admin

2013-05-22 Thread Massimo Di Pierro
There are good reasons to be so secure. Without ssl, anybody on any of the networks you are on can monitor your traffic and steal your password or your session cookies. It is very easy to do. There are programs called wireshark and tcpdump to do it. If the have your admin password they can run

[web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-22 Thread Simon Ashley
Thanks Simone, A little more on this. Seems to to be an issue with windows consuming memory and grinding the system to semi halt. The characteristic isn't there in Linux. (ubuntu under vmware hosted by win7) Are you sure on db(query).update(**arguments) ? (seems to fall over with too many

Re: [web2py] Re: auth.signature modified_on, created_on using utc time

2013-05-22 Thread Funmanhk
Massimo, Thanks for the correction. I hope to see if it saves me copy and paste the modified_on/created_on fields in another few tables. Is auth.signature defined somewhere? Sorry that it maybe another silly question. My below model below does give me what I want to use utc. Regards, Funma

[web2py] Re: How to get "represent" clause to display across a chain of parent tables?

2013-05-22 Thread Anthony
Sure. To avoid packing it all into a lambda, I would create a separate function: def rsa_represent(id, row): record = db((db.RelationshipSubjectArea.id == id) & (db.RelationshipSubjectArea.subjectAreaID == db.SubjectArea. id)).select().first() return '%s %s' % (record.Subj

[web2py] remote admin

2013-05-22 Thread Wei Li
It's really annoying. For developing stage, there is no reason to be so secure. The easiest way: modifying models/access.py seems doesn't work for me. My web2py is redirectly to apache. Using SSL will involve lot of configs Have to keep hacking web2py's source code now. -- --- You r

[web2py] Re: How to get "represent" clause to display across a chain of parent tables?

2013-05-22 Thread Alex Glaros
Anthony, Is there a way to concatenate two "represent" fields for db.RelationshipSubjectArea: '%(subjectAreaCode)s %(relationshipCode)' in your statement below: db.RelationshipRole.relationshipSubjectAreaID.requires = IS_IN_DB(db, 'RelationshipSubjectArea.id', lambda r: db.SubjectArea(r.subj

[web2py] Re: Issues with rendering wiki in html.

2013-05-22 Thread John Fraser
That works. Thanks for the help. Makes sense. I forgot about the code in db.py when initially troubleshooting. On Wednesday, May 22, 2013 1:58:00 PM UTC-4, Alan Etkin wrote: > > Also as this maybe important. In my init/model/db.py I have the >> following after auth tables are defined: >> >

[web2py] Re: Simple Postgres Exercise and ValueError: invalid literal for int() with base 10: 'SELECT'

2013-05-22 Thread Niphlod
the code you posted (of course, correctly spaced in the controller function) works without problems. Check your database/sql.log for details about the table being effectively created On Wednesday, May 22, 2013 8:14:41 PM UTC+2, ewon...@gmail.com wrote: > > What I really wanted to do was conn

[web2py] Re: Download Link not working

2013-05-22 Thread Niphlod
working for me PS: the source version is availble on github too (of course) https://github.com/web2py/web2py/archive/R-2.4.6.zip On Wednesday, May 22, 2013 7:14:24 PM UTC+2, greenpoise wrote: > > 502 Bad Gateway Error > > > > > On Wednesday, May 22, 2013 10:13:56 AM UTC-7, greenpoise wrote:

[web2py] Simple Postgres Exercise and ValueError: invalid literal for int() with base 10: 'SELECT'

2013-05-22 Thread ewong1111
What I really wanted to do was connect to an existing postgres database and read/display the data, but I kept getting this error: ValueError: invalid literal for int() with base 10: 'SELECT' I've pared down to some stupidly simple code that works with sqlite, but when I change to use my postg

[web2py] Re: Issues with rendering wiki in html.

2013-05-22 Thread Alan Etkin
> > Also as this maybe important. In my init/model/db.py I have the > following after auth tables are defined: > auth.wiki(resolve=False) > The auth.wiki method arguments set the Wiki object options the first time, and further configs must be changed with the auth.settings.wiki.option syntax

[web2py] Re: Issues with rendering wiki in html.

2013-05-22 Thread John Fraser
I deleted the old page and created a new one with same 'index' slug also tried creating a new page entirely. Also as this maybe important. In my init/model/db.py I have the following after auth tables are defined: auth.wiki(resolve=False) On Wednesday, May 22, 2013 1:08:11 PM UTC-4, Andr

[web2py] Re: Download Link not working

2013-05-22 Thread greenpoise
502 Bad Gateway Error On Wednesday, May 22, 2013 10:13:56 AM UTC-7, greenpoise wrote: > > I cant seem to download web2py. Its as if the site was down. > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group an

[web2py] Download Link not working

2013-05-22 Thread greenpoise
I cant seem to download web2py. Its as if the site was down. -- --- 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

[web2py] Re: Issues with rendering wiki in html.

2013-05-22 Thread Andrew W
Did you perhaps create your pages first (with markmin) and then add the render=HTML after? -- --- 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

[web2py] Re: Issues with rendering wiki in html.

2013-05-22 Thread John Fraser
Hi Alan, I updated to the latest mercurial version, just in case... but the issue still persists for me. Not sure what I am doing wrong. Here is my code below: /init/controllers/wiki.py: def index(): response.title = 'Wiki' response.subtitle = 'web2py' return auth.wiki(render='htm

[web2py] Re: Issues with rendering wiki in html.

2013-05-22 Thread Alan Etkin
> > Did you ever solve this? I am having the same issue perhaps this is a bug. > > On Wednesday, May 15, 2013 4:48:54 PM UTC-4, Noah Lange wrote: >> >> I've been working with web2py for only the last few weeks, so it's likely >> this is a problem borne mostly of my own ignorance, but I've bee

[web2py] Re: Issues with rendering wiki in html.

2013-05-22 Thread frase1
Did you ever solve this? I am having the same issue perhaps this is a bug. On Wednesday, May 15, 2013 4:48:54 PM UTC-4, Noah Lange wrote: > > I've been working with web2py for only the last few weeks, so it's likely > this is a problem borne mostly of my own ignorance, but I've been having

[web2py] Re: rss feed

2013-05-22 Thread greaneym
Thank you, Massimo, I will check this out. Margaret On Tuesday, May 21, 2013 5:37:02 PM UTC-5, Massimo Di Pierro wrote: > > I think these are the feeds: > > feed://alerts.weather.gov/cap/wwaatmget.php?x=ILZ013&y=0 > > They are in Atom format: > > xmlns = 'http://www.w3.org/2005/Atom' > xmlns:cap

[web2py] Re: System logout

2013-05-22 Thread Domagoj Kovač
Thanks Anthony now i understand what is going on. In my 0.py i added: if session.company_url: auth.settings.login_url = URL("default", "login", args=session. company_url) else: auth.settings.login_url = URL("default", "login") session.company_url is set on login. This works like i wanted.

[web2py] Re: How to get "represent" clause to display across a chain of parent tables?

2013-05-22 Thread Anthony
> db.RelationshipSubjectArea.subjectAreaID.requires = IS_IN_DB(db, > 'SubjectArea.id', '%(subjectAreaCode)s',zero=T('choose one')) > db.RelationshipSubjectArea.subjectAreaID.represent = lambda id, r: > '%(subjectAreaCode)s' % db.SubjectArea(id) > You can remove the above two lines and instead

[web2py] crud.search ( db.tableName) does not return expected results

2013-05-22 Thread sanju koli
Hi All I have two tables in my database, e.g. customer order_request ( having a reference of customer) I am trying to implement the search to find all order by a customer. so I am wring the code as follow. I have not created any view, I am using generic view to see the output. def find():

[web2py] Re: auth.signature modified_on, created_on using utc time

2013-05-22 Thread Massimo Di Pierro
auth.signature is not a table. It is a list of fields which you are including in the demo_detail table. On Tuesday, 21 May 2013 21:48:28 UTC-5, funm...@gmail.com wrote: > > hi all, > > I like to use table inheritance with auth.signature in my model. I see > that it is working, but it doesn't use

Re: [web2py] Re: no web2py version showing?

2013-05-22 Thread Massimo Di Pierro
Which os? Have you tried a manual upgrade? On Tuesday, 21 May 2013 21:25:29 UTC-5, WebToePie wrote: > > yeah, ok, I tried the page reload and upgrade button, several times before > postting, but something seem corrupted > > the upgrade button doesn't do anything > > the rest of web2ypy seems to

[web2py] Re: System logout

2013-05-22 Thread Anthony
On Wednesday, May 22, 2013 8:20:54 AM UTC-4, Domagoj Kovač wrote: > Looking at my function and your replies i can set: > auth.settings.logout_next = URL("default", "login", "company") > and this should redirect the user after he is logged out automatically. > Users are not logged out automaticall

[web2py] Re: System logout

2013-05-22 Thread Domagoj Kovač
Looking at my function and your replies i can set: auth.settings.logout_next = URL("default", "login", "company") and this should redirect the user after he is logged out automatically. But this doesn't happen. Althought something like this should work i don't want to do it that way, i want to se

[web2py] Re: System logout

2013-05-22 Thread Domagoj Kovač
I want to set the location of my logout function. I have my own logout function: def logout(): if 'url_suffix' in request.cookies: url_suffix = request.cookies['url_suffix'].value response.cookies['url_suffix'] = "" response.cookies['url_suffix']['expires'] = -1000

[web2py] Re: edit static content from web interface nginx

2013-05-22 Thread BlueShadow
I'm using uwsgi and all files are owned by the default www-data user created by the install file for web2py nginx On Sunday, May 19, 2013 8:03:03 AM UTC+2, Calvin wrote: > > Check the file permissions for the static folder to see if it's own by > uwsgi (if you're using that... or whichever wsgi)

Re: [web2py] Re: Error page with ticket in iframe -- no need for extra click each time ;)?

2013-05-22 Thread Anthony
I don't know that you'd want to re-check and possibly re-load all the routes on every request in production, but I suppose it might be nice in development (like tracking changes in modules). Anthony On Wednesday, May 22, 2013 4:01:47 AM UTC-4, Jurgis Pralgauskis wrote: > > Thanks, > > but stil

[web2py] Re: Upload field and SQLFORM.grid problem / bug?

2013-05-22 Thread Anthony
> OK - this URL is produced by database administration interface > > http://localhost:8000/periodicke_cinnosti/appadmin/download/db/item.file.8f5a1d4f8f222113.6e61747572616c6c5f30332e706e67.png > appadmin adds the "db" arg to the URL so it knows which DAL connection to use -- this is not necess

[web2py] Re: System logout

2013-05-22 Thread Anthony
> auth.settings.logged_url = URL("default", "logout") > The above sets the URL where a logged in user should be redirected if they happen to go to the registration page -- by default it is set to be the profile page. > How do i set system logout function? Because when user is logged out he

[web2py] Re: System logout

2013-05-22 Thread villas
Try setting: auth.settings.logout_next On Wednesday, May 22, 2013 11:31:10 AM UTC+1, Domagoj Kovač wrote: > > You misunderstood me :D, of course it is not possible to do anything on > users computer, that would be scary :), although as a developer i would > like it :). > I did not mean syst

[web2py] Re: System logout

2013-05-22 Thread Domagoj Kovač
You misunderstood me :D, of course it is not possible to do anything on users computer, that would be scary :), although as a developer i would like it :). I did not mean system logout like user system logout i thought system logout like framework logout function, here system refers to my appl

[web2py] Re: System logout

2013-05-22 Thread Niphlod
if a browser had the possibility to shutdown the system, the internets would be a scary place ^_^ Il giorno mercoledì 22 maggio 2013 11:25:53 UTC+2, Domagoj Kovač ha scritto: > > auth.settings.logged_url = URL("default", "logout") > > I see now that this line is not what i thought it was. For som

[web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-22 Thread Niphlod
ps: that being said, it would be better to do this using an executesql statement and let the backend do the job update table_a set field_a1 = field_b1, from table_a inner join table_b on table_b.id = table_a.item_id unfortunately SQLite doesn't allow update statements with joins (but a ser

[web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-22 Thread Niphlod
np, confirmed that there are no leaks involved, the second point was more or less "am I doing it right?" my issue with the tests not being viable is that if speed matters, the example needs to be as close to reality as possible to help you figure out "the best way to do it". For example an inde

[web2py] Re: System logout

2013-05-22 Thread Domagoj Kovač
auth.settings.logged_url = URL("default", "logout") I see now that this line is not what i thought it was. For some reason i thought this line is actual system logout function. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscri

[web2py] Re: Memory leak, SQLite, Windows (7, 2008)

2013-05-22 Thread Simon Ashley
Ok, here's the reality. Benchmarking on 10k records (either method), you get a through put of approximately 100 records a second (should complete in 1.5 hours). The row.update completes in 3.5 hours. The update_or_insert takes > 7 hours. (with available memory maxed out, no caching involved.

[web2py] System logout

2013-05-22 Thread Domagoj Kovač
Hi, I have multi tenant application where i have two logins. One login is only for super user and can be found on mydomain.com/login. Other login is for regular users and can be found on mydomain.com/company/login or mydomain/company2/login. I have my own login and logout function, my login fu

Re: [web2py] Re: Error page with ticket in iframe -- no need for extra click each time ;)?

2013-05-22 Thread Jurgis Pralgauskis
Thanks, but still would be nicer - if defining in app would be enough (kind of KISS style) and maybe even without need to restart web2py (if just app level changes)? On Tue, May 21, 2013 at 7:06 PM, Anthony wrote: > You can app-specific routes in the app folder, but then you still need to > sp