[web2py] Re: 0.db naming convention?

2015-10-15 Thread Leonel Câmara
Models are executed alphabetically so it was just a convenient way to define some stuff that you wanted to have available in all your models. Nowadays you have AppConfig so usually that's what you should use. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gi

[web2py] Re: Why is https not working (not private) with my implementation of this web2py slice?

2015-10-15 Thread Leonel Câmara
That's normal since SSL certificates are usually for domains not IP addresses. When you open the page for the first time in your browser there will be a warning from the browser it should have a link like "advanced" or "more options" say that you know the dangers and tell it to proceed. -- Res

[web2py] Re: how to return nothing

2015-10-15 Thread Leonel Câmara
Yes that line is wrong, this: db(db.PostalCode.id > 0).update(PostalCode.countryCode = PostalCode.countryCodeFromGeoNames) Should be: db(db.PostalCode.id > 0).update(countryCode = db.PostalCode.countryCodeFromGeoNames) -- Resources: - h

[web2py] Re: PyCharm license for web2py dev - who wants?

2015-10-15 Thread Blutoh
+1 On Sunday, October 11, 2015 at 3:21:16 PM UTC-4, Francisco Ribeiro wrote: > > Hello all, > > for those who know PyCharm is a great IDE from JetBrains that provides > free licenses for Open Source projects like web2py ( > https://www.jetbrains.com/buy/opensource/?product=pycharm ). To reques

Re: [web2py] Re: CMS WEB2PY

2015-10-15 Thread Paolo Amboni
I'm very curious to see the config part!! Let us know when you publish the source code. Thanks. Il giorno martedì 13 ottobre 2015 15:17:20 UTC+2, Carlos Cesar Caballero ha scritto: > > I am working on a site that is builded using custom made CMS, I am > planning to release it to github when it

Re: [web2py] PyCharm license for web2py dev - who wants?

2015-10-15 Thread Mirek Zvolský
>> Carlos >> PyCharm Community Edition is for free, simple navigate to https://www.jetbrains.com/pycharm/download/ choose Community Edition and Download. Works much better then Eclipse (just my meaning). Dne úterý 13. října 2015 15:31:02 UTC+2 Carlos Cesar Caballero napsal(a): > > +1 > > I am

[web2py] Re: PyCharm license for web2py dev - who wants?

2015-10-15 Thread Loïc
+1 thanks Le dimanche 11 octobre 2015 21:21:16 UTC+2, Francisco Ribeiro a écrit : > > Hello all, > > for those who know PyCharm is a great IDE from JetBrains that provides > free licenses for Open Source projects like web2py ( > https://www.jetbrains.com/buy/opensource/?product=pycharm ). To req

Re: [web2py] Re: PyCharm license for web2py dev - who wants?

2015-10-15 Thread Daniel Aguayo
+1 2015-10-15 10:42 GMT-03:00 Loïc : > +1 > thanks > > > Le dimanche 11 octobre 2015 21:21:16 UTC+2, Francisco Ribeiro a écrit : >> >> Hello all, >> >> for those who know PyCharm is a great IDE from JetBrains that provides >> free licenses for Open Source projects like web2py ( >> https://www.jet

[web2py] Re: issue with recursive caches?

2015-10-15 Thread Leonel Câmara
Yep, the cache locks the key it's writing so this is not possible. If the keys are not the same it still gets locked because of statistics gathering. The only way to prevent this would be to have a disable statistics option in cache disk, which I am inclined to develop as it would also allow tru

[web2py] Re: issue with recursive caches?

2015-10-15 Thread Kiran Subbaraman
Thanks for confirming this issue. The other thing I noticed is that if I just go ahead and create an instance of CacheInRam and CacheOnDisk, and combine them as before, and go ahead and use them - this would mean that a cache ram & disk instance is created for practically every request, wastef

[web2py] Re: issue with recursive caches?

2015-10-15 Thread Leonel Câmara
Ohh wait a minute I thought only cache disk was involved. If you create new instances of CacheRam instead of using the one already provided you are not using the cache at all as the new instances will have an empty cache. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: OperationalError: database is locked

2015-10-15 Thread Niphlod
mongodb isn't a supported backend for the scheduler. And to answer your previous request: db2 is there just to support scheduler "internals" . if your task still wants to write to db there's nothing wrong with it. On Thursday, October 15, 2015 at 4:39:17 AM UTC+2, kenny c wrote: > > If SQLite ca

Re: [web2py] Re: issue with recursive caches?

2015-10-15 Thread Kiran Subbaraman
Ok, two things: Firstly - As demonstrated in the sample application that I attached with the original post, I was using the combination of cache.ram with cache.disk, as my default cache: cache.ram(key, lambda: cache.disk(...), ttl) Secondly, in the scenario where I create instance of CacheInRam

[web2py] Re: how to return nothing

2015-10-15 Thread Alex Glaros
Perfect! thanks Leonel, only took 2 seconds to update 188,146 postal codes on sqlLite on my desktop. I added a db.commit() line afterwards...not sure if needed. Much appreciated! Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Why is https not working (not private) with my implementation of this web2py slice?

2015-10-15 Thread Phillip
I can access the page, but in order to access the functionality of the service worker process on the page, it appears some other step needs to be taken to properly utilize https. Is there no way to 'normalize' https for this app? -- Resources: - http://web2py.com - http://web2py.com/book (Docu

[web2py] Re: issue with recursive caches?

2015-10-15 Thread Leonel Câmara
No, cache disk does share data as long as it's the same folder and it locks the files themselves. Anyway using the caches as in your last scenario should not cause any problems. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: 0.db naming convention?

2015-10-15 Thread Tom Campbell
Thank you, Leonel. AppConfig seems to be totally undocumented. Is this my cue to contribute to the docs by rooting around in the source and asking you folks stupid questions about AppConfig? -- Resources: - http://web2py

[web2py] Re: PyCharm license for web2py dev - who wants?

2015-10-15 Thread Michael M
+1 On Sunday, October 11, 2015 at 12:21:16 PM UTC-7, Francisco Ribeiro wrote: > > Hello all, > > for those who know PyCharm is a great IDE from JetBrains that provides > free licenses for Open Source projects like web2py ( > https://www.jetbrains.com/buy/opensource/?product=pycharm ). To request

Re: [web2py] PyCharm license for web2py dev - who wants?

2015-10-15 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 +1 :D Às 20:21 de 11-10-2015, Francisco Ribeiro escreveu: > Hello all, > > for those who know PyCharm is a great IDE from JetBrains that provides free > licenses for Open Source projects like web2py ( > https://www.jetbrains.com/buy/opensource/?produ

Re: [web2py] PyCharm license for web2py dev - who wants?

2015-10-15 Thread Richard Vézina
How this is going, I think you may just add everyone that have ever contribute to web2py... Just kidding... :-P Richard On Thu, Oct 15, 2015 at 12:35 PM, Carlos Correia < car...@memoriapersistente.pt> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > +1 :D > > Às 20:21 de 11-10-2015,

[web2py] How to show query on a grid?

2015-10-15 Thread Fabiano Almeida
Hi! I try to show query on a SQLFORM.grid, but returns error: AttributeError: 'Rows' object has no attribute '_db' My code: query = db((db.guest.id>0) & \ (db.voucher.disp == False) & \ (db.voucher.guest == db.guest.id) & \ (db.auth_user.id == db.guest.fnd)) \

[web2py] Re: 0.db naming convention?

2015-10-15 Thread Leonel Câmara
Eheheh go ahead! -- 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"

[web2py] Re: How to show query on a grid?

2015-10-15 Thread Jim S
Try this: query = (db.guest.id>0) & \ (db.voucher.disp == False) & \ (db.voucher.guest == db.guest.id) & \ (db.auth_user.id == db.guest.fnd) fields = [db.voucher.voucher, db.guest.name, db.auth_user.id, db.auth_user.first_name, db.guest.dia] form = SQLFORM.g

[web2py] Re: How to show query on a grid?

2015-10-15 Thread Jim S
...not tested, but you should get the general idea. Hit me back up if this is confusing to you. -Jim On Thursday, October 15, 2015 at 3:27:14 PM UTC-5, Jim S wrote: > > Try this: > > > query = (db.guest.id>0) & (db.voucher.disp == False) > fields = [db.voucher.voucher, db.guest.name, db

[web2py] Re: _onkeyup / ajax call

2015-10-15 Thread Mark Billion
Tried, but had problems with longer ones j_query_calls = """https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js";> """ row_adder = """ $( document ).ready(function() { $('#Debts_creditor__row'

Re: [web2py] Re: 0.db naming convention?

2015-10-15 Thread Vinicius Assef
Appconfig is somewhat documented in the github repo. Fill the search box and see the result. -- Vinicius Assef On 15 October 2015 at 13:07, Tom Campbell wrote: > Thank you, Leonel. AppConfig seems to be totally undocumented. Is this my > cue to contribute to the docs by rooting around in the

[web2py] PyCharm license for web2py dev - who wants?

2015-10-15 Thread Jack Kuan
+1 Would love to give it a try. Thanks! -- 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

[web2py] Handle runtimeErrors with try/except

2015-10-15 Thread argenio . bosanto
Good morning, I need handle exceptions when a database can't connect, When that ocurre, the traceback is: Traceback (most recent call last): File "/var/www/web2py/gluon/restricted.py", line 227, in restricted exec ccode in environment File "/var/www/web2py/applications/servicios/models/0

[web2py] Re: 0.db naming convention?

2015-10-15 Thread Egor Sledov
I believe files from models folder are loaded in alphabetical sequence. So, say, customers.py will be read before db.py file , where connection (and other application level things are defined). If you have file 0.db.py, it will be loaded before customers.py and likely before any other file you

[web2py] bootstrap3 forms

2015-10-15 Thread Egor Sledov
I am trying to use a bootstrap3 template for my project. In bootstrap forms div element containing the input has class "has-error". In web2py (gluon/html.py) input control itself is specially marked if it has na error. Well, more or less. If I am returning an SQLFORM what would be the right a

[web2py] Documentation: update requires writable=False

2015-10-15 Thread Tom Clerckx
Today I was struggling with why the following did not work for me in one of my tables: Field('modified_on', 'datetime', default=request.now, update=request.now) After some fiddling I found that writable=False must be explicitly added for this to work properly. --> Field('modified_on', 'datet

[web2py] Re: How to provide feedback on button in LINKS section of sqlform.grid ?

2015-10-15 Thread 'DenesL' via web2py-users
Change that to el.text = "Working..."; On Sunday, October 11, 2015 at 4:20:58 AM UTC-4, Gary Cowell wrote: > > Hello. > > I'm trying to give the user some feedback when they click on a links (link > button) in the links section of a sqlform grid. > > I have this button code: > >button

[web2py] Re: How to provide feedback on button in LINKS section of sqlform.grid ?

2015-10-15 Thread Gary Cowell
Oh yes! I was so close. Thanks for the help, you solved it :) On Friday, 16 October 2015 04:34:04 UTC+1, DenesL wrote: > > Change that to > > el.text = "Working..."; > > > > > > On Sunday, October 11, 2015 at 4:20:58 AM UTC-4, Gary Cowell wrote: >> >> Hello. >> >> I'm trying to give the user

[web2py] Re: Documentation: update requires writable=False

2015-10-15 Thread Anthony
Note, although good practice, you don't technically have to set writable to False, you just have to make sure no value is submitted for that field when doing an update, as the "update" attribute is intended as a default value when the record is updated (by definition, defaults apply only when an

[web2py] Re: Handle runtimeErrors with try/except

2015-10-15 Thread Anthony
except db._adapter.driver.OperationalError: Anthony On Thursday, October 15, 2015 at 11:29:25 PM UTC-4, argenio.bosa...@metamaxzone.com wrote: > > Good morning, I need handle exceptions when a database can't connect, > > When that ocurre, the traceback is: > > Traceback (most recent call last):